OpenViSTAI · Agents · Blockchain · Crypto
Menu
Trading & Crypto Agents

Trading Bot

Trading Bot is an educational stock-trading code project that trains a Deep Q-Learning agent to choose buy, sell or hold actions from historical price data and evaluates its decisions on supplied data. It includes vanilla DQN, a fixed target distribution variant and Double DQN, plus scripts for training and evaluation and a notebook for visualizing evaluations.

Independent OpenViST project profile, based on linked sources.

Trading Bot — OpenViST project profile in Trading & Crypto Agents.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when studying or adapting a small Deep Q-Learning trading example and testing decisions on historical price data, rather than seeking a documented live brokerage workflow.

Who it is for

  • Learners exploring reinforcement learning through a stock-price example.
  • Developers comparing DQN variants on historical stock data.
  • Researchers or hobbyists evaluating a trained policy on a separate historical period.

Documented uses

  • Train an agent using historical stock-price CSV files.
  • Evaluate a trained model against another historical period.
  • Visualize model evaluation results with the provided notebook.
Before you choose

Requirements & limits

The repository is public and specifies the MIT license.

  • The documented inputs are historical stock-price CSV files, including sample data in the repository.
  • Training and evaluation are separate stages and can use different historical periods.
  • The agent's actions are limited to buy, sell or hold, with only one stock bought or sold at a time.
  • The README recommends CPU training because the process is sequential.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Train and evaluate a stock policy on historical CSV data

Install the project's Python requirements, train a DQN strategy on historical price files, and evaluate the named model on another period.

Before you start

  • A Python 3 environment with the packages specified in requirements.txt installed.
  • Historical stock-price CSV files; the repository includes sample data under data/.

Steps

  1. Install dependencies with the command below.

    Documented command
    pip3 install -r requirements.txt
  2. Train using the command below.

    Documented command
    python3 train.py data/GOOG.csv data/GOOG_2018.csv --strategy t-dqn
  3. Evaluate the trained model on another data file using the command below.

    Documented command
    python3 eval.py data/GOOG_2019.csv --model-name model_GOOG_50 --debug

Expected outcome

The training and evaluation scripts run the agent's historical-data workflow, with evaluation decisions made against the supplied CSV.

Guide limitations

  • The documented workflow evaluates against price data and does not describe brokerage order execution.
  • Actions are limited to buying or selling one stock at a time, or holding; position sizing is outside the stated scope.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
4 November 2026
Original website title
pskrunner14/trading-bot · Official homepage title · retained in its source language