Back to notes

The curve looks good. Now what?

Checking the numbers behind a ten-day synthetic backtest.

Quant development

AlphaForge is a tool for researching daily strategies, from universe selection through to backtesting and reports. The repo includes four stocks and ten trading days of synthetic data. Here are a few things I can check against the saved outputs.

Start with the universe

The filter records the reference date, the previous close, and each reason for exclusion. AAPL’s record for January 5, 2024 uses the January 4 close of 103. The January 3 and 4 rows don’t have enough history, so they’re excluded.

That leaves 17 of 40 rows, across three of the four stocks. Keeping these decisions makes it easy to see why a symbol was in or out on a particular day.

Follow one rebalance

In the execution example, rebalancing is weekly, turnover is capped at 0.75, and commission and slippage are set to 2 and 3 basis points. The cap is hit on January 8. The two costs come out to 0.00015 and 0.000225: exactly 0.75 × 0.0002 and 0.75 × 0.0003.

The output records both target and actual turnover, whether the cap was hit, and what it cost. I can check that the settings actually affect the calculation.

A rising curve can still lag

The full report shows a 1.38% return for the strategy against 3.34% for the benchmark, with a compounded excess return of −1.90%. NAV goes up, but the strategy still underperforms. The HTML report comes with ten charts and metadata, so the numbers behind each chart are there to inspect.

This is only ten days of synthetic data. It can check the mechanics of the example, but it doesn’t tell us whether the strategy will work in live markets.

Sources: example outputs and reproduction commands, full report metadata.

Back to notes