Quant Buffet API

Universes & whitelist

Named ETF books and the 81 symbols the sandbox will accept in ASSETS.

`backtest.universes` defines liquid ETF proxies for equities, sectors, countries, bonds, commodities, real estate, volatility, and crypto. Only symbols in `WHITELIST` can appear in ASSETS — currently 81 tickers.

Named books

ConstantContentsTypical use
US_EQUITYSPY, QQQ, IWMCore US beta
US_SECTORSXLB, XLE, XLF, XLI, XLK, XLP, XLU, XLV, XLYNine-sector rotation
US_SECTORS_FULLUS_SECTORS + XLC, XLREAll 11 sectors (short history)
GLOBAL_EQUITYSPY, EFA, EEM, VGK, EWJ, FXICross-region momentum
COUNTRY_DM15 developed-market ETFs (EWA … EWY)Country momentum
COUNTRY_EM13 emerging-market ETFs (EWZ … ASHR)EM rotation
BONDSSHY, IEF, TLT, LQD, HYG, TIP, BNDDuration and credit ladder
CREDITLQD, HYG, AGG, BILCredit spread work
COMMODITIESGLD, SLV, DBC, GSG, USO, UNG, DBAInflation and crisis hedges
REAL_ESTATEVNQ, IYR, RWXREIT exposure
MULTI_ASSETSPY, EFA, EEM, VNQ, DBC, GLD, TLT, IEF, HYGBalanced allocation research
RISK_ON_OFFSPY, QQQ, TLT, IEF, GLD, BILOffence / defence switching
VOL_PROXYSPY, BIL, VIXY, SVXYVolatility strategies
CRYPTO_PROXYBTC-USD, ETH-USDCrypto momentum
FX_SAFESPY, EFA, EWJ, GLD, TLTDollar-sensitive mix

The complete whitelist

GroupSymbols
US broadSPY, VOO, VTI, QQQ, IWM, DIA, MDY, RSP, OEF
Global broadACWI, ACWX, URTH, VEA, VWO, EFA, EEM, VGK
US sectorsXLB, XLC, XLE, XLF, XLI, XLK, XLP, XLRE, XLU, XLV, XLY
Developed countriesEWA, EWC, EWD, EWG, EWH, EWI, EWJ, EWK, EWL, EWN, EWP, EWQ, EWS, EWU
Emerging countriesEWY, EWZ, EWT, FXI, ASHR, EIDO, THD, EPHE, ECH, EPOL, EZA, ARGT, TUR
Rates & creditBIL, SHV, SHY, IEI, IEF, TLT, TIP, MBB, AGG, BND, LQD, HYG
CommoditiesGLD, SLV, DBC, GSG, USO, UNG, DBA
Real estateVNQ, IYR, RWX
VolatilityVIXY, SVXY
CryptoBTC-USD, ETH-USD

Using a book in ASSETS

python
from backtest.universes import US_SECTORS, BOOKS, WHITELIST

# Books are plain lists — slice, extend, or combine them
ASSETS = list(US_SECTORS) + ["TLT", "GLD", "BIL"]     # 12 symbols

# BOOKS maps short keys to lists, used by the catalog generator
ASSETS = list(BOOKS["risk_on_off"])                    # 6 symbols

# Verify before running
bad = [s for s in ASSETS if s not in WHITELIST]
assert not bad, f"Not whitelisted: {bad}"
assert len(ASSETS) <= 15

History caveats worth remembering

SymbolConstraint
XLCLaunched June 2018 — truncates any long sector test
XLRELaunched October 2015
SVXY, VIXYPost-2011, and SVXY changed its leverage mandate in 2018
BTC-USDData begins around September 2014
ETH-USDData begins around November 2017
USO, UNGFutures-based: the fund's own mandate has changed over time