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.
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.
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
Install dependencies with the command below.
pip3 install -r requirements.txtTrain using the command below.
python3 train.py data/GOOG.csv data/GOOG_2018.csv --strategy t-dqnEvaluate the trained model on another data file using the command below.
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.
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

