Before risking money, go through a written checklist: clean, unbiased data, realistic fees and slippage, out-of-sample validation, robust parameters (neighbouring settings give similar results), conclusive paper trading.
Compare the expected drawdown with your own tolerance: if the backtest shows −25% and you can only stand −10%, reduce the size before starting, not after the first fall.
Plan a circuit breaker: a maximum daily loss or a drawdown limit that stops everything. In Backtrader, a strategy can stop the run with self.env.runstop(); live, you also close positions and cut off order sending.
Start at small size, with stop rules set in advance (gap with the backtest, losing streak, drawdown). Only increase size once you have seen, over enough trades, that reality resembles the test.
Examples
GAMMA-X (fictional market) : Between support and resistance, every order must tick the checklist: stop defined, target defined, size computed from risk. In production the code applies it, but you are the one who wrote it.
September 1998: the LTCM rescue : Long-Term Capital Management, a fund whose partners included two winners of the 1997 Nobel Prize in economics, used very high leverage and models considered sound. After the Russian crisis of August 1998, its losses were such that a group of banks, brought together by the Federal Reserve Bank of New York, injected about 3.6 billion dollars in September 1998. A good model replaces neither risk limits nor a circuit breaker.
Key terms
Circuit breaker
Automatic rule that stops the strategy beyond a set loss
Robustness
Stable results when parameters are changed slightly