strateva.

Articles

Can a strategy adapt to the market?

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

The strategy falls short of the reference, margin of error includedWhat the Strateva engine measured on 1,259 daily returns. The bars are what was observed; the vertical stroke on the strategy is the range the central 90% fell in when those same returns were resampled in blocks of 5 sessions (1,000 times). The information ratio measures the lead over URTH per unit of risk: its 95% interval runs from −1.92 to −0.19.

Cumulative return

−100%−50%0%50%100%StrategyURTH−32.5%84.5%

Worst drawdown from a peak

0%−10%−20%−30%−40%−50%−60%StrategyURTH−39.9%−34.0%

Ratios, with their 95% interval

−2−101SharpeInformation ratio−0.72−0.94
  • 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

The first page of the executive summary
First page of the executive summary of the test. Header "Draft · unsigned evidence". Conclusion: the information ratio interval is below zero, −1.92 to −0.19. Cumulative return of −32.51% against 84.46% for URTH. Sharpe of −0.72 and worst drawdown of −39.88%.

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.

All articlesAll the engine reports

CONTACT

Tell me about your strategy. I will say whether it fits within 48 business hours.

Tell me what you want checked, the asset, the frequency and what you have: rules, a report or code. I will tell you whether it fits and which plan it would be.

What to include in your email

  • Market, instruments and frequency (Spot only).
  • What you want checked, and the period.
  • Language and approximate code size, without pasting the code.
  • What data you have, and whether you need an NDA.

Do not send private code, keys or passwords.

stan@strateva.ai

Reply within 48 h (business days). No private material in the first message. No obligation to commission work.

Who replies

I am Filip Stanciu. I have an MSc in Quantitative Finance from the University of Alcalá, a degree in Finance from the Complutense University of Madrid, and a MiFID II certificate. I have worked in quantitative research for an asset manager, validating stock and ETF strategies. I read and reply to every email myself.

I am not a certification body and I am not a large team. I am one person, and I say so.

Nicolae Filip Stanciu