The notebook's name suggests that the strategy scales its position down when Tesla moves more. Reviewing the code revealed fixed positions of 100% long or short. Volatility is calculated as a performance metric. The direction comes from the slope of the 20-session TEMA. Original notebook
What the notebook returns
On February 25, 2020, Tesla fell 4.06% from close to close. The notebook credits the new short position with a positive return from that fall, although the trade log puts the execution at the February 26 open. This timing mismatch appears in all 206 entries and reversals. Reproducing the code in Docker gave a 1,153.87% increase in portfolio value.
What changes when positions take effect at the open
We reconstructed the portfolio in Strateva. The previous position remained in effect until the recorded open. The new one took effect from that point. We reconciled costs to orders and charged stock borrow once per short session.
From January 2020 to December 2024, the reconstructed portfolio returned 97.26% net versus 57.42% for URTH over the same sessions. Its maximum drawdown was 83.20%. The information ratio interval included zero.
- What the notebook returns
- Rebuild with execution at the open
- Reference: URTH
Source: technical report of the test, linked below, and figures from the article itself. Prices exclude dividends.
The gap between the two figures does not come from the signal or from the prices, which are the same. It comes from which return is credited to each position. Crediting a position with the move of the day it is decided amounts to collecting something that happened before you held it, and in a stock as volatile as Tesla that day is worth a lot.
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.51, with a 95% interval of −0.45 to 1.49. Against URTH, the average annual difference was 25.36%, with a t-statistic of 0.73: it cannot be told apart from zero.
When the same returns were resampled in blocks, the cumulative return fell between −84.57% and 2,414.37% in the central 90%, and the worst drawdown between 58.29% and 95.19%. What that resampling measures is explained in Block bootstrap and permutation Monte Carlo.
The rebuild ended ahead of URTH, but by taking far more risk: an annual volatility of 67.76% against 20.46%, and a maximum drawdown of 83.20% against 34.01%. The Sharpe came out at 0.51, against 0.45 for the reference. With that much noise, resampling the same returns gives anything from losing 84.57% to multiplying capital by 25.
Test reports

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.
Both PDFs document the fixed-size portfolio with positions aligned to their opening executions.
See Strateva's services if you want to evaluate a rule with your own data.