// 13 — math for finance

Math for Finance — Roadmap

51 topics on the math behind the formulas: calculus, probability, time series, stochastic calculus, optimization and microstructure.
Total
51
Done
0
Progress
0%
Left
51
Est. time
~26 h

Calculus & the time value of money

calculus 0/6 ▾

Exponentials, logarithms and e

Why e shows up in finance: it is the limit of compounding more and more often. Logs turn products into sums.
Essence of Calculus Ch.5 · Khan Academy — logarithms

Continuous compounding and discounting

K·e^(−rT) as the present value of K. Converting between simple, compound and continuous rates.
Hull Ch.4

Derivatives and Taylor expansion

First and second derivatives, and the Taylor series to second order. Every greek is written in this language.
Essence of Calculus · MIT 18.01SC

Partial derivatives and the chain rule

Functions of several variables: price, time and volatility. You need them for theta, vega and Itô.
MIT 18.02SC · Khan Academy — multivariable calculus

Convexity and Jensen's inequality

Convex vs concave functions, and E[f(X)] ≥ f(E[X]) for convex f. Why a long option is convex and a liquidity provider is short gamma.
Boyd Ch.3

Delta and gamma as derivatives

Delta = ∂V/∂S, gamma = ∂²V/∂S². The P&L of a hedged position as the second-order Taylor term ½Γ(ΔS)².
Hull Ch.19

Probability

probability 0/6 ▾

Random variables, expectation and variance

Discrete and continuous random variables, linearity of expectation, variance and covariance.
Stat 110 Ch.3–4, 7

Conditional probability and Bayes

Conditioning as updating on new information. The base for filtering hidden regimes later.
Stat 110 Ch.2

Normal and lognormal distributions

Why prices are modeled as lognormal and log returns as normal. The moments of the lognormal.
Stat 110 Ch.5–6 · Hull Ch.15

Law of large numbers and the CLT

Why averages converge and sums of small shocks look normal, and where that fails.
Stat 110 Ch.10

Conditional expectation

E[X|Y] as the best prediction given what you know. The tool behind martingales and pricing.
Stat 110 Ch.9

Fat tails and extreme events

Kurtosis, Student-t and power laws. Why returns are not normal, and what that does to VaR.
Taleb — Statistical Consequences of Fat Tails (free)

Statistics & estimation

statistics 0/6 ▾

Simple vs log returns

Log returns add up over time, simple returns add up across assets. When each one is the right choice.
Tsay Ch.1

Realized volatility and the √t rule

The sample standard deviation of log returns, annualized with √252. Variance scales with time, so volatility scales with its square root.
Tsay Ch.1 · Hull Ch.15

Estimators: bias, variance and efficiency

What makes one estimator better than another. Standard errors and confidence intervals.
Penn State STAT 415

Maximum likelihood

Write the likelihood of the data and maximize it. Most volatility models, GARCH included, are fit this way.
Penn State STAT 415

Range-based volatility estimators

Parkinson, Garman-Klass and Yang-Zhang use the open, high, low and close to estimate volatility with less data than close-to-close.
The original papers (1980, 1980, 2000)

Linear regression and factor models

Regressing returns on factors: beta, alpha and residuals. Least squares from linear algebra, applied.
ISLR Ch.3

Time series & volatility models

timeseries 0/5 ▾

Stationarity and autocorrelation

Stationary series, ACF and PACF, unit roots and the ADF test. Why prices are not stationary and returns roughly are.
Penn State STAT 510 · Tsay Ch.2

AR, MA and ARMA models

Modeling a series with its own past. Fitting and diagnosing models with statsmodels.
Penn State STAT 510 · Tsay Ch.2

Volatility clustering and ARCH

Big moves follow big moves. Conditional heteroskedasticity and Engle's ARCH test.
Tsay Ch.3

GARCH and EGARCH

GARCH(1,1) as the workhorse, and EGARCH for the leverage effect. Fitting them and forecasting volatility.
Tsay Ch.3–4

Evaluating a volatility forecast

Out-of-sample tests, loss functions that work with noisy volatility proxies (QLIKE), and avoiding look-ahead.
Patton (2011)

Markov models & regimes

markov 0/5 ▾

Markov chains

States, the transition matrix and the stationary distribution. The stationary distribution is an eigenvector.
Stat 110 Ch.11

Hidden Markov models

A hidden regime emits the returns you observe. The forward algorithm, Viterbi and Baum-Welch (EM).
Rabiner (1989)

Markov-switching regression

Hamilton's regime-switching model: the mean and variance change with an unobserved state.
Hamilton (1989) · Hamilton Ch.22

Clustering regimes with k-means and GMM

Unsupervised regimes from features like realized volatility and trend. EM for Gaussian mixtures.
ISLR Ch.12

Implied volatility as a regime signal

The VIX, its term structure, contango and backwardation. How the VIX is computed from option prices.
Cboe VIX methodology

No-arbitrage & replication

pricing 0/6 ▾

Arbitrage and the law of one price

Two portfolios with the same payoff must have the same price. Derivative pricing rests on this one idea.
MIT 18.S096 · Shreve I Ch.1

Replication as a linear system

Payoffs as vectors and portfolios as linear combinations. Solve for the weights that replicate a target payoff.
Shreve I Ch.1

Put-call parity and synthetics

C − P = S − K·e^(−rT), derived by replication. Synthetic long, short and forward positions.
Hull Ch.11

The binomial model

One-step and multi-step trees, replication at each node, and risk-neutral probabilities.
Shreve I Ch.1–2

Risk-neutral measure and martingales

Price as a discounted expectation under Q. Why the real-world drift drops out.
Shreve I Ch.2–3 · MIT 18.S096

Fundamental theorems of asset pricing

No arbitrage ⇔ a risk-neutral measure exists. A complete market ⇔ that measure is unique.
Shreve II Ch.5

Stochastic calculus

stochastic 0/7 ▾

Random walks and Brownian motion

Brownian motion as the limit of a scaled random walk. Quadratic variation, or why (dW)² = dt.
Shreve II Ch.3 · MIT 18.S096

Itô's lemma

The chain rule for random processes, with an extra ½σ² term. Derive the dynamics of log S.
Shreve II Ch.4

Geometric Brownian motion

dS = μS dt + σS dW. Solving it, and why it gives lognormal prices.
Shreve II Ch.4 · Hull Ch.15

Deriving Black-Scholes

Delta hedging removes the randomness and leaves a PDE. The closed-form solution, and what each term means.
Shreve II Ch.4 · Black & Scholes (1973)

Implied volatility as numerical inversion

Black-Scholes has no closed-form inverse for σ. Root finding with Newton's method and Brent's method.
scipy.optimize.brentq

Monte Carlo pricing

Simulate paths under Q and average the discounted payoffs. The error falls as 1/√N.
Hull Ch.21

Loss-versus-rebalancing (LVR)

The cost of being an AMM liquidity provider, priced in continuous time. For x·y = k, LVR is σ²/8 of the pool value per unit of time.
Milionis, Moallemi, Roughgarden & Zhang (2022)

Optimization

optimization 0/5 ▾

Convex sets and functions

Why convex problems have a single global minimum and can be solved reliably.
Boyd Ch.2–3 · Stanford EE364A

Lagrange multipliers and duality

Optimizing under constraints. The multiplier as a shadow price.
Boyd Ch.5

Mean-variance optimization

Markowitz as a quadratic program: the efficient frontier, and why estimated inputs make it unstable.
Markowitz (1952) · Boyd Ch.4

CFMMs: x·y = k and StableSwap

Constant function market makers as convex trading functions. Price as the gradient, slippage as curvature.
Angeris & Chitra (2020) · Berkeley DeFi MOOC

Impermanent loss

The LP payoff against holding, as a concave function of the price ratio. Short gamma, in closed form.
Berkeley DeFi MOOC

Market microstructure models

microstructure 0/5 ▾

The order book as a queue

Limit orders arrive, wait, and get filled or cancelled. Queue position, price-time priority and fill probability.
Harris · Cont, Stoikov & Talreja (2010)

Decomposing the bid-ask spread

Order processing, inventory and adverse selection. Roll's estimator from the serial covariance of price changes.
Roll (1984) · O'Hara Ch.1

Glosten-Milgrom

A dealer facing informed and uninformed traders. The spread as protection against adverse selection.
Glosten & Milgrom (1985) · O'Hara Ch.3

The Kyle model

An insider trades against noise traders and a market maker. Price impact and Kyle's lambda.
Kyle (1985) · O'Hara Ch.4

Market making: Avellaneda-Stoikov

Optimal quotes under inventory risk. The reservation price and the spread as functions of volatility and risk aversion.
Avellaneda & Stoikov (2008)

// bibliography

The books, courses and practice sites behind this roadmap.

// books
Introduction to Probability ↗
Joseph Blitzstein & Jessica Hwang · free · cited in 6 topics
The Stat 110 textbook. Probability with the intuition first.
Analysis of Financial Time Series
Ruey S. Tsay · cited in 6 topics
Returns, ARMA, ARCH and GARCH, with financial data throughout.
Stochastic Calculus for Finance I & II
Steven Shreve · cited in 9 topics
Volume I is the binomial model; volume II is continuous time.
Options, Futures, and Other Derivatives
John C. Hull · cited in 7 topics
The reference for the instruments these models price.
Convex Optimization ↗
Stephen Boyd & Lieven Vandenberghe · free · cited in 4 topics
Convex sets, duality and the problems behind portfolios and AMMs.
An Introduction to Statistical Learning ↗
James, Witten, Hastie & Tibshirani · free · cited in 2 topics
Regression and clustering, with Python labs.
Time Series Analysis
James D. Hamilton · cited in 1 topic
The classic graduate text. Chapter 22 is regime switching.
Market Microstructure Theory
Maureen O'Hara · cited in 3 topics
Inventory and information models of how prices form.
Trading and Exchanges
Larry Harris · cited in 1 topic
How markets work, from the trader's side. No heavy math.
// courses
Harvard Stat 110 — Probability ↗
Joe Blitzstein · free
Lectures, notes and problem sets with solutions.
MIT OCW 18.S096 — Topics in Mathematics with Applications in Finance ↗
free · cited in 5 topics
Lectures from academics and practitioners, from linear algebra to stochastic calculus.
Essence of Calculus ↗
3Blue1Brown · free · cited in 2 topics
Short videos for the intuition behind derivatives.
Berkeley DeFi MOOC ↗
UC Berkeley RDI · free
AMMs, lending and DeFi risk, lecture by lecture.
// practice
arch — volatility modeling examples ↗
free · cited in 2 topics
Fit GARCH-family models to real returns in Python.
CVXPY — examples ↗
free · cited in 1 topic
Portfolio optimization and other convex problems, as runnable code.