ETF data for backtesting
ETF data comes in four kinds: prices, holdings, flows and net asset value. A price backtest needs the first one, at the resolution it trades on, for funds that closed as well as funds that still trade.
Four kinds of ETF data
| Kind | What it records | Here |
|---|---|---|
| Prices | Trades, quotes and bars from the exchanges, with splits and dividends | Yes |
| Holdings | The securities a fund owns each day | No |
| Flows | Shares created and redeemed each day | No |
| Net asset value | The value of the holdings behind one share | No |
ETF prices here are tick data and bars: every trade, every change in the best bid and ask, and 1-minute, 2-minute, 5-minute, 1-hour and daily bars. Quotes let a backtest pay the spread, which widens before the open and after the close.
7,700+ ETFs and ETNs since 2003
5,700+ of them trade today and 1,900+ are delisted. Each fund covers the dates it traded, and the oldest start in September 2003.
| Symbol | Fund | On file since |
|---|---|---|
| SPY | SPDR S&P 500 | September 10, 2003 |
| QQQ | Invesco QQQ | March 23, 2011 |
| IWM | iShares Russell 2000 | September 10, 2003 |
| GLD | SPDR Gold Shares | November 18, 2004 |
| VXX | iPath S&P 500 VIX Short-Term Futures | May 2, 2019 |
| TQQQ | ProShares UltraPro QQQ | February 11, 2010 |
| ARKK | ARK Innovation | October 31, 2014 |
| BITO | ProShares Bitcoin | October 19, 2021 |
Delisted ETFs and ETNs
Funds close when they lose their assets or their value. A backtest that only knows today’s funds never holds one on the day it fails.
XIV, an inverse volatility note, lost most of its value on February 5, 2018 and was closed that month. A volatility backtest without it misses the event that mattered most. XIV is on file from November 30, 2010 to February 15, 2018.
Leveraged and inverse ETFs
A leveraged or inverse fund aims at a multiple of one day’s move, so its path inside the day matters more than its close. Daily bars hide that path. 1-minute bars and tick data show it.
Many of these funds reverse split again and again. Use adjusted prices to measure a return across a split, and unadjusted prices to see what traded on the day. Prices here come both ways.
ETF ticker changes
Files are keyed by the symbol as it traded on each date. A fund that changed its ticker has its history under both.
QQQ traded as QQQQ from December 2004 to March 2011. Those years are filed under QQQQ.