Findings: BR-020.
Make all public engine construction paths enforce BacktestConfig validation and reject negative,
NaN, or infinite commission, slippage, impact, and execution-price outputs before state mutation.
Errors must name the invalid field or model and value.
Primary surfaces: config.py, engine.py, broker.py, commission and slippage models,
execution/fill_executor.py, accounting gatekeeper tests.
Acceptance:
- Public
Engine and run_backtest reproductions reject every invalid built-in configuration.
- Custom model outputs are checked before cash, orders, fills, positions, trades, or metrics change.
- Complete pre/post state snapshots prove atomicity for negative, NaN, and infinite cases.
- Valid existing configurations retain their behavior and the full suite passes.
Dependencies: none.
Plan reference: /home/stefan/ml4t/libraries/ml4t-backtest-dev/.workspace/work/backtest-stable-release/milestone-1/plan.md - Issue 1 in milestone 0.1.0-m1 - Financial correctness and auditability.
Findings: BR-020.
Make all public engine construction paths enforce
BacktestConfigvalidation and reject negative,NaN, or infinite commission, slippage, impact, and execution-price outputs before state mutation.
Errors must name the invalid field or model and value.
Primary surfaces:
config.py,engine.py,broker.py, commission and slippage models,execution/fill_executor.py, accounting gatekeeper tests.Acceptance:
Engineandrun_backtestreproductions reject every invalid built-in configuration.Dependencies: none.
Plan reference:
/home/stefan/ml4t/libraries/ml4t-backtest-dev/.workspace/work/backtest-stable-release/milestone-1/plan.md- Issue 1 in milestone0.1.0-m1 - Financial correctness and auditability.