← All articles

Prediction markets

What to do when a backtest makes you want to change the rule

A bad result can suggest a better prediction market strategy. Give the new rule its own test and keep the old result where you can see it.

A green folded sheet branches away from a navy paper path
Image: PaperMantis / original editorial illustration.

Say you replay a prediction market strategy and find six ugly entries around the same time of day. You exclude that hour and rerun the test. The chart looks better. Did you fix the strategy?

You found a change worth testing. The tricky bit is that the hour came from looking at the losses. If you describe the second chart as a test of a rule you’d already chosen, you’ve lost the most useful detail in the experiment. The example below is fictional. No account traded it and the six entries are made up.

Write down when the rule changed

Imagine the first rule will evaluate 200 consecutive BTC Up/Down windows in a historical dataset. The plan says which entry price the simulator can accept, how it treats missing quotes, and what result it will keep even if the rule falls short. The first run finishes and you find the six entries. At that point, save the report and write a short note beside it: “V2 skips 14:00–15:00 UTC because I spotted a cluster of losses there in V1.”

That little sentence explains why a clean chart from the same 200 windows deserves a cautious reading. You could have spotted losses near expiry instead. Or picked a different price band. Every pattern you were willing to act on gave those same 200 windows another chance to influence the next rule.

I’d borrow one idea from research preregistration. The Open Science Framework guide explains how researchers timestamp a read-only study plan and spell out outcomes, decision criteria and exclusions in advance. A private text file with dated versions can serve the narrower purpose here. It keeps track of when you made a choice relative to when you saw the result.

A timeline shows V1 tested on 200 fictional windows, the hour filter added after seeing the losses, and V1 and V2 frozen before another set of windows.
The first replay gives you the idea. The separately planned comparison is where you check it.

Give the change a fair rematch

Before the next held-out set of windows, freeze V1 and V2. Pick how many windows you’ll compare, the execution assumptions they’ll share, and the number you want to judge them on. If the rule’s purpose is to reduce large losses, you might report peak-to-trough drawdown and net simulated P&L for both variants, along with their trade counts. Keep those measures even if one makes V2 look less convincing. Choose what missing data would make a window unusable for both versions.

I’d also write down what would make me drop V2. For example, if it avoids the original bad hour yet takes a similar drawdown elsewhere, the next step might be to examine what the entries had in common. Keep that investigation as a new note. A series of changes made while watching the second run soon turns that run into another place to look for ideas.

Leave room for a legitimate fix

Suppose the issue turns out to be a time-zone conversion bug. Correct the bug, label the rerun and keep the old output with a note explaining why it was invalid. A software correction and a strategy change answer different questions. Keeping both reports lets a reader see whether the timestamps were wrong or whether the new rule simply chooses different trades.

The next time a revised chart looks better, I’d ask one question before sharing it. Which windows helped me come up with the change, and which did I save to test it?