A strategy can try to trade differently depending on the state of the market. But could it know the state on the day it makes a decision? I picked a strategy at random from a public repository to check.
The strategy trades Nvidia and uses daily data. One model classifies the market into different states. A second model, called XGBoost, combines that information with other signals to decide whether to trade. The state also helps determine position size.
One day, two answers
On 30 May 2019, the model assigned the market to state 2 when I cut the data off on that date. Using the same model with the full block of data through 10 June, it assigned 30 May to state 0.
I repeated the comparison across the test windows. 53 classifications changed. Each change is a case in which the label for a given day depended on later data. If the strategy uses that label to make a trade, the timing of the calculation matters.
What happened in the simulation
The Linux replay covered 31 December 2018 to 29 December 2023. The strategy lost 32.51%, while the benchmark, a global equity fund called URTH, gained 84.46%. The notebook simulates commissions and slippage on each trade. Short borrowing costs were outside the calculation.
These figures describe the notebook’s simulated path. To measure a version that uses only information available in time, we would need to fix each state before using it and repeat the test.
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.72, with a 95% interval of −1.54 to 0.04. Against URTH, the average annual difference was −21.68%, with a t-statistic of −2.27: here the difference can be told apart from zero, and it goes against the strategy.
When the same returns were resampled in blocks, the cumulative return fell between −52.42% and −3.97% in the central 90%, and the worst drawdown between 20.67% and 54.26%. 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.