strateva.

Articles

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

This notebook compares two IBM moving averages, over 31 and 63 sessions. When the faster average is above the slower one, the backtest buys 100 shares at the following close. When the faster average is no longer above it, the portfolio goes back to cash. Original notebook

The first buy came after 32 closes

At the start, the notebook calculates the slower average using the closes it has available. On January 29, 2018, it had 32 closes and generated a buy signal. The backtest bought at the following close and sold on March 8. That trade lost $385.35.

What happened when the full window was required

I reran the calculation in Docker with the same calendar, rules and prices. The change was to wait until the slower average had all 63 observations. The first buy and its sale disappeared. The remaining five orders matched.

From December 2017 to April 2019, the notebook version lost 3.84%. The full-window version lost 2.30%. Both start with $25,000 and use the notebook's zero-cost assumption. The PDFs document the notebook replay.

What the engine measured

No reference in this test: the Sharpe cannot be told apart from zeroWhat the Strateva engine measured on 331 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 7 sessions (1,000 times). The report of this test includes no reference to compare with.

Cumulative return

−50%0%50%100%Strategy−3.8%

Worst drawdown from a peak

0%−10%−20%Strategy−7.4%

Ratios, with their 95% interval

−2−1012Sharpe−0.54
  • Strategy
  • 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.54, with a 95% interval of −1.99 to 1.58. This report includes no reference, so there is no test against one.

When the same returns were resampled in blocks, the cumulative return fell between −14.34% and 5.75% in the central 90%, and the worst drawdown between 2.98% and 16.56%. What that resampling measures is explained in Block bootstrap and permutation Monte Carlo.

Test reports

The first page of the executive summary
First page of the executive summary of the test. Header "Draft · unsigned evidence". The conclusion gives the observed compound annual return; the report includes no reference. Cumulative return of −3.84%. Sharpe of −0.54 and worst drawdown of −7.41%.

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.

See Strateva's services if you want to check when your strategy's signals first become available.

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