Skip to content
QuantWright

Market data

Which markets you can backtest, how far back a test reaches, and what the data does and does not include.


What runs today

  • US stocks and ETFs on daily bars, split-adjusted, as total returns (cash dividends credited on each ex-date): about 7.9 years per test by default, and all daily history with Max.
  • US stocks at 1 minute to 4 hours, from IEX exchange prints only: a small slice of US volume, so thin on anything but large names.
  • Spot crypto pairs (BTCUSD, ETHUSD, SOLUSD…) at 1 minute to daily, aggregated across exchanges.
  • Spot FX pairs (EURUSD, USDJPY…) at 1 minute to daily, without volume.
  • Spot gold and silver (XAUUSD, XAGUSD) at 1 minute to daily, without volume: Sunday 18:00 to Friday 17:00 New York, closed 17:00–18:00 each day.

Not available

  • CME futures, paused while we finalise the data licence with the exchange.
  • Options chains and tick prints: the commands exist but need a data plan we do not carry.

A backtest trades one symbol. Name several symbols and the same rules run on each as separate accounts, side by side. A portfolio (a rotation, an equal-weight or fixed-weight basket, a top-N by a ranking) runs as one account on daily bars, up to 10 symbols: rebalanced at a period's last close, traded at the next open, with costs on every traded dollar. The symbols are the ones you name, so survivorship is not checked.

Company financials from SEC filings are a lookup, not a backtest: /fundamentals AAPL.

Bar sizes and how far back a test reaches

Every market runs on 1-minute, 5-minute, 15-minute, 30-minute, hourly, 4-hour and daily bars. A test is sized in bars, so how many years it covers depends on the bar size and on the market’s hours: a US stock session is 6.5 hours, FX trades 24 hours on weekdays, and crypto never closes.

1-hour and 4-hour bars are built here from finer bars by the clock, never by counting rows:

  • US stocks and ETFs, 1 hour: 1-hour bars from the 09:30 New York open, built from 30-minute bars: 09:30, 10:30 … 15:30, the last a half hour to 16:00 (four on 13:00-close days).
  • US stocks and ETFs, 4 hours: 4-hour bars from the 09:30 New York open: 09:30–13:30, then a 2.5-hour 13:30–16:00 bar (one 3.5-hour bar on 13:00-close days).
  • Spot crypto, 4 hours: 4-hour bars on the UTC clock, starting 00:00, 04:00, 08:00, 12:00, 16:00 and 20:00, built from 1-hour bars.
  • Spot FX, gold and silver, 4 hours: 4-hour bars on the UTC clock, starting 00:00, 04:00, 08:00, 12:00, 16:00 and 20:00, built from 1-hour bars; the week’s first and last bars hold only the hours the market is open.

Auto is the default window, a fixed number of bars for each bar size (the last column of the tables below), so the years it covers differ by bar size and market. The History depth control in the Backtest tab sets a longer or shorter one: 6 months, 1, 2 or 5 years, or Max (up to 10 years on intraday bars, less where the data starts later or one run's limit comes first, and all daily history on daily bars). One run holds at most 200,000 bars, so on the finest bars the longest setting stops there; and a market’s history may start later than the setting asks for. The control says before a run what it will test. To test one result’s code over another window, use the Period buttons on its card or /period.

Before each window, bars from before its first bar are run so the strategy’s indicators have history when it opens: at least 300, enough for a 200-bar average, and at least a week of bars on fine timeframes. No trade is placed on them and no figure counts them; the result card says how many there were. Where the data has no earlier bars, a long lookback still leaves the window’s first bars idle.

US stocks and ETFs
Bar sizeAuto (default)Longest settingBars in the default window
1 minuteabout 2 yearsabout 2 years (one run’s limit)200,000
5 minutesabout 5.1 yearsabout 9.3 years (all the history there is)100,000
15 minutesabout 3.1 yearsabout 9.3 years (all the history there is)20,000
30 minutesabout 4.6 yearsabout 9.3 years (all the history there is)15,000
1 hourabout 6.8 yearsabout 9.3 years (all the history there is)12,000
4 hoursabout 9.3 years (all the history there is)about 9.3 years (all the history there is)6,000
Dailyabout 7.9 yearsall daily history2,000
Spot crypto
Bar sizeAuto (default)Longest settingBars in the default window
1 minuteabout 4.6 monthsabout 4.6 months (one run’s limit)200,000
5 minutesabout 11 monthsabout 1.9 years (one run’s limit)100,000
15 minutesabout 6.8 monthsabout 5.7 years (one run’s limit)20,000
30 minutesabout 10 monthsabout 10 years15,000
1 hourabout 1.4 yearsabout 10 years12,000
4 hoursabout 2.7 yearsabout 10 years6,000
Dailyabout 5.5 yearsall daily history2,000
Spot FX
Bar sizeAuto (default)Longest settingBars in the default window
1 minuteabout 6.4 monthsabout 6.4 months (one run’s limit)200,000
5 minutesabout 1.3 yearsabout 2.7 years (one run’s limit)100,000
15 minutesabout 9.6 monthsabout 6.9 years (all the history there is)20,000
30 minutesabout 1.2 yearsabout 6.9 years (all the history there is)15,000
1 hourabout 1.9 yearsabout 6.9 years (all the history there is)12,000
4 hoursabout 3.8 yearsabout 6.9 years (all the history there is)6,000
Dailyabout 6.9 years (all the history there is)about 6.9 years (all the history there is)2,000

Spans are approximate. US stock intraday history starts in August 2017. No FX bar is older than January 2020, and each pair or metal reaches back only as far as its own history (spot gold’s intraday bars start in August 2020); so does a crypto pair.

US stocks and ETFs

Prices are split-adjusted, daily and intraday, so a 4-for-1 split does not read as a 75% crash. Returns are total returns: the data vendor’s cash dividend is credited to a position held into each ex-date, on that date, and a short position pays it. Fills stay at the prices that traded; the dividend-adjusted price series is not used, because it moves every earlier price by every later dividend. An intraday position held overnight into an ex-date is credited the same way. Each result card says “total return: dividends credited on the ex-date”, with the dividends as a share of the starting account, or “price return” when a run could not include them.

Short borrow fees are not charged; dividends owed on shorts are, on each ex-date. A short stock position pays a borrow fee while it is open, so a short’s return here is better than the same trade at a broker, most for a long hold or a stock that is hard to borrow. A run that took short trades says how many.

Intraday bars are built from trades on the IEX exchange only. IEX is a small share of US volume, so volume on these bars is a fraction of all trading, prices can differ slightly from the consolidated market, and bars on anything but large, liquid names are thin.

Intraday stock tests use the regular session only, 09:30 to 16:00 New York time. Market holidays and the afternoons after an early close (13:00) are removed, so a strategy cannot trade on bars from a day the exchange was shut.

Spot crypto

Spot pairs such as BTCUSD and ETHUSD, with prices aggregated across exchanges. Crypto trades around the clock, so there is no session filter. Positions are held in fractions of a coin, to one hundred-millionth, so a position sized as a share of equity buys that share whatever one coin costs.

Spot FX

Spot pairs such as EURUSD and USDJPY, each from its own first bar, none before January 2020. FX bars carry no volume, so a rule that reads volume has nothing to read on an FX pair.

Overnight financing (swap) is not charged: there are no sourced swap rates to charge. A run whose trades were held through the 17:00 New York rollover says how many were, and that its returns leave financing out. On a multi-week hold, or at leverage, that can be a large part of the result.

Spot gold and silver

XAUUSD and XAGUSD, spot prices in dollars per ounce, from the same source as FX, without volume, each from its own first bar: spot gold’s intraday bars start in August 2020. They trade from Sunday 18:00 to Friday 17:00 New York time with a break from 17:00 to 18:00 each day, and bars in the break or over the weekend are removed. Positions are whole ounces (a dealer’s smallest gold trade is usually 0.01 lot, one ounce). With no costs stated, a run charges no commission and 1bp a side on gold, 4bp a side on silver, for the dealer’s spread. Gold and silver futures (GC, SI) are CME futures, which are paused.

SPY or QQQ as a proxy for ES or NQ

While CME futures are paused, a regular-hours ES or NQ strategy can run on the ETF that tracks the same index: SPY for ES and MES, QQQ for NQ and MNQ. It runs only when you ask for it, for example “use SPY as a proxy for ES”, and the result is the ETF’s, labelled “SPY (as a proxy for ES, regular hours)”, never an ES result.

  • Distances in points or ticks become ETF dollars at the pair’s fixed ratio (points ÷ 10 for SPY, ÷ 41 for QQQ), so a 10-point stop is 10 index points at every signal, and are shown for you to confirm before anything runs.
  • Rules that need futures hours or futures data are refused by name: overnight or Globex highs and lows, times between 16:00 and 09:30 New York, gaps from the settlement price, and futures volume.
  • A contract count you state becomes a share count, shown for you to confirm: 1 ES is about the notional of 500 SPY shares, 1 NQ of 820 QQQ shares, 1 MES 50 and 1 MNQ 82. With no count stated, size is a percent of equity. US-stock leverage limits apply, not futures margin.
  • A prop-firm simulation applies the firm’s dollar-per-contract rules to the ETF’s percent returns scaled to the account, so its pass probability is the ETF’s.

Default trading costs

A run always charges commission and slippage. When your description states none, it charges these, by market. Commission is for the round trip; slippage is charged on each side, on entry and again on exit.

MarketCommission (round trip)Slippage (per side)
US stocks and ETFs0.5 bp1 bp on daily bars, 2 bp intraday
Spot crypto20 bp5 bp
Spot FX0.2 bp0.5 bp on daily bars, 1 bp intraday
Spot gold0 bp1 bp
Spot silver0 bp4 bp

1 bp (basis point) is 0.01% of the value traded. The crypto commission is a 10 bp (0.1%) taker fee on each of the two fills.

State your own costs and they replace these. A percent or basis points works anywhere. A commission can also be stated per share (“$0.005 per share”, charged at each fill’s share count), a spread on gold or silver per ounce (“a spread of 25 cents per ounce”), and an FX spread in pips (“a 1-pip spread”). FX swap, the overnight financing, is never charged.

Survivorship

A test runs on symbols that trade today. Companies that were delisted or acquired are not in it, which tends to flatter strategies that pick stocks from a list.

Why prices and price charts are not shown

The licence for this market data lets us show you results derived from it, not the data itself. So a run on stock, ETF, crypto or FX data shows what the strategy did as totals for the whole run, such as net return, drawdown and win rate, and whether each trade won or lost. It does not show the prices it traded at, and not what each trade or each month made (below).

  • No candlestick or price charts.
  • No entry, exit, stop or target prices in the trade list, and no unit counts that would reveal them.
  • No buy-and-hold line drawn on the price.
  • No equity or drawdown chart, no buy-and-hold return, no single trade’s return and no month-by-month grid: these are withheld under the same licence. The card says whether the run beat buy-and-hold over its window, each trade says whether it won or lost, and the months and years are summarised: how many were up and down, the median, the best and the worst.
  • A price that appears in a reply or an error is replaced with “(price withheld)”.

A trade’s own profit and loss, in percent or in dollars, is not shown: with the trade’s size or dates it would give away the prices. Totals for the whole run (gross profit, gross loss, costs paid) are shown in dollars, except where every trade is the same size, as with a single trade, or costs are charged per unit; the card says so there. See the Legal & disclaimers page for the data sources.

Not answered here? Write to us through the Support page.

Market data — QuantWright Help