Platform for backtesting long-only trading strategies on historical market data. Load candles from T-Bank, Twelve Data, Bybit, or Binance, run and compare YAML-based strategies, optimize parameters, and review metrics and charts in a web dashboard.
- Run backtests on historical OHLCV candles with commission and slippage settings.
- Connect market data providers and save API tokens from the dashboard.
- Manage strategies: enable/disable, add new YAML strategies, compare ranking and health verdicts (PASS / CAUTION / FAIL).
- Optimize strategy parameters (grid or random sample) and inspect top candidates.
- View equity curves, trade logs, buy/sell markers, and buy-and-hold benchmark on charts.
- Refresh one strategy in Live mode on an interval while a full backtest is not running.
- Start the full stack with Docker Compose or run frontend + Python locally for development.
1. Configure tokens
cp .env.example .envSet at least TINKOFF_TOKEN for MOEX data via T-Bank. Optional: TWELVEDATA_TOKEN,
BYBIT_TOKEN, BINANCE_TOKEN. Tokens can also be entered in the dashboard UI.
2. Start with Docker
docker compose up --buildOpen http://localhost (or the port from APP_PORT, default 80).
Course VM (always-on demo): http://10.93.27.6/ — same Docker Compose stack as above, deployed for TA access.
3. Run a backtest
- Choose a data source and instrument in the control panel.
- Mark strategies you want to run ( Run checkbox on each card ).
- Click Run backtest and wait for the progress bar to finish.
- Review metrics, ranking, and charts on strategy cards.
Interactive API reference: http://localhost/docs.
Stop the stack:
docker compose downMore Docker options (backend-only, tests, dev shell): DOCKER.md.
| Action | Where |
|---|---|
| Data source & instrument | Backtest control panel |
| API tokens | Data source cards or root .env |
| Run / stop full backtest | Run backtest / Stop backtest |
| Include strategy in next run | Run checkbox on strategy card |
| Live refresh (one strategy) | Go Live / Stop Live on a card |
| Add strategy | Add Strategy panel (writes YAML to config/strategies/) |
| Optimization mode | Control panel — grid or random sample |
Settings are stored in config/dashboard.json. Strategy definitions live in
config/strategies/*.yaml.
Requirements: Python 3.10+, Node.js 20+, npm. Docker optional but recommended.
python3 -m venv .venv && source .venv/bin/activate
python -m pip install -r requirements.txt
npm --prefix frontend ci && npm --prefix frontend run devOpen the URL printed by the dev server. Backend CLI:
python main.py bootstrap
python main.py refresh-rankingVerification: pytest tests -q && npm --prefix frontend run lint && npm --prefix frontend run build
| Document | Description |
|---|---|
| docs/README.md | Documentation hub |
| DOCKER.md | Docker services and deployment |
| frontend/README.md | Dashboard UI details |
| docs/openapi.yaml | OpenAPI spec (Swagger at /docs) |
| docs/api_description.md | HTTP route reference |
| docs/strategy_composable_engine_design.md | Strategy YAML format |
| docs/analytics_data_model_specification.md | Metrics and ranking |
- Final Report (PDF)
- Final Presentation (PDF)
- Week 2 report (PDF)
- Week 6 report (PDF)
- Week 5 report (PDF)
- Week 4 report (PDF)
- Week 3 report (PDF)
BackTestBench uses historical market data for research. It does not place real trades.
Results are not financial advice and do not guarantee future performance. Keep .env and API
tokens private; see DOCKER.md for server deployment notes.