How abhiraj212024/inter-iit-backtester works
This repository is a quantitative strategy evaluation framework with daily multi-asset (Track A) and one-second microstructure (Track B) backtests. The principal workflow is: configure and launch a run, load a participant strategy, stream market bars through its callback, enforce risk limits and simulate next-bar execution, then report performance and diagnostics. The README documents both tracks and the result artifacts. Some backtester internals are omitted from the excerpts, so uncertain internal calls are not asserted.
Main entry points: backtester.py Backtest engine · engine.py Participant strategy · strategy_base.py Strategy context · run_backtest.py CLI runner
Components 19
Run setup
- CLI runner
run_backtest.py - Run configuration
config.yaml - Market datasets
Strategy interface
- Participant strategy
src/engine.py - Strategy API
strategy_base.py - Bar views
strategy_base.py - Strategy context
strategy_base.py
Backtest simulation
- Backtest engine
backtester.py - Track A loop
backtester.py - Track B loop
backtester.py - Risk guard
backtester.py - Accounting ledger
backtester.py - Order execution
backtester.py - Portfolio valuation
backtester.py
Evaluation results
- Performance metrics
backtester.py - Summary metrics
backtester.py - Trade log
backtester.py - Performance tearsheet
backtester.py
Other components
- Participant
Connections 29
- Participant → CLI runner: launches
README.md - CLI runner → Run configuration: reads
run_backtest.py - CLI runner → Participant strategy: loads
run_backtest.py - CLI runner → Backtest engine: runs
run_backtest.py - Market datasets → Backtest engine: supplies bars
README.md - Backtest engine → Track A loop: dispatches
backtester.py - Backtest engine → Track B loop: dispatches
backtester.py - Track A loop → Participant strategy: calls per step
backtester.py - Track B loop → Participant strategy: calls per step
backtester.py - Track A loop → Bar views: builds bars
backtester.py - Track B loop → Bar views: reuses view
backtester.py - Track A loop → Strategy context: updates state
backtester.py - Track B loop → Strategy context: updates state
backtester.py - Participant strategy → Strategy API: implements
src/engine.py - Participant strategy → Strategy context: sets allocations
src/engine.py - Strategy API → Bar views: defines interface
strategy_base.py - Strategy context → Track A loop: queues weights
strategy_base.py - Strategy context → Track B loop: queues weights
strategy_base.py - Track A loop → Risk guard: checks limits
backtester.py - Track B loop → Risk guard: checks limits
backtester.py - Track A loop → Accounting ledger: submits targets
backtester.py - Track B loop → Accounting ledger: submits targets
backtester.py - Accounting ledger → Order execution: fills orders
backtester.py - Accounting ledger → Portfolio valuation: marks holdings
backtester.py - Backtest engine → Performance metrics: calculates
backtester.py - Performance metrics → Accounting ledger: reads trades
backtester.py - Backtest engine → Summary metrics: writes
README.md - Backtest engine → Trade log: writes
README.md - Backtest engine → Performance tearsheet: generates
README.md