How to test a strategy before putting money on it

A friend sent me a strategy last spring. Two moving averages, a session filter, exits at a fixed distance. He’d run it live for three weeks and wanted to know why it kept misfiring. The rules took ten minutes to check against historical data, and the answer sat in the first month.

Nothing about it was broken exactly. It needed a specific market to function, and that market shows up a few weeks a year. He’d started during one of those weeks. Testing first would have told him as much, and it would have cost an evening instead of three weeks of frustration.

Write the rules down before testing anything

A strategy living in someone’s head can’t be tested, because it quietly adjusts to whatever the chart just did. Write it as conditions with no room for judgment. Entry condition, exit condition, invalidation level, size. If a rule needs the word usually, it isn’t a rule and the test produces a meaningless number.

The standard is whether someone else could execute it from the page without asking a question. That sounds pedantic until the first ambiguous bar shows up and that choice changes the result. Ambiguity resolved in the moment resolves toward the trade already wanted, which is the bias a test should remove.

Turning a vague idea into if-then lines

Take something like buy the pullback and break it apart. A pullback to what level, measured how, within how many bars of the move before. What invalidates it. What happens if that level gets reached right after the open, when the spread is wide. Each answer removes a place where judgment sneaks back.

Expect the list to grow to a dozen lines and then shrink again. Most conditions turn out to restate one another, and the surviving version is short. A rule set needing fifty conditions isn’t a strategy, it’s a curve fitted to one stretch of history, and it fails when the market changes character.

Manual replay beats an automated backtest at the start

Bar by bar replay in a charting tool is slow, and that’s the feature. Hiding the future and stepping forward one candle at a time reproduces the real problem: deciding without knowing what comes next. An automated test hands over a number. Replay adds the experience of sitting through the ugly stretch.

Run it on a period nobody talks about. Testing on a famous trending year tells you what happened that year. A quiet range bound quarter is more informative, because that’s where most of the calendar lives, and a method that survives boredom without inventing trades beats one that needs a strong move.

Forward testing on a demo, with rules about the demo

Historical testing can’t reproduce execution. Spread widening around news, slippage on a stop order, the platform’s fill behavior right after the open, none of that appears in a replay. A demo period covers it, and only works if the demo balance is close to the real one, because sizing habits don’t transfer otherwise.

A month is the usual minimum, though trade count matters more than the calendar. While the sample builds, reading through trading education resources on order types fills the gaps that testing alone leaves open, particularly around what happens to a pending order during a weekend gap and who absorbs the difference.

Sample size decides what the result means

Twenty trades tell you almost nothing. The spread of outcomes at that count is wide enough that a weak method looks fine and a sound one looks broken. A hundred starts to be informative. That’s an uncomfortable answer for anyone eager to start, and it’s why demo phases get cut short.

If the setup appears twice a week, a hundred trades is most of a year, which nobody will sit through. The workaround is testing the same rules across several similar instruments, or stepping down a timeframe while accepting that costs eat more there. Both are compromises, and both beat deciding on twenty.

Reading the results without flattering yourself

The count of winners is the least useful figure in the report. A method can be right most of the time and still lose ground, if the occasional loss runs several times the size of a typical win. Pair the hit rate with the average size of both sides before forming an opinion.

Then look at the distribution instead of the total. One outsized result carrying the whole test is a warning, not a feature, because it probably won’t repeat and the rest of the sample is what the method produces. Remove the best trade and the worst one, then check whether the shape holds.

Drawdown is the figure that decides

The longest losing run in the test decides whether a specific person can use the strategy. Not whether it works, whether it can be followed. A run of eleven losses is survivable on paper and unbearable in practice, especially in the second week, when the written rules start to feel like a suggestion.

Assume the live version runs worse, because the test never had a bad night’s sleep or a bill due. Size so the worst stretch in the data would stay tolerable at double the length. If that size makes the exercise feel pointless, the strategy isn’t wrong, it’s just wrong for this account.

Leave a Comment

Your email address will not be published. Required fields are marked *