Note: 💔 Work in progress. This is just for learning purposes, and definitely not intended for real-world trading!
A reinforcement learning based trading bot for financial markets.
TraderBot uses transformers and Bayesian models to automate trading decisions in financial markets. The bot is designed to learn from historical data and adapt to changing market conditions. It employs a reinforcement learning algorithm to optimize trading strategies. It uses Ray for distributed training and hyperparameter tuning.
src/: Core source codeenvironment.py: Trading environment simulationdata_processor.py: Data preparation and feature engineeringbacktest.py: Backtesting framework for strategy evaluationtrain.py: Model training pipelinemodels/: ML model implementationsbayesian.py: Bayesian modeltransformer.py: Transformer model
data/: Financial data files (CSV and processed features)results/: Storage for experiment resultssaved_models/: Checkpoints for trained models
pip install -r requirements.txt
from src.train import train_model
train_model(config_file="default_config")from src.backtest import run_backtest
results = run_backtest(model_path="saved_models/algorithm_state.pkl",
tickers=["AAPL", "MSFT", "GOOGL", "SPY"])Run the test suite:
python src/test_environment
