strateva.

ENGINE REPORTS

The original code is one thing. What the engine measures is another.

22 public notebooks replayed in the Strateva engine. Each entry keeps the original code, linked at its exact commit, apart from what the engine measured, and links its two documents: the executive summary and the technical report.

01

The original code

Public notebooks, linked at the exact commit that was replayed. It is the starting point. Its figures are whatever that code computes under its own conventions, and nothing here corrects or improves it.

02

The engine result

What the Strateva engine measured when it replayed the notebook: recalculated metrics, uncertainty intervals and the limits of the evidence. It is what the two PDFs of each test record.

03

When they disagree

The two figures can differ: another definition of Sharpe, another execution clock, other data. The article for each test explains what was changed and why. They are two different things and they are read separately.

Draft · unsigned evidence · Engine 0.9.0 · Kernel 1.1.0

That is how the documents identify themselves. This is my own research, not client work. The reading on each entry comes from the interval of the information ratio against its reference: it is not a verdict or a recommendation, and a historical result does not establish future performance.

See the balance of all the tests

Execution: at what price and when

The same signal gives different results depending on the session and the price the order is executed at.

Test no. 3 · 2014-01-30 to 2018-12-31 · 1,239 observations

What does a 5% stop actually do?

An Apple strategy used a 5% stop. In all seven stop exits, the opening price was already more than 5% below the entry price.

Original code

Filip303/quant-trading-strategiesnotebooks/bollinger-rsi.ipynbCommit 8cc160cd0732

See the original code on GitHub

Engine resultCannot be told apart from zero

Metrics computed by the engine: What does a 5% stop actually do?
MetricStrategyURTH
Compound annual growth9.61%3.13%
Sharpe0.650.28
Maximum drawdown−20.02%−21.19%

Sharpe ratio interval, 95%−0.28 … 1.39

Standard error 0.42.

Test no. 4 · 2020-03-05 to 2024-12-31 · 1,215 observations

What changes when you follow a trend one day later?

We moved a strategy’s SPY positions one trading day later. Across the same sessions, the simulated net return went from 89.96% to 70.09%.

Original code

Filip303/quant-trading-strategiesnotebooks/tsmom.ipynbCommit 8cc160cd0732

See the original code on GitHub

Engine resultCannot be told apart from zero

Metrics computed by the engine: What changes when you follow a trend one day later?
MetricStrategyURTH
Compound annual growth14.23%11.37%
Sharpe0.970.56
Maximum drawdown−14.86%−28.49%

Sharpe ratio interval, 95%0.10 … 1.90

Standard error 0.44.

Test no. 7 · 2020-01-02 to 2024-12-31 · 1,258 observations

What does TEMA Vol adjusted actually adjust?

The notebook measures volatility and holds fixed 100% long or short positions. A reconstruction that applies positions at the recorded open returned 97.26% net.

Original code

Filip303/quant-trading-strategiesnotebooks/tema-volatility-sizing.ipynbCommit 86ba006b54e9

See the original code on GitHub

Engine resultCannot be told apart from zero

Metrics computed by the engine: What does TEMA Vol adjusted actually adjust?
MetricStrategyURTH
Compound annual growth14.58%9.52%
Sharpe0.510.45
Maximum drawdown−83.20%−34.01%

Sharpe ratio interval, 95%−0.45 … 1.49

Standard error 0.50.

Test no. 9 · 2019-04-08 to 2024-12-31 · 1,444 observations

What happens when a strategy sells at a time limit?

Advanced IBS/ROC sold on a signal or after 20 sessions. The time limit triggered 5 of the 30 exits in the replay.

Original code

Filip303/quant-trading-strategiesnotebooks/ibs-roc.ipynbCommit 8cc160cd0732

See the original code on GitHub

Engine resultCannot be told apart from zero

Metrics computed by the engine: What happens when a strategy sells at a time limit?
MetricStrategyURTH
Compound annual growth8.06%10.04%
Sharpe0.490.51
Maximum drawdown−24.60%−32.23%

Sharpe ratio interval, 95%−0.18 … 1.19

Standard error 0.35.

Test no. 10 · 2011-01-04 to 2023-08-04 · 3,167 observations

What changes when an Apple signal waits for the open?

I reproduced an Apple strategy and moved its orders from the close to the next open. The next open improved 33 of 53 matched trades.

Original code

Filip303/quant-trading-strategiesnotebooks/ibs-ema.ipynbCommit 8cc160cd0732

See the original code on GitHub

Engine resultNo reference

Metrics computed by the engine: What changes when an Apple signal waits for the open?
MetricStrategyReference
Compound annual growth11.31%—
Sharpe0.62—
Maximum drawdown−36.85%—

Sharpe ratio interval, 95%0.13 … 1.14

Standard error 0.25.

Information that did not exist yet

A label, a figure or an estimate that was not yet known on the day of the decision.

Test no. 2 · 2018-12-31 to 2023-12-29 · 1,259 observations

Can a strategy adapt to the market?

A strategy trading Nvidia tries to adapt its decisions to the state of the market. Recalculating each classification with the data available on the date changed 53 results.

Original code

Filip303/quant-trading-strategiesnotebooks/xgboost-regime-adaptive.ipynbCommit 8cc160cd0732

See the original code on GitHub

Engine resultBelow the reference

Metrics computed by the engine: Can a strategy adapt to the market?
MetricStrategyURTH
Compound annual growth−7.57%13.04%
Sharpe−0.720.71
Maximum drawdown−39.88%−34.01%

Sharpe ratio interval, 95%−1.54 … 0.04

Standard error 0.40.

Test no. 15 · 2011-02-02 to 2024-12-31 · 3,501 observations

When can a momentum filter reduce exposure?

The notebook used the current close to set the day's exposure. I repeated the comparison with the filter available at the previous close.

Original code

Filip303/quant-trading-strategiesnotebooks/momentum-crash-risk.ipynbCommit 86ba006b54e9

See the original code on GitHub

Engine resultCannot be told apart from zero

Metrics computed by the engine: When can a momentum filter reduce exposure?
MetricStrategyMOMENTUM-BASE
Compound annual growth−2.02%−2.77%
Sharpe−0.06−0.10
Maximum drawdown−42.76%−46.62%

Sharpe ratio interval, 95%−0.56 … 0.45

Standard error 0.26.

Test no. 21 · 2020-01-06 to 2024-12-31 · 1,256 observations

What could a minimum-variance portfolio know at the time?

The notebook estimates risk for seven stocks using the full sample. The audit tests what happens when parameters are fitted with data available before investing.

Original code

Filip303/quant-trading-strategiesnotebooks/dcc-garch-minimum-variance.ipynbCommit 86ba006b54e9

See the original code on GitHub

Engine resultCannot be told apart from zero

Metrics computed by the engine: What could a minimum-variance portfolio know at the time?
MetricStrategyMAG7-EW
Compound annual growth28.80%43.80%
Sharpe1.001.25
Maximum drawdown−49.57%−49.47%

Sharpe ratio interval, 95%0.06 … 1.89

Standard error 0.46.

Data and test period

When a backtest really starts counting and how much data it has for its first decision.

Test no. 12 · 2020-03-17 to 2024-12-31 · 1,207 observations

When does a backtest start counting?

A model trading SPY spent its first 252 sessions in cash. Including those sessions changed which series finished ahead.

Original code

Filip303/quant-trading-strategiesnotebooks/gmm-regimes.ipynbCommit 86ba006b54e9

See the original code on GitHub

Engine resultCannot be told apart from zero

Metrics computed by the engine: When does a backtest start counting?
MetricStrategyURTH
Compound annual growth16.41%17.93%
Sharpe1.130.89
Maximum drawdown−14.68%−26.90%

Sharpe ratio interval, 95%0.29 … 1.90

Standard error 0.42.

Test no. 14 · 2017-12-13 to 2019-04-09 · 331 observations

How much data does a 63-session moving average need?

The notebook's 63-session moving average gave a signal after 32 closes. Requiring a full window changed the first trade.

Original code

Filip303/quant-trading-strategiesnotebooks/simple-moving-average-crossover.ipynbCommit 86ba006b54e9

See the original code on GitHub

Engine resultNo reference

Metrics computed by the engine: How much data does a 63-session moving average need?
MetricStrategyReference
Compound annual growth−2.94%—
Sharpe−0.54—
Maximum drawdown−7.41%—

Sharpe ratio interval, 95%−1.99 … 1.58

Standard error 0.91.

Test no. 20 · 2021-04-01 to 2023-12-29 · 692 observations

When does an out-of-sample portfolio test really start?

The notebook sets aside 2020–2023 for evaluation and starts counting its price history again in January 2020. We measure the strategy from its first investment.

Original code

Filip303/quant-trading-strategiesnotebooks/portfolio-allocation-out-of-sample.ipynbCommit 86ba006b54e9

See the original code on GitHub

Engine resultCannot be told apart from zero

Metrics computed by the engine: When does an out-of-sample portfolio test really start?
MetricStrategyURTH
Compound annual growth1.02%4.48%
Sharpe0.050.23
Maximum drawdown−33.44%−28.49%

Sharpe ratio interval, 95%−1.09 … 1.24

Standard error 0.60.

How the rule and the portfolio are built

Units, windows, weights and orders: one-line decisions in the code that change what is simulated.

Test no. 1 · 2018-04-06 to 2024-12-31 · 1,696 observations

What happens if you buy Microsoft after it closes near the day's low?

A Microsoft trading rule finished ahead of SPY in a historical test. Doubling all prices kept percentage moves the same and changed the signal on 47 dates.

Original code

Filip303/quant-trading-strategiesnotebooks/ibs-roc.ipynbCommit 8cc160cd0732

See the original code on GitHub

Engine resultCannot be told apart from zero

Metrics computed by the engine: What happens if you buy Microsoft after it closes near the day's low?
MetricStrategySPY
Compound annual growth15.72%12.59%
Sharpe0.840.74
Maximum drawdown−21.85%−32.45%

Sharpe ratio interval, 95%0.17 … 1.53

Standard error 0.35.

Test no. 5 · 2015-03-05 to 2018-11-30 · 945 observations

When does a backtest count the same day twice?

The test windows overlapped. Joining their results counted 793 trading days twice. We rebuilt the test as one continuous portfolio.

Original code

Filip303/quant-trading-strategiesnotebooks/volatility-threshold-regimes.ipynbCommit 8cc160cd0732

See the original code on GitHub

Engine resultCannot be told apart from zero

Metrics computed by the engine: When does a backtest count the same day twice?
MetricStrategyURTH
Compound annual growth4.81%6.25%
Sharpe0.590.51
Maximum drawdown−10.44%−18.89%

Sharpe ratio interval, 95%−0.23 … 1.62

Standard error 0.46.

Test no. 16 · 2014-02-05 to 2018-12-31 · 1,235 observations

How does a regime portfolio use semivariance?

Semivariance helps the model classify volatility. One of three rules then allocates the capital.

Original code

Filip303/quant-trading-strategiesnotebooks/hmm-semivariance-allocation.ipynbCommit 86ba006b54e9

See the original code on GitHub

Engine resultCannot be told apart from zero

Metrics computed by the engine: How does a regime portfolio use semivariance?
MetricStrategyURTH
Compound annual growth0.59%3.59%
Sharpe−0.130.18
Maximum drawdown−16.80%−20.72%

Sharpe ratio interval, 95%−0.90 … 0.73

Standard error 0.42.

Test no. 18 · 2020-01-02 to 2024-12-31 · 1,258 observations

How much does a portfolio with a 100% target actually hold?

The rule moved to the 100% label by buying 70% of portfolio value. The weight already on the books could push exposure above its target.

Original code

Filip303/quant-trading-strategiesnotebooks/rule-based-market-regimes.ipynbCommit 86ba006b54e9

See the original code on GitHub

Engine resultCannot be told apart from zero

Metrics computed by the engine: How much does a portfolio with a 100% target actually hold?
MetricStrategyURTH
Compound annual growth10.96%9.75%
Sharpe0.840.48
Maximum drawdown−16.96%−32.23%

Sharpe ratio interval, 95%−0.02 … 1.74

Standard error 0.45.

Test no. 22 · 2014-01-06 to 2018-12-31 · 1,256 observations

What does the Bayesian step add to this portfolio?

The notebook uses a Bayesian model to estimate expected returns. The audit checks whether those estimates influence the allocation.

Original code

Filip303/quant-trading-strategiesnotebooks/bayesian-hierarchical-risk-parity.ipynbCommit 86ba006b54e9

See the original code on GitHub

Engine resultCannot be told apart from zero

Metrics computed by the engine: What does the Bayesian step add to this portfolio?
MetricStrategyURTH
Compound annual growth2.40%2.62%
Sharpe0.260.25
Maximum drawdown−19.67%−21.19%

Sharpe ratio interval, 95%−0.51 … 1.08

Standard error 0.41.

Costs, size and exposure

How much is traded, how much is risked and how long the portfolio is invested.

Test no. 6 · 2013-01-03 to 2018-12-31 · 1,509 observations

Following the slope of TEMA on Tesla

A Tesla strategy changed positions based on the slope of a moving average. It made 255 position changes and lost 72.45% net between 2013 and 2018.

Original code

Filip303/quant-trading-strategiesnotebooks/tema-crossover.ipynbCommit 86ba006b54e9

See the original code on GitHub

Engine resultCannot be told apart from zero

Metrics computed by the engine: Following the slope of TEMA on Tesla
MetricStrategyURTH
Compound annual growth−19.37%5.42%
Sharpe−0.160.39
Maximum drawdown−90.19%−21.19%

Sharpe ratio interval, 95%−1.01 … 0.70

Standard error 0.43.

Test no. 8 · 2013-01-03 to 2018-12-31 · 1,509 observations

What changes when TEMA sizes positions by volatility?

The same Tesla signal traded at two sizes. Sizing by volatility reduced the loss, and Sharpe was close to −0.16 in both cases.

Original code

Filip303/quant-trading-strategiesnotebooks/tema-crossover.ipynbCommit 86ba006b54e9

See the original code on GitHub

Engine resultCannot be told apart from zero

Metrics computed by the engine: What changes when TEMA sizes positions by volatility?
MetricStrategyTEMA-BASE
Compound annual growth−6.34%−19.37%
Sharpe−0.16−0.16
Maximum drawdown−56.40%−90.19%

Sharpe ratio interval, 95%−0.95 … 0.72

Standard error 0.43.

Test no. 13 · 2019-01-03 to 2024-12-31 · 1,509 observations

How much QQQ did a regime strategy actually hold?

The notebook changes allocations based on trend and volatility. The trade log shows how much went into QQQ, other funds and cash.

Original code

Filip303/quant-trading-strategiesnotebooks/qqq-regime-backtest.ipynbCommit 86ba006b54e9

See the original code on GitHub

Engine resultCannot be told apart from zero

Metrics computed by the engine: How much QQQ did a regime strategy actually hold?
MetricStrategyURTH
Compound annual growth4.00%13.97%
Sharpe0.240.67
Maximum drawdown−20.03%−34.01%

Sharpe ratio interval, 95%−0.47 … 0.96

Standard error 0.38.

Test no. 17 · 2020-01-02 to 2024-12-31 · 1,258 observations

What does a 2% VaR filter rule out?

A QQQ mean-reversion strategy checks recent losses before buying. The filter changed which trades it took and how far the portfolio fell.

Original code

Filip303/quant-trading-strategiesnotebooks/var-filtered-mean-reversion.ipynbCommit 86ba006b54e9

See the original code on GitHub

Engine resultCannot be told apart from zero

Metrics computed by the engine: What does a 2% VaR filter rule out?
MetricStrategySPY
Compound annual growth9.39%12.76%
Sharpe1.400.68
Maximum drawdown−4.88%−34.10%

Sharpe ratio interval, 95%0.49 … 2.21

Standard error 0.43.

How the result is measured

Two ways of computing the same metric can give opposite signs.

Test no. 11 · 2020-01-03 to 2022-12-30 · 755 observations

Can Sharpe be positive when a portfolio loses money?

An Apple RSI strategy had a positive Sharpe over 2020–2022 and ended with less money. The difference comes from how returns compound.

Original code

Filip303/quant-trading-strategiesnotebooks/rsi-mean-reversion.ipynbCommit 86ba006b54e9

See the original code on GitHub

Engine resultCannot be told apart from zero

Metrics computed by the engine: Can Sharpe be positive when a portfolio loses money?
MetricStrategyAAPL
Compound annual growth−0.12%20.91%
Sharpe0.140.70
Maximum drawdown−29.19%−31.43%

Sharpe ratio interval, 95%−0.68 … 1.05

Standard error 0.43.

Test no. 19 · 2021-01-04 to 2024-12-31 · 1,005 observations

What changes when you group assets by how they move?

The portfolio groups funds and stocks that tend to move together. The replay showed lower volatility than URTH and exposed an error in the notebook’s Sharpe calculation.

Original code

Filip303/quant-trading-strategiesnotebooks/mst-hrp-allocation.ipynbCommit 86ba006b54e9

See the original code on GitHub

Engine resultCannot be told apart from zero

Metrics computed by the engine: What changes when you group assets by how they move?
MetricStrategyURTH
Compound annual growth0.50%8.45%
Sharpe−0.130.46
Maximum drawdown−16.73%−26.90%

Sharpe ratio interval, 95%−1.17 … 0.84

Standard error 0.51.

Two cases with a report of their own

EWMA63 and RF100 were audited before this series. Each has a case study and an executive summary.

EWMA_63_Strat

EWMA63 — Does beta selection add value beyond de-risking?

The audit showed that most of the historical Sharpe and drawdown improvement came from lower market exposure, while the incremental value of the EWMA63 allocation layer was approximately zero.

RF100

RF100 — Can a Random Forest beat simple momentum?

A Random Forest model that ranks stocks each month, using only data available at the time, did show some predictive ability. But it failed to beat a simple momentum rule (buying what has risen most) under the same costs and execution.

Quoted from the reportThis run freezes a fresh set of adjusted Yahoo data. The original vendor snapshot is unpublished and its results differ.

Some of these strategies use short positions or negative cash. They are historical research and do not widen the current Spot offering.

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.

Nicolae Filip Stanciu