Backtesting
Test strategies against historical data
What backtesting does in Optionomics
Backtesting lets you replay simplified rules against stored history: when a flow or chain condition would have triggered, what profit-and-loss path a defined options strategy might have had over a window, how chain metrics (IV rank, Greeks, etc.) aligned with forward returns under explicit assumptions—or how an AI Trade Idea model’s historical signals would have resolved.
It is a laboratory, not a live trader: fills are modeled, liquidity and slippage may be abstracted, and corporate actions, halts, or margin changes may not mirror your broker one-for-one. Use results to compare ideas, kill bad rules, and calibrate expectations—not to prove a strategy “works” forever.
Availability: Vega plan ($99/month)
Important: All backtesting output is hypothetical. Past performance—simulated or real—does not guarantee future results. Always paper-trade or size small when promoting a rule from backtest to production.
Four Backtesting Engines
| Engine | What It Tests |
|---|---|
| Flow Backtesting | React to unusual options activity signals |
| Strategy Backtesting | Multi-leg strategies (spreads, condors) |
| Chain Backtesting | Signals from chain metrics (IV rank, Greeks) |
| Trade Idea Backtesting | Replay an AI Trade Idea model and score its signal outcomes |
Flow Backtesting
Test strategies that trigger on unusual activity.
Flow Types
| Type | Description |
|---|---|
| Whale Activity | Large premium trades |
| Aggressive Buying/Selling | Ask/bid-side urgency |
| Volume Spike | High volume vs open interest |
| IV Spike | Unusual IV increases |
| Sweep Activity | Multi-exchange sweeps |
| Unusual Score | ML-driven scoring |
Parameters
- Stock: Symbol to test
- Date Range: Test period
- Position Size: % of portfolio (max 25%)
- Holding Period: Days to hold (1-30)
- Min Score: Unusual score threshold
- Stop Loss / Take Profit: Risk management
Strategy Backtesting
Test defined options strategies.
Available Strategies
| Category | Strategies |
|---|---|
| Single-Leg | Long Call, Long Put |
| Vertical Spreads | Long/Short Call Spread, Long/Short Put Spread |
| Iron Strategies | Iron Condor, Iron Butterfly |
| Income | Covered Call, Cash Secured Put |
| Volatility | Long/Short Straddle, Long/Short Strangle |
Parameters
- Strategy: Select from list
- DTE Range: Days to expiration for entries
- Width: Strike width for spreads
- Min IV Rank: Entry threshold
- Position Size: % of portfolio
- Stop Loss / Take Profit: Risk management
Chain Backtesting
Create signals from option chain metrics.
Available Metrics
| Category | Metrics |
|---|---|
| Volatility | IV Rank, IV Percentile, VIX 30D Rank, IV Skew Z-Score |
| Put/Call | P/C Volume, P/C Premium, P/C Open Interest |
| Greeks | Net Gamma, Net Delta, Total GEX |
| Advanced | Tail Risk, Max Pain Distance |
Example Rule
Enter when IV Rank > 50, exit when IV Rank < 30.
Trade Idea Backtesting
Replay an AI Trade Idea model—momentum, mean reversion, earnings drift, whale flow, IV crush, volume breakout, and more—over a historical window and see how its signals would have resolved. The replay uses the same user-visible model controls and comparable settings, so you can study how that style of signal behaved without manually rebuilding every rule.
This engine answers a different question than the other three. Instead of “how would my rule have done?”, it asks “how reliable has this model been—overall, on my symbols, and in the regime I care about?” Use it to decide which models deserve a place in your workflow and which trade idea alerts are worth turning on.
Open it: Sidebar → Backtesting → Trade Ideas (also at /backtest/trade_ideas).
Setup
| Field | What it controls |
|---|---|
| Trade Idea Model | Which model to replay; only backtestable models appear |
| Universe | All eligible symbols (range capped at 180 days) or selected symbols (up to 250 symbols, range up to two years) |
| Date Range | The historical replay window |
| Model controls | The filters and thresholds exposed for the selected model |
Backtests run in the background; the results page updates live as the run progresses, and every finished run has a Rerun button that pre-fills its settings so you can tweak one knob at a time.
How outcomes are scored
Each replayed signal is evaluated over the model’s forward window using strategy-aware rules:
- Ideas with option legs are scored on the option structure’s return (the spread or contract, not just the stock).
- Underlying-only ideas are scored on the directional move of the stock against the idea’s target and stop.
- Range strategies (for example an IV-crush iron condor) win by the underlying staying inside the range—there is no percentage target to hit.
Every signal resolves to win, loss, or skipped (not enough data to evaluate fairly). Win rate counts resolved signals only—wins / (wins + losses)—so skipped signals are reported separately rather than silently dragging the number down.
What you get back
- KPI row — win rate, total signals, evaluated, wins, losses, skipped.
- Performance summary — win/loss/skip split, average signal score, average days to win, signals per day, and the best-performing symbol.
- Charts — outcomes by month, win rate by score band (do higher-scored signals actually win more?), win rate by symbol, and skipped reasons.
- Outcomes by symbol — a sortable per-ticker table of signals, wins, losses, and win rate.
- Signal log — every replayed signal with its outcome, so you can audit individual calls instead of trusting an aggregate.
The score-band chart is the one to check first: a healthy model shows win rate rising with score, which tells you the model’s confidence means something and that filtering your alerts by minimum confidence is worthwhile.
Performance Metrics
After a flow, strategy, or chain backtest:
| Metric | Description |
|---|---|
| Total Return | Overall % return |
| Win Rate | % profitable trades |
| Max Drawdown | Largest decline |
| Sharpe Ratio | Risk-adjusted return |
| Profit Factor | Gross profit / gross loss |
| Avg Holding Days | Time in positions |
Charts
- Equity Curve: Portfolio value over time
- Drawdown Chart: Decline periods
- Monthly Returns: Performance by month
- P&L Distribution: Trade outcomes
Trade History
Every trade logged with entry, exit, P&L, and exit reason.
Best Practices
- Conservative position sizes: 5-10%
- Always set stop losses
- Test multiple time periods
- Consider transaction costs (not included)
- Validate out-of-sample: Don’t overfit
Limitations
- Historical data availability varies
- Results assume theoretical execution
- Liquidity constraints not modeled
- Commissions/slippage not included
Remember: Backtesting is educational. It shows what might have happened, not what will happen. Paper trade before using real capital.
Related: Historical Analytics · Unusual Activity · Trade Ideas