Skip to content
Archive
← r/options
0
20%
u/GammaFlowSPY 1 day ago

My best backtest result came from a bug. The clean version is much weaker.

Over the last few weeks I tested several ideas for a rule-based SPY options system. Before computing any result, I wrote down the test, hashed the file, and fixed the pass criteria. Then I ran it once. All trades below are paper trades. This post is what came out, including the part that made my best-looking result disappear. **The headline result was misleading** I replayed 25 closed debit put spreads (paper trades) on a simulated $500 account: whole contracts only, up to 60% of equity per trade, cash locked until exit, actual dates, $0.65 commission per leg, no slippage model. All 25 trades turned $500 into $18,076. Then I checked the journal against an earlier code audit. A bug in my order-building code had created 16 of the 25 spreads with legs on a different expiration than the one the model evaluated. They were real journal trades, but not the trades the model had selected. • All 25 trades: $18,076, max drawdown 32% • Only the 9 clean trades: $1,468, max drawdown 38% • 9 clean trades without the first winner: $500, could not afford one contract at a 60% cap Most of the headline number came from trades my model never picked. Why the bug looked profitable The bug effectively replaced the evaluated trade with a much shorter-dated put spread. Not a hidden signal, just a different and more aggressive bearish trade. So I preregistered a comparison: short-dated vs standard-dated put spreads, entered on the same days, both closed on the same later day (the 5th trading day, or the 6th or 7th if data was missing), P&L as a percentage of debit. • Short-dated, about 8 days: average +21.4%, median +50.1%, profitable 27 of 49 • Standard-dated, about 30 days: average +3.4%, median +6.7%, profitable 26 of 49 The average difference was +18.0 percentage points, but the confidence interval included zero and the permutation test gave p = 0.13. By the rule I set before looking, that is "no difference detected". The split explains why the average looked good: • When SPY fell after entry: short-dated +81%, standard-dated +31% •When SPY rose after entry: short-dated −52%, standard-dated −30% In this sample, the short-dated spread's P&L reacted about 1.7 times as strongly to SPY's move (estimated from a regression of P&L on SPY's return over the holding period). My sample had more falling windows than rising ones, including a sharp November selloff, which helps explain why the average came out higher. That is not an edge in timing. It is extra exposure to a market direction I could not reliably predict. The obvious exit improvements did not help On the 9 clean trades, one contract each, total P&L as a share of total risk: • Trail 35% from peak after +50% of target: 34.6% • Close everything at +50% of target: 34.9% • Wait for the full target: 34.3% •Observed-peak reference, not executable: 66.0% The real exit rules were almost identical. In exploratory follow-ups on the full sample, tighter trailing stops and tighter stop losses did worse. With noisy option marks, tight thresholds mostly catch noise. The $500 problem Even on the clean trades, the account depended heavily on one early winner. Without it, a $500 account with a 60% cap could not afford a single contract, because each one cost more than $300. On a small account the real choice was not "risk 10% or 60%". It was "one contract or nothing". What I take from this • A preregistered test is only useful if you accept its result, including "no edge found". • A beautiful backtest can come from a bug, not from a strategy. • A result that works mainly in one market direction may be exposure, not skill. •Exit tweaks moved results less than the noise. The bug had a larger effect than any of the exit-rule changes I tested. I have been forward paper trading since Nov 24. That is a handful of days, so it tells me nothing yet, but it is the one test I can't have fitted. Where I'd love feedback: 1. The clean sample is 9 trades. How would you decide whether anything here is worth forward testing, or whether it is just noise? 2. My exit rules all landed within noise of each other. Is that a sign the entry is what matters, or that my marks are too sparse to tell? 3. For a $500 account where one contract is 60% or more of equity, would you trade at all, or wait until the account can hold a smaller position size? 4. Before trusting a forward test on paper fills, what would you check first? Limitations: one period, July to November 2026, ending in a selloff; small samples (9 to 49); delayed quotes; paper fills; a fixed exit about five trading days after entry in the expiration comparison. Not financial advice. Thanks for reading. Blunt answers welcome, I'd rather hear it now than from the account.
0 comments held Reddit says 5 on reddit ↗

No comments collected for this post yet.