RLER is a Rust reinforcement-learning paper-trading workbench for NSE equities on 15-minute candles. It is paper-only: it does not place broker orders and it does not provide investment advice.
The current Rust implementation supports tabular Q-learning, CSV/Yahoo candle loading, backtests, paper replay, walk-forward validation, SQLite run history, and a Rust dashboard server. DQN is intentionally deferred.
cargo test --workspace
cargo run -p rler-cli --bin rler -- train --config config.example.json
cargo run -p rler-cli --bin rler -- backtest --config config.example.json
cargo run -p rler-cli --bin rler -- validate --config config.example.json --trainBars 200 --testBars 60
cargo run -p rler-cli --bin rler -- paper --config config.example.json --mode replay
cargo run -p rler-server --bin rler-serverDashboard URL:
http://localhost:4173
To serve the Rust/Yew dashboard, build the web crate first:
cd crates/rler-web
trunk build
cd ../..
cargo run -p rler-server --bin rler-serverThe default config uses data/sample_15m.csv, so the system works offline.
CSV files need these columns:
timestamp,open,high,low,close,volume
2026-01-05T03:45:00.000Z,2800,2812,2795,2808,120000timestamp, time, datetime, or date are accepted for the time column.
Fetch Yahoo candles:
cargo run -p rler-cli --bin rler -- fetch --config config.example.json --provider yahoo --out data/latest_15m.csvYahoo chart data is a free unofficial source and can change limits or availability. For serious use, import broker-exported candles through CSV.
fetch: fetch candles from Yahoo and save CSV.train: train one tabular Q-learning model underruns/models.backtest: train on earlier rows and evaluate on later rows.paper: replay paper trading with a saved model.validate: rolling walk-forward validation with Monte Carlo robustness.rler-server: dashboard API and static web server on port4173.
| Layer | Where |
|---|---|
| Core engine | crates/rler-core |
| CLI | crates/rler-cli |
| Dashboard server | crates/rler-server |
| Yew dashboard | crates/rler-web |
| Config/data | config.example.json, data/ |
Saved tabular Q-table JSON models with actionSpaceVersion: 1 remain
compatible. DQN configs are not supported by the Rust runtime yet.
- Paper-trading only.
- No real broker execution.
- No profit guarantee.
- DQN/deep-RL support is a future phase.
RLER is released under the MIT License. See LICENSE for the license text.