Quant BuffetRelax, Not Over Thinking

Lesson 2 · 18 min

Market data fundamentals

Prices, bars, adjusted data, and the panels your strategies consume every day.

OHLCVAdjusted closePanels

Every strategy starts with market data — a time series of prices. Quant Buffet's lab uses daily adjusted close for liquid ETFs, loaded through load_daily_prices() and cached on disk.

LayerWhat you getIn Quant Buffet
Exchange / vendorTick-by-tick trades, quotesNot used in lab
Yahoo Finance (yfinance)Daily OHLCVDownloaded via load_daily_prices
Quant Buffet cacheCSV per symbol + date rangebacktest/data_cache/*.csv
Your strategypd.DataFrame panelColumns = ASSETS, index = dates
IndicatorsRolling SMA, returns, z-scoresComputed inside make_on_day

Core vocabulary

TermMeaningExample in lab
Ticker / symbolInstrument codeSPY, TLT, BTC-USD
OHLCV barOpen, High, Low, Close, Volume for one periodOne row per trading day
Adjusted closeClose corrected for splits & dividendsDefault in load_daily_prices
PanelTable: dates × symbolsprices DataFrame in make_on_day
LookbackHistory window for an indicator200-day SMA needs 200 rows

Reading a price panel

# Inside make_on_day — prices is already loaded for your ASSETS
cols = [c for c in ASSETS if c in prices.columns]
close = prices[cols]
daily_return = close.pct_change()
sma_200 = close.rolling(200, min_periods=200).mean()

Common data pitfalls

  • Survivorship bias — testing only assets that exist today ignores delisted names.
  • Look-ahead bias — using future data in today's signal (e.g. full-sample mean).
  • Corporate actions — always prefer adjusted prices for long backtests.
  • Missing IPO history — forward-fill does not invent pre-IPO prices; ready must start after data exists.