Skip to main content

Module backtest

Module backtest 

Source
Expand description

Multi-agent market simulation engine

Structs§

BacktestResult
BacktestSummary

Functions§

run_backtest
Run backtest with the default adverse selection lookback (10 steps).
run_backtest_lookback
Run backtest with a custom adverse selection lookback for computing M(k).
run_backtest_with_liquidation
Run backtest with terminal liquidation applied uniformly at the end. liquidation_half_spread is the half-spread cost per unit of residual inventory: |final_q| * liquidation_half_spread is deducted from both pnl_spread and final_equity so all strategies are evaluated on equal footing regardless of whether they have their own terminal flattening logic.