Finance and economics formulas
The 32 formulas the glossary defines, on one page, so you can find the one you need and check the symbols. Each term links to its page, where the formula comes with a plain-English explanation, a worked example computed step by step, and the Python that reproduces it.
Finance · 18 formulas
Pricing, risk and portfolio maths.
Black-Scholes Model
worked exampleOpenC = S·N(d₁) − K·e^(−rT)·N(d₂) d₁ = [ln(S/K) + (r + σ²/2)T] / (σ√T), d₂ = d₁ − σ√T
Closed-form price for European options.
Bond Duration
worked exampleOpenD_mac = Σ (t · PV_t) / Price D_mod = D_mac / (1 + y)
A bond's price sensitivity to interest-rate changes.
CAPM (Capital Asset Pricing Model)
worked exampleOpenE(Rᵢ) = R_f + βᵢ · (E(R_m) − R_f)
Expected return as risk-free rate plus beta times market premium.
Cointegration (Pairs Trading)
OpenEngle–Granger: regress A on B, test residuals for stationarity (ADF)
Two non-stationary prices whose linear combo is stationary.
Expected Shortfall (CVaR)
OpenES_α = −E[ r | r ≤ −VaR_α ]
Average loss in the worst tail beyond VaR.
Fama-French 3-Factor Model
OpenR − R_f = α + β·(R_m − R_f) + s·SMB + h·HML + ε
Extends CAPM with size (SMB) and value (HML) factors.
Gordon Growth Model
worked exampleOpenP₀ = D₁ / (r − g) (requires r > g)
Values a stock as next dividend over (required return − growth).
Information Ratio
OpenIR = (R_p − R_benchmark) / TrackingError
Active return divided by tracking error.
Internal Rate of Return (IRR)
OpenSolve for r: Σ_t CF_t / (1 + r)^t = 0
The discount rate that makes a project NPV exactly zero.
Kelly Criterion
Openf* = (b·p − q) / b (discrete bets) f* = μ / σ² (continuous returns)
The bet size that maximises long-run logarithmic growth.
Mean Reversion
Openz = (xₜ − rolling_mean) / rolling_std Trade when |z| exceeds a threshold (e.g. 2)
The tendency of a price or spread to return to its average.
Net Present Value (NPV) & DCF
OpenNPV = Σ_t CF_t / (1 + r)^t
Today's value of future cash flows, discounted for time and risk.
Put-Call Parity
worked exampleOpenC − P = S − K·e^(−rT)
A no-arbitrage link between calls, puts, the stock, and a bond.
Sortino Ratio
OpenSortino = (R_p − R_f) / σ_downside σ_downside = sqrt( mean( min(R − target, 0)² ) ) (over ALL periods, target usually 0 or R_f)
Like Sharpe, but penalises only downside volatility.
Time Value of Money
OpenPV = FV / (1 + r)^n FV = PV · (1 + r)^n
A dollar today is worth more than a dollar tomorrow.
Treynor Ratio
OpenTreynor = (R_p − R_f) / β_p
Excess return per unit of market (systematic) risk.
Value at Risk (VaR)
worked exampleOpenVaR_α = −quantile(returns, 1 − α)
Worst expected loss over a horizon at a confidence level.
WACC (Weighted Average Cost of Capital)
OpenWACC = (E/V)·R_e + (D/V)·R_d·(1 − T_c)
Blended after-tax cost of a firm’s equity and debt.
Economics · 12 formulas
Macro identities and the models built on them.
Cobb-Douglas Production Function
worked exampleOpenY = A · Kᵅ · Lᵝ (constant returns when α + β = 1)
Output as a function of capital and labour with constant returns.
Comparative Advantage
OpenSpecialise where opportunity cost is lowest: OC(good A) = units of B forgone per unit of A
Gains from trade arise from differences in opportunity cost.
Fisher Equation
worked exampleOpen(1 + i) = (1 + r)(1 + π) ⇒ r ≈ i − π
Links nominal interest rates, real rates, and inflation.
Gini Coefficient
OpenG = (Σ_i Σ_j |x_i − x_j|) / (2 n² x̄)
Single-number measure of income or wealth inequality (0–1).
Gross Domestic Product (GDP)
worked exampleOpenY = C + I + G + (X − M) Real GDP = Nominal GDP / (Deflator / 100)
Total market value of goods & services produced in an economy.
Inflation Rate (CPI)
OpenInflation_t = (CPI_t / CPI_{t−12}) − 1Year-over-year percentage rise in a basket of consumer prices.
Keynesian Multiplier
Openk = 1 / (1 − MPC) ΔGDP = k × ΔSpending
How an initial spending injection cascades into larger GDP change.
Nash Equilibrium
OpenNo player i can improve by deviating: uᵢ(sᵢ*, s₋ᵢ*) ≥ uᵢ(sᵢ, s₋ᵢ*) ∀ sᵢ
A state where no player can gain by changing strategy alone.
Okun's Law
worked exampleOpen(Y − Y*)/Y* ≈ −c · (u − u*) with c ≈ 2
Empirical link between unemployment and the output gap.
Price Elasticity of Demand
worked exampleOpenPED = (%ΔQ) / (%ΔP) Elastic if |PED| > 1, inelastic if |PED| < 1
How responsive quantity demanded is to a change in price.
Purchasing Power Parity (PPP)
worked exampleOpenS = P_domestic / P_foreign
Exchange rates should equalise the price of identical goods.
Quantity Theory of Money
OpenM · V = P · Q ⇒ %ΔP ≈ %ΔM + %ΔV − %ΔQ
Money supply × velocity equals price level × real output.
Statistics · 2 formulas
The estimators behind the models.
Linear Regression
worked exampleOpeny = β₀ + β₁x + ε ; β̂ = (XᵀX)⁻¹Xᵀy minimises Σ(yᵢ − ŷᵢ)²
Fit a straight line (or hyperplane) that minimises the sum of squared errors: ordinary least squares (OLS).
Logistic Regression
worked exampleOpenP(y=1 | x) = σ(β₀ + β₁x) = 1 / (1 + e^(−(β₀ + β₁x))) ; log(p / (1 − p)) = β₀ + β₁x
Classification model that turns a linear score into a probability through the sigmoid.
Where to go next
- The full glossary adds the terms that have no formula: Python, SQL and the IT vocabulary of a first job.
- The courses put these formulas to work in the browser, on real market and macro data.
- The thesis data guide shows where to pull the series these formulas need, from FRED, the ECB, Yahoo Finance and the SEC.