Guide
How to backtest options strategies
An options backtest is a fill model, a cost model and a sample, run against rules written before the results came in. Get those right and the equity curve describes a trade you could have made.
- 01 Write the rules down first
- 02 Pick the data granularity
- 03 Price fills off the bid and ask
- 04 Charge commission on every contract
- 05 Settle expirations the way the contract does
- 06 Measure returns against an account
- 07 Get enough trades across enough regimes
- 08 Sweep parameters and read the plateau
- 09 Walk forward
- 10 Read the trade log
Step 1
Write the rules down first
A mechanical options strategy is a short list of decisions. Which underlying. Which legs, and how each strike is picked. When to enter, by days to expiration, time of day, frequency and how many positions may be open at once. When to leave, by profit target, stop, time of day, days to expiration or days held. And how much to put on.
If any of those calls for judgment on the day, the backtest is testing a different trader. Write the list before loading any data. Every rule adjusted after seeing a result is a parameter fitted to that result, and step 8 counts those.
In Volatlas
Each of those decisions is a field under Strategies. Strikes are chosen by delta, by percent offset from spot or by absolute strike, and delta is computed from the volatility implied by each quote’s own mid, since neither data vendor ships greeks. A blank exit rule is off.
The account a run is measured against, starting capital, commission per contract and margin model, is saved with the strategy, so a rerun months later reports against the same account.
Step 2
Pick the data granularity
End-of-day chains tell you what a position was worth at the close. That is enough for a rule that enters near the close and exits on days to expiration. It is not enough for anything with an intraday target or stop, because a stop that traded through at 11:00 and recovered by 16:00 never fires on daily data. A strategy that looks calm on closes can be one that was stopped out every week.
The working rule is that the data interval has to be finer than the fastest thing the strategy reacts to. A 45 DTE strangle managed at a 50% target holds up on 15 or 30-minute data. A 0DTE iron condor with a stop at twice the credit needs 1-minute data, and even then the stop can sit between two bars.
The second choice is quotes or trades. A trade bar records prices where contracts printed, and a far out-of-the-money option can go most of a session without printing, so its bar is stale or missing. A quote carries the bid and the ask at every interval whether anything traded or not, and the bid and the ask are what a fill is priced from. Quotes cost more than bars on some roots and less on others, which the historical options data calculator prices root by root.
In Volatlas
Volatlas loads quotes, never trade bars, from Databento or ThetaData at 1, 5, 10, 15, 30 or 60 minutes, and caches every day on your disk as Parquet. A Databento pull keeps the whole 1-minute surface whatever interval you asked for, so a coarser interval later is a disk read rather than a second purchase.
Stops and targets resolve inside the bar. The move from the previous mark is walked a second at a time and the fill is taken at the level itself, while a level first reached across an overnight gap fills where trading resumed.
Step 3
Price fills off the bid and ask
The fill model decides more short-premium backtests than the entry rule does. A multi-leg position crosses one spread per leg to open and again to close, so an iron condor pays the spread eight times on a round trip. Take a hypothetical condor whose four legs each quote $0.10 wide, opened for a $1.00 credit and closed at a 50% profit target, one contract per leg.
| Fill model | Rule | Spread paid | Net of $50 gain |
|---|---|---|---|
| Mid | Every leg fills at the midpoint of its bid and ask | $0 | $50 |
| Halfway | Every leg fills halfway between the mid and the side being crossed | $20 | $30 |
| Natural | Every leg buys at the ask and sells at the bid | $40 | $10 |
Same strategy, same trades, and the winner is worth anywhere from $10 to $50 depending on one assumption. The mid is the optimistic end, where a limit order starts. The natural is the pessimistic end, since a patient combo order can improve on it. Run the strategy at both ends, and if the edge disappears between them, the edge was the fill assumption.
Spreads also move through the day and tend to be wider in the first minutes after the open. A model built on quotes charges each entry the spread at its own minute, where a fixed slippage per contract charges every minute the same.
In Volatlas
Every leg fills halfway between the mid and the side being crossed, at entry and at every exit. A leg that runs to expiry settles at intrinsic and crosses no spread on the way out.
Step 4
Charge commission on every contract
Commission scales with contracts, legs and exits. The condor above trades eight contracts on a round trip, so at an illustrative $0.65 a contract it pays $5.20, which takes the halfway-fill winner from $30 to $24.80. Ten lots pay ten times that.
Use your broker’s all-in figure per contract, exchange and regulatory fees included, taken from a recent statement rather than the pricing page. Charge the closing commission whenever a rule exits early, and leave it off when a short leg expires worthless, because that asymmetry is part of why holding to expiry looks the way it does.
In Volatlas
Commission per contract is part of each strategy and is charged on every contract opened and every contract closed. A leg that expires settles with no closing commission, and the trade log carries each trade’s commission as its own column.
Step 5
Settle expirations the way the contract does
Exercise style splits the market in two. SPX, XSP, NDX and RUT options are European-style and cash-settled, so they cannot be assigned before expiry and settle to cash at expiry. SPY, QQQ, IWM and single-name options are American-style and physically settled, so a short leg can be assigned on any day and turns into shares.
Early assignment follows the arithmetic of the long holder. A short call in the money ahead of an ex-dividend date is at risk when its remaining extrinsic value is less than the dividend, because exercising captures the dividend. A deep in-the-money short put with almost no extrinsic value left is at risk any day. A backtest that ignores both keeps a spread intact that the account would have held as a share position overnight. Either check those conditions each session, or add a rule that closes short legs before they reach them and test with the rule on.
Settlement time matters on index monthlies. Standard third-Friday SPX options stop trading on Thursday and settle to a special opening quotation on Friday morning, so a position held into expiry carries an overnight gap the weeklies do not. SPXW weeklies trade until the close. Daily SPXW expirations only exist since 2022, when Cboe added Tuesday and Thursday expiries in April and May of that year, so a 0DTE rule run on every weekday before then trades on Monday, Wednesday and Friday only.
In Volatlas
Every expiring leg settles at intrinsic. Weeklies and equity options trade to the 16:00 close of their expiry date and settle there. The standard monthly index roots, SPX, NDX and RUT, stop trading the evening before and settle against the expiry morning’s opening print. Which convention applies is read off the root the chain was loaded for.
Early assignment is not modelled. On American-style roots a short leg runs until its exit rule or its expiry, so pair those strategies with a time or DTE exit, or test the structure on a European index root.
Step 6
Measure returns against an account
Profit per trade says little until it is divided by the capital the trade tied up. A credit spread holds its width less the credit. A naked short holds a Reg T formula that grows as the underlying moves against it. CAGR and maximum drawdown mean something only when they are percentages of an account that had to post that margin.
Margin also decides which trades happen. A ladder of 0DTE credit spreads entered every 15 minutes can need more buying power than the account has by midday, and a backtest that fills the entries anyway is reporting the returns of a bigger account.
In Volatlas
Every open position is charged what a broker would hold against it. Covered structures are charged their own worst settlement, so an iron condor holds the worse of its two wings rather than both. Uncovered shorts follow the Reg T rule at 15% of the underlying for a broad-based index and 20% for an equity, and a cash-secured model is there for accounts that trade that way.
An entry the free capital cannot carry is skipped and counted in the summary. Size by fixed contracts or by a share of the account, which follows realised capital as it moves, and the equity curve marks every open position at every bar so drawdown includes the losses still open.
Step 7
Get enough trades across enough regimes
Count trades, not years. A daily 0DTE rule produces around 250 trades a year. A 45 DTE rule entered monthly produces twelve, so a decade of history gives it about 120.
The uncertainty is plain arithmetic. A win rate of 80% over 50 trades carries a standard error of about 5.7 points, which puts the plausible range at roughly 69% to 91%. Over 250 trades the same 80% narrows to about 75% to 85%. Short premium makes this harder, because its average is set by a handful of large losses, and a sample with none of them in it has not tested the strategy at all.
So the window has to include the bad stretches. February 2018, March 2020, the 2022 bear market and August 2024 each moved volatility far enough to break a strategy sized for calm. A test that starts after the last shock is a test of the recovery. Deeper history costs more, and the data cost calculator prices the window before you commit to it.
In Volatlas
The summary leads with trades, wins and losses, then win rate, average win and loss, profit factor, CAGR, maximum drawdown in dollars and percent, the most margin used, and skipped entries. Databento OPRA history opens in April 2013, and ThetaData reaches four years back on its $40 tier and twelve on its top one.
Step 8
Sweep parameters and read the plateau
A parameter sweep runs the same strategy across a grid of values, such as short delta against profit target. It is the fastest way to learn which settings matter and the fastest way to fool yourself, because the best of a thousand cells is the best of a thousand draws and some of its result is luck.
Read the shape of the grid rather than its peak. A single bright cell surrounded by losers is noise. A broad region where neighbouring values all do about as well describes the market, and that region is where the parameters belong, taken from its middle rather than its best corner. Keep a count of every cell tried across every sweep, because that count is how much luck the final pick had to work with. Two axes at a time keep the grid readable, and a third is usually better spent as a second sweep.
In Volatlas
A sweep puts axes on entry DTE, entry time, profit target, stop, exit time, exit DTE, maximum days in trade, size and any leg’s strike, expands them into a grid of up to 10,000 cells and runs it in parallel on your cores against the cached chain. The result is a heatmap, and the grid exports as CSV with one row per cell.
Since the chain is already on disk, the hundredth grid costs what the first one did. The published sweeps show the whole grid next to the trade log that produced it.
Step 9
Walk forward
Walk-forward testing separates choosing parameters from judging them. Pick a window, for example two years, and sweep it. Freeze the parameters from the plateau. Run them untouched on the six months that follow. Then slide both windows forward six months and repeat until the data runs out.
The out-of-sample segments joined end to end make the only equity curve the optimisation never saw. If it looks like the in-sample results, the plateau was real. If it falls apart, the sweep found noise. Keep a final stretch of history out of every sweep and run it once, at the end, as the last check before trading the strategy.
In Volatlas
There is no walk-forward button. Sweep the in-sample window, freeze the parameters from the plateau, load the next window and run a single backtest on it. Windows already in the cache reload without a download, and each segment’s trade log exports to CSV for stitching.
Step 10
Read the trade log
Summary statistics compress away the mistakes. Open ten trades at random and check each leg’s fill against the chain at that minute. Then open the ten worst and ask whether the stop fired where the rules say it should have. Sort by exit reason, since a strategy that mostly exits on its time stop is a different strategy from the one designed around its profit target.
Skipped entries deserve the same attention. A rule that skipped a third of its signals for lack of margin is reporting the returns of the two thirds it could afford.
In Volatlas
The trade log gives each leg its own columns, strike, expiry, entry price and exit price, beside the exit reason, the commissions, the margin held and the P&L. The log, the equity curve, the summary and the sweep grid all export to CSV.
Common questions
Backtesting options
- How many trades does an options backtest need?
- Enough that the statistic you care about stops moving when you add more. A win rate of 80% over 50 trades has a standard error of about 5.7 points, so the plausible range runs from roughly 69% to 91%. Over 250 trades the same 80% narrows to about 75% to 85%. A daily 0DTE rule reaches 250 trades in a year, a monthly 45 DTE rule needs about two decades to get there.
- Should an options backtest fill at the mid price?
- Only as the optimistic case. The mid is where a limit order starts, and a multi-leg order crosses four spreads to open and four more to close. Fill each leg somewhere between the mid and the natural, and treat a strategy whose edge disappears between those two prices as a bet on the spread.
- Can I backtest options strategies for free?
- On end-of-day data, yes. Free data sources cover closes, trade bars and samples, which is enough to rank an idea that enters and exits near the close. Intraday stops and targets need bid and ask quotes at the minute, which are paid data, though Databento's $125 of credit on a new account covers about five months of 1-minute SPXW quotes.
- What is walk-forward testing for options?
- Choosing parameters on one stretch of history, freezing them, and running them untouched on the stretch that follows, then sliding both windows forward and repeating. The out-of-sample segments joined together are the only equity curve the optimisation never saw.
- Does Volatlas model early assignment?
- No. Every leg runs until an exit rule closes it or it settles at intrinsic on its expiry, AM or PM by the root's own convention. On European-style index roots such as SPX, XSP, NDX and RUT that matches the contract. On American-style roots such as SPY, QQQ and single names, pair short legs with a time or DTE exit, or read the result as the case where nobody exercised early.
- Does Volatlas have a walk-forward mode?
- Not as a single button. You sweep one window, freeze the parameters from the plateau, load the next window and run one backtest on it. Cached windows reload without a download, so each segment costs a run rather than a data bill.
Run the method on your own data
Volatlas builds the rules, charges the fills, commission and margin, and sweeps the grid on your own machine, against quotes from Databento or ThetaData billed to your own account. $49 once, with lifetime updates.