trading_bots/the various trading bots, most notably thetorch/RL modeltui/control and data viewing for training and inference, designed for the torch RL modelshared/shared code between the membersreport_cli/CLI for debugging training and inference results
It's recommended to use the tui/ to start training or inference, or to view training or inference data. It's recommended to begin training/inference from inside the tui using the controls it provides so that it can show logs and track episodes correctly.
cd tui && cargo run --releasesrc/torch/high-performance high-results torch RL modelsrc/agents/andsrc/strategies/programmatic strategies with genetic algorithm trainingsrc/burn/burn model, abandoned due to poor performancetraining/training episode reports (gens/) and metadata (data/)weights/trained or partially trained model schemasinfer/inference reports and metadata
Multi-asset trading bot using deep RL (PPO) and historical price data.
src/torch/using tch-rs, model derives from their RL example / SB3 PPO implementation with heavy modifications mentioned below- drastically outperforms the programmatic strategies with comparable training time
- Performs exceptionally well when trained sufficiently (thousands of epochs)
- 1.8M parameters
- mama2-inspired ssm block
- Continuous action space for position sizing [-1, 1] implicit sell/buy/hold and direction (short term memory/goal setting) for each ticker
- Timesnet-inspired Conv layers for price delta % observations
- self-attention layers for weighting time, static inputs, and cross-ticker
- Separate FC paths after shared conv features for actor and critic independent policy/value optimization
- Inputs price delta %s from current and previous time steps, intention to support more inputs such as news and social sentiment scores per-ticker and for economy
- Can trade a single ticker or multiple tickers simultaneously, balancing a portfolio
- Can train and infer on some consumer hardware, needs ~12GB VRAM (I use an RTX 5090 with good success)
- Built to use the IBKR API to download historical data for training
- Intention to do live trading / paper trading with IBKR API
This was the original project, but was effectively superseded by the RL models. They're here if you want to see some interesting use of genetic algorithms for parameter refinement.
src/agents/andsrc/strategies/a few different strategies with parameters optimized using genetic algorithm, sees significant improvement over training- Interesting research project but not designed for or expecting significant results
![]() |
|---|
| Total assets doubling from $10,000 -> $20,000 over the course of a year using one of the optimized strategic trading algorithms |
Thanks to rust-ibapi and its contributors for making this possible





