Before you backtest, make the strategy precise
Xavi ·
“Sell premium when volatility is high” is an idea. It is not a strategy yet.
A person can fill in the gaps while reading that sentence. A backtest cannot. It needs to know what “high” means, which premium to sell, when to enter, how much to trade, and when to get out.
This is where a lot of backtests go wrong. The trader begins with a fuzzy idea, makes decisions while looking at the results, and ends with a beautifully tested strategy that never existed before the test.
Write the rules first.
Start with the reason
Give the idea one plain-English sentence:
I want to test whether a defined-risk short-premium position entered after the opening volatility settles has historically benefited when implied volatility is elevated.
That sentence is not meant to sound scientific. It gives you a fence. When you later consider adding a moving-average filter or excluding Thursdays, you can ask whether the change belongs to the original idea or merely repairs an ugly part of the chart.
Both kinds of changes can be tested. They should not be confused.
Define exactly when the strategy can act
Write down the market time zone, eligible days, expiration range, entry time or window, and the latest permitted entry.
“After the open” could mean 9:35, 10:00, or any time before lunch. Those are different strategies. If the entry condition stays true for 20 minutes, decide whether the strategy enters once, on the first occurrence, or repeatedly.
Also define what cancels the setup. Perhaps the strategy skips the day if no contract matches by 10:15. That skip is part of the rule, not an error to patch later.
Make contract selection repeatable
Options traders often choose contracts by feel. The chain looks a little wide, the next strike has better open interest, or the credit seems too small. A historical test needs a rule it can apply without hindsight.
You might select:
- the contract nearest a target delta
- the first strike inside a delta band
- a fixed distance from the underlying
- an at-the-money strike
- a long wing a set number of points from the short strike
Now decide what happens when no contract fits. Skip the trade? Use the closest available contract? Widen the acceptable range?
Do not leave that decision to whichever choice produces the nicer result.
Position size is part of the strategy
A one-contract backtest can help you understand the trade shape, but it says little about the account experience.
Choose whether size stays fixed, changes with account equity, or depends on a defined risk amount. Set a maximum. For multi-leg positions, calculate the exposure of the whole structure rather than treating collected credit as the amount at risk.
Sizing rules can create feedback. A strategy that scales after gains will take its largest positions late in a strong historical run. The same formula will also reduce size after losses. Inspect both effects instead of assuming compounding is automatically helpful.
Write every exit before the first run
A position needs an answer for profit, loss, time, and expiration.
If you use a profit target, define the reference value. Is it a percentage of entry credit, a dollar amount, or an option price? If you use a stop, state when it is checked and what order assumption follows the trigger.
Time exits need the same precision as entries. “Near the close” is not enough. A five-minute difference can matter when gamma is high.
Think about the awkward cases too. What happens if the exit signal occurs when the spread is unusually wide? What if one leg has no usable quote? The simulator will need a policy, and that policy can affect the result.
Add execution assumptions to the specification
The strategy is still incomplete until you choose how simulated orders fill.
Midpoint fills are convenient. They can also be generous. A marketable order may trade closer to the unfavorable side of the spread, while a patient limit order may never fill.
Choose a base assumption for slippage and commissions before seeing the result. Later you can compare more optimistic and more conservative cases without changing the trading rules.
The one-page strategy spec
Before running anything, your draft should answer these questions:
- What market behavior are you testing?
- Which underlying and option structure will you use?
- When can the strategy enter?
- How are expiration and strikes selected?
- What causes the strategy to skip a trade?
- How is size calculated and capped?
- What closes the position?
- How are fills, slippage, and commissions modeled?
If an answer is “I will know it when I see it,” the rule is not ready for a reproducible backtest.
StratVerra’s AI-assisted strategy creation and no-code builder can turn this specification into a working strategy without requiring you to write code. Review the generated rules anyway. The tool can express your assumptions, but it cannot decide whether they are sensible.
Next, we will look at the material underneath the test: the historical options data itself.