Module 1 — Foundations

Time Series — The Quant's Native Language

Markets, returns, and the language of risk. Builds the mental model every quant relies on.

Learning objectives

  • Recognize stationarity and why prices fail it.
  • Understand log returns and why they compose additively.
  • Spot trend, seasonality, and noise in a series.

TEXT

Prices are non-stationary; returns (usually) are stationary

Price levels trend, drift, and have growing variance — they fail every formal test of stationarity. Most statistical methods (regression, ARIMA, t-tests) assume stationary data, which is why nearly every quant works with returns rather than prices. The transformation r_t = ln(P_t / P_{t-1}) is the simplest way to coerce a price series into something well-behaved.

FORMULA

Log returns compose additively

Two-period log return = ln(P_2 / P_0) = ln(P_2 / P_1) + ln(P_1 / P_0)
This is why log returns are preferred for multi-period analysis and aggregating to higher frequencies.

CODE

Decomposing a series

# Conceptually:
# observed[t] = trend[t] + seasonality[t] + noise[t]
# In Python:
import pandas as pd
from statsmodels.tsa.seasonal import STL
result = STL(prices, period=252).fit()
trend, seasonal, residual = result.trend, result.seasonal, result.resid

TEXT

Common pitfalls

• Survivorship bias: indices today only contain firms that survived — backtests on current constituents inflate returns. • Look-ahead bias: using EOD data to trade at the open of that same day. • Stale prices: illiquid securities update on a lag and create fake low volatility.