Skip to content

Backtesting

Backtesting is the process of running a trading strategy against historical market data to see how it would have performed in the past. Instead of risking real money on an untested idea, you let the data tell you whether your logic holds up across different market conditions — bull runs, crashes, sideways chop, and everything in between.

Every successful systematic trader backtests. It is the closest thing to a laboratory experiment that financial markets offer.

A strategy might sound great on paper. “Buy when RSI drops below 30 and sell when it crosses above 70” — simple, logical, and easy to reason about. But does it actually make money? How much does it lose during drawdowns? How often does it trade? Would you have been comfortable holding through its worst stretch?

Backtesting answers these questions with data, not guesswork. It lets you:

  • Validate your ideas before putting capital at risk.
  • Measure risk and reward with concrete numbers like maximum drawdown, Sharpe ratio, and profit factor.
  • Compare strategies side by side under identical conditions.
  • Identify weaknesses — maybe your strategy crushes it in trending markets but bleeds during consolidation.
  • Build confidence in your approach so you can stick with it when real money is on the line.

Backtest results depend on the data, instruments, and execution assumptions you choose. Stratifyre makes those inputs and the decisions they produce easier to inspect:

  • Institutional-grade data — 20+ years of clean, adjusted historical data across 10 asset classes, powered by Databento and Binance. Tick-level precision where you need it, daily bars where you don’t.
  • Realistic execution modeling — configurable slippage, volume constraints (your order won’t magically absorb more than 10% of a bar’s volume), partial fills, and margin validation. Four different fill simulation modes let you stress-test your assumptions.
  • Corporate-action continuity — model holdings through splits, ticker changes, and supported cash, stock, or mixed mergers using declared terms. See Corporate Actions for coverage limits.
  • Point-in-time universes — test the S&P 500 with its members at the time, on supported ranges, or use a static portfolio. Keep the original membership and action reference data on reruns. See Baskets and Universes for coverage, licensing, and price-data limits.
  • Visual Strategy Replay — step through your backtest bar by bar to inspect market data, triggered conditions, and strategy decisions.

Running a backtest in Stratifyre follows a straightforward loop:

  1. Build your strategy — Use the Strategy Builder to define your entry rules, exit rules, and risk management logic.
  2. Configure the backtest — Choose your asset(s), date range, starting capital, execution mode, fill simulation, and slippage settings.
  3. Run the backtest — Hit the run button and watch the engine process your strategy against the historical data.
  4. Analyze results — Review the equity curve, performance metrics, and trade log to understand how your strategy performed.
  5. Debug with Strategy Replay — Step through individual trades to see exactly why each decision was made.
  6. Refine and repeat — Adjust your rules, tweak parameters, and run another test.

This cycle of build-test-debug-refine is where trading edge is developed. Most traders go through it dozens or hundreds of times before settling on an approach they trust.

Stratifyre supports backtesting across a wide range of markets and time horizons:

Asset Classes: US Equities (NYSE, NASDAQ, AMEX), ETFs (3,000+), Futures (CME, CBOT, NYMEX, COMEX, ICE) with continuous contracts, Options, Cryptocurrencies (24/7 markets), Forex, Commodities, Indices, ETNs, and Mutual Funds.

Time Resolutions: Tick-level data (TBBO), 1-second, 1-minute, 5-minute, 10-minute, 15-minute, 30-minute, 60-minute, and daily bars.

History: 20+ years of data for major symbols, with extended trading hours support for pre-market and after-hours sessions.

  • Running a Backtest — Step-by-step guide to configuring and launching your first backtest.
  • Baskets and Universes — Historical membership, static portfolios, saved reference data, and availability checks.
  • Understanding Results — How to read the results page, interpret the equity curve, and make sense of the numbers.
  • Time Traveling — Deep dive into Stratifyre’s interactive Timeline Slider for debugging backtests.
  • Performance Metrics — Reference for all 70+ metrics, organized by category with interpretation guidance.
  • Walk-Forward Analysis — Test whether optimized parameters hold up on unseen data to prevent overfitting.
  • Segmented Performance — Break down backtest results by sector, direction, or 10 other dimensions.
  • Monte Carlo Simulation — Stress-test your strategy with randomized scenarios to gauge robustness.
  • Execution Modeling — How Stratifyre simulates real-world order fills, slippage, and volume constraints.
  • Corporate Actions — Supported splits, distributions, and merger settlements, with coverage limits.
  • Tax Analysis — US tax analysis features including wash sale detection, tax lot optimization, and after-tax equity curves.