You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Teach risk rules and stateful strategy behavior #114
Affected library: backtest Current version: 0.1.8 Location: risk and stateful-strategy tutorial
Problem
Readers cannot see how stops, exits, portfolio drawdown reduction, and strategy state interact across callbacks and fills.
Required outcome
Build a runnable tutorial showing causal risk-event order, the resulting stop and reduction fills, and a strategy that needs state between callbacks. Connect it to the risk-management guide, the existing stateful example, and relevant book material.
Acceptance criteria
Executed results show the expected stop and reduction fills, fraction, and exposure change.
A repeated breach and a later eligible risk event produce the documented behavior.
The page explains the order of marks, checks, decisions, and fills using the observed records.
Installed-wheel checks and the strict MkDocs build pass.
Depends on the portfolio-reduction fix and shared tutorial inputs.
Activity
docs(risk): trace stops and drawdown reductions