If a strategy says it sells when it loses 5%, what price does the simulation use? I picked an Apple strategy at random from a public repository to find out.
The rule combines Bollinger Bands and RSI to look for closes that are low relative to recent sessions. When it gives a buy signal, it simulates the order at the next open. Once it holds the stock, it checks the 5% stop at each session’s opening price.
From 5% to 8.20%
On 10 December 2018, the stop level was $42.69 in the notebook’s adjusted prices. Apple opened at $41.25, and the simulation recorded the sale at that price. The decline from entry was 8.20% before commissions.
Something similar happened in all seven stop exits in the replay. In every case, the opening price that triggered the sale was already more than 5% below the entry price. The notebook uses that same opening price as the fill.
What happened over the full period
From January 2014 to December 2018, the strategy gained 56.98% after simulated commissions, compared with 16.36% for URTH, a global equity fund. The comparison uses prices without dividends. Given how much the returns varied, the data were also consistent with a zero difference against the benchmark.
When you read a backtest with a stop, check two details. When does it check the stop level, and what price does it use for the sale? In this case, both answers depended on the open.
What the engine measured
Cumulative return
Worst drawdown from a peak
Ratios, with their 95% interval
- Strategy
- Reference: URTH
- Resampling range or 95% interval
Source: technical report of the test, linked below. Prices exclude dividends; the resampling uses the same historical series.
The technical report adds the margin of error to these figures. The Sharpe of the strategy was 0.65, with a 95% interval of −0.28 to 1.39. Against URTH, the average annual difference was 6.21%, with a t-statistic of 0.75: it cannot be told apart from zero.
When the same returns were resampled in blocks, the cumulative return fell between −10.34% and 169.68% in the central 90%, and the worst drawdown between 12.85% and 37.61%. What that resampling measures is explained in Block bootstrap and permutation Monte Carlo.
Reports from the test

How to read this document is explained in the guide to the technical report.
How to read both documents is in the guide to the technical report.
If you would like to review a rule with your own data, see Strateva’s services.