Quantitative finance / Study notes
Understand the numbers.
A practical starting point for finance students. Learn the intuition, work through the calculation, then check what the model leaves out.
Begin with Foundations, then study Equity, Bonds and Commodities. These are introductory notes for revision, rather than a complete mathematical finance curriculum. All numerical examples are hypothetical.
Chapter 01
Foundations
Start here. These tools underpin every asset class: measuring returns, describing uncertainty and testing a relationship.
Returns and compounding
A return measures the change in wealth, including income. Simple returns compound by multiplication; log returns add through time.
R = (P₁ − P₀ + D) / P₀ r = ln(1 + R) Cumulative return = ∏(1 + Rₜ) − 1
P₀ and P₁ are starting and ending prices; D is cash income over the period. ln is the natural logarithm. ∏ means multiply across periods.
Worked example
A share rises from 100 to 105 and pays 2: total return is 7%. A gain of 20% followed by a loss of 20% leaves 100 × 1.20 × 0.80 = 96, a 4% loss.
Watch out
An arithmetic average of periodic returns is not a compounded growth rate. Adjust prices consistently for dividends and splits.
Present value and discounting
Cash received later has a different value from cash received today. Discount each cash flow using a rate consistent with its timing and risk.
PV = CFₜ / (1 + r)ᵗ FV = PV × (1 + r)ᵗ
PV is present value, FV future value, CFₜ a cash flow at time t, and r the effective rate per period.
Worked example
110 received in one year at a 10% discount rate is worth 100 today. At 5%, it is worth 104.76.
Watch out
Match the period and currency of cash flows and discount rates. A nominal annual rate with monthly compounding is not an effective annual rate.
Probability, expectation and variance
Expected value is a probability-weighted average, not a promise. Variance measures squared deviations from that average; standard deviation brings the units back to returns.
E[X] = Σ pᵢxᵢ Var(X) = Σ pᵢ(xᵢ − E[X])² σ = √Var(X)
pᵢ is the probability of outcome xᵢ; probabilities sum to one. Σ means sum. σ denotes standard deviation.
Worked example
A return is +10% or −10%, each with probability 50%. Its expected return is 0%, variance is 0.01 and standard deviation is 10%.
Watch out
Zero expected return does not mean zero risk. Conditional probability P(A|B) = P(A∩B)/P(B) updates probabilities when B is known.
Volatility and time scaling
Historical volatility is the standard deviation of a series of returns. Annualization translates the observation frequency into an annual measure under specific assumptions.
s² = Σ(rₜ − r̄)² / (n − 1) σannual ≈ σdaily × √252
rₜ is a daily return, r̄ its sample mean, and n the number of observations. Use a consistent simple- or log-return convention.
Worked example
Daily volatility of 1% becomes approximately 15.87% annually. Under the same assumptions, 20% annual volatility implies about 10% over three months.
Watch out
Square-root-of-time scaling assumes uncorrelated increments and stable variance. Volatility clustering, jumps and autocorrelation can invalidate it.
Covariance, correlation and regression
Correlation measures linear co-movement. Regression estimates how one variable changes with another, separating fitted exposure from unexplained variation.
ρXY = Cov(X,Y) / (σXσY) Y = α + βX + ε β = Cov(X,Y) / Var(X)
ρ ranges from −1 to +1. α is the intercept, β the slope and ε the residual. The slope formula is for a regression with an intercept.
Worked example
If market variance is 0.04 and a stock’s covariance with the market is 0.06, estimated beta is 1.5.
Watch out
Correlation is not causation. Regressing nonstationary price levels can create misleading relationships; use economically justified transformations and holdout data.
Derivatives, Taylor approximation and model testing
A derivative measures local sensitivity. A second derivative measures how that sensitivity changes. These ideas connect option delta and gamma with bond duration and convexity.
Δf ≈ f′(x)Δx + ½f″(x)(Δx)² Standard error of a mean ≈ s / √n
f′ and f″ are first and second derivatives. The standard-error formula assumes independent observations with finite variance.
Worked example
For f(x) = x² at x = 10, a move of 0.1 gives Δf = 20 × 0.1 + 0.01 = 2.01. For a sample mean, quadrupling n halves its standard error under independence.
Watch out
A local approximation may fail for large moves. In backtests, avoid look-ahead and survivorship bias; include costs and test out of sample.
Your turn
An asset rises 10% and then falls 10%. What is its cumulative return? Separately, annualize daily volatility of 1.5%.
Reveal the worked answer
100 × 1.10 × 0.90 = 99, so cumulative return is −1%. Annual volatility is approximately 1.5% × √252 = 23.81%, assuming uncorrelated daily returns and stable variance.
Chapter 02
Equity
Connect individual stock risk to portfolio risk, then learn the first building blocks of derivatives pricing.
Portfolio return and diversification
Portfolio expected return is a weighted average. Portfolio volatility also depends on how the holdings move together.
E[Rp] = w₁E[R₁] + w₂E[R₂] σp² = w₁²σ₁² + w₂²σ₂² + 2w₁w₂ρ₁₂σ₁σ₂
w are portfolio weights, summing to one for a fully invested two-asset portfolio. ρ₁₂ is return correlation.
Worked example
Two equal holdings each have 20% volatility. At correlation 0, portfolio volatility is √0.02 = 14.14%; at correlation 1, it is 20%.
Watch out
Diversification reduces risk most when correlations are low. Historical correlations can rise during stress.
Beta and CAPM
Beta describes exposure to market movements. CAPM is a model linking expected excess return to systematic market risk.
E[Ri] = Rf + βi × (E[Rm] − Rf)
Rf is the risk-free rate; E[Rm] − Rf is the expected market risk premium. Use consistent horizons.
Worked example
With Rf = 3%, beta = 1.2 and market risk premium = 5%, CAPM implies an expected return of 9%.
Watch out
Beta is not total risk, and CAPM is not a guaranteed return forecast. A low-beta company can still have substantial company-specific risk.
Sharpe ratio, drawdown and tail risk
Sharpe compares excess return with total volatility. Drawdown describes the loss from a previous wealth peak. Neither alone captures all investment risk.
Sharpe = mean(Rp − Rf) / σ(Rp − Rf) Drawdownₜ = Vₜ / max(V₀,…,Vₜ) − 1
V is portfolio wealth. Match the frequency of numerator and denominator. Maximum drawdown is the most negative drawdown in the sample.
Worked example
Annual expected return 10%, risk-free rate 3% and volatility 14% imply a Sharpe ratio of 0.50. Wealth falling from 120 to 90 produces a 25% drawdown.
Watch out
A 95% VaR is a loss quantile, not the worst possible loss. Expected shortfall examines the tail beyond that quantile. Smooth returns can conceal illiquidity.
Equity forwards and no-arbitrage
A forward fixes a future purchase price. With replicable funding and dividend exposure, its fair price follows the cost of carrying the underlying.
F₀ = S₀ × e^((r − q)T)
S₀ is spot, r a continuously compounded financing rate, q a continuous dividend yield and T years to maturity.
Worked example
Spot 100, r = 5%, q = 2% and T = 1 imply F₀ ≈ 103.05. A higher forward price than spot need not imply an expected stock rally.
Watch out
This simplified formula assumes known constant rates and yield. Discrete dividends, borrowing constraints and funding differences require adjustments.
Option payoffs and put-call parity
A call gives the right to buy; a put gives the right to sell. Payoff excludes the premium, while profit includes it.
Call payoff = max(ST − K, 0) Put payoff = max(K − ST, 0) C − P = S₀e^(−qT) − Ke^(−rT)
K is strike; ST is the expiry price. C and P are European option prices with the same strike and expiry.
Worked example
A call with strike 100 costs 6. At expiry spot 112, payoff is 12 and profit is 6, ignoring premium financing and fees.
Watch out
Put-call parity above is for European options under its carry assumptions. American early exercise changes the relationships.
Black-Scholes, implied volatility and Greeks
Black-Scholes prices European options in an idealized model. Implied volatility is the volatility input that reproduces an observed option price.
C = S₀e^(−qT)N(d₁) − Ke^(−rT)N(d₂) d₁ = [ln(S₀/K) + (r − q + σ²/2)T] / (σ√T) d₂ = d₁ − σ√T ΔV ≈ delta × ΔS + ½gamma × (ΔS)² + vega × Δσ + theta × Δt
N is the standard normal cumulative distribution. Delta is spot sensitivity, gamma its curvature, vega volatility sensitivity, and theta sensitivity to passing calendar time.
Worked example
If delta = 0.50 and gamma = 0.04, a spot increase of 2 changes option value by approximately 1.08 with other inputs fixed.
Watch out
Black-Scholes assumes continuous trading, constant volatility and rates, and no jumps. Check whether vega is quoted per 1.00 or 0.01 volatility change, and theta per year or day.
Your turn
A call with strike 100 costs 5. Find expiry profit at spot 103 and 110. What is breakeven?
Reveal the worked answer
At 103: payoff 3 minus premium 5 = −2. At 110: payoff 10 minus premium 5 = +5. Breakeven is 105, ignoring financing and fees.
Chapter 03
Bonds
Begin with discounted cash flows, then translate yield movements into price risk. All examples use option-free instruments unless stated otherwise.
Bond price and yield to maturity
A bond is a stream of coupons and principal. Yield to maturity is the single discount rate that equates those cash flows to its dirty price.
Pdirty = Σ[t=1…n] CFₜ / (1 + y)ᵗ Pdirty = Pclean + accrued interest
This formula uses annual cash flows and an effective annual yield y. For m coupon periods per year and nominal annual yield, discount at y/m for each period.
Worked example
A two-year bond pays annual coupons of 5 and principal of 100. At a 5% yield, price is 100. At 6%, price is about 98.17.
Watch out
Coupon rate is not yield. Realized return can differ from YTM because of reinvestment rates, sale price or default.
Spot rates and forward rates
A spot rate discounts one cash flow at a specific maturity. A forward rate is the rate implied between two future dates by today’s discount curve.
(1 + z₂)² = (1 + z₁)(1 + f₁,₂)
z₁ and z₂ are one- and two-year effective annual spot rates. f₁,₂ is the implied one-year rate beginning in one year.
Worked example
If z₁ = 3% and z₂ = 4%, f₁,₂ = 1.04² / 1.03 − 1 ≈ 5.01%.
Watch out
Forward rates are no-arbitrage break-even rates, not pure forecasts. Term premia and risk preferences affect their interpretation.
Duration and DV01
Modified duration approximates percentage price sensitivity to yield. DV01 translates it into a currency amount for a one-basis-point move.
ΔP / P ≈ −Dmod × Δy DV01 ≈ Dmod × market value × 0.0001
Dmod is modified duration; Δy is a decimal yield change. One basis point is 0.0001. DV01 here is reported as a positive magnitude.
Worked example
A portfolio worth 1,000,000 with modified duration 6 has DV01 about 600. A 10 bp yield rise implies a loss of about 6,000.
Watch out
Macaulay duration is a cash-flow timing measure; for annual compounding Dmod = DMac/(1+y). For embedded options, effective duration is usually more appropriate.
Convexity and curve risk
Convexity corrects the straight-line duration approximation. Key-rate durations measure sensitivity to particular maturity points on the curve.
ΔP / P ≈ −DmodΔy + ½C(Δy)²
C is yield convexity consistent with the yield convention; Δy is a decimal. This approximation assumes a small yield move and fixed cash flows.
Worked example
With duration 8, convexity 80 and a 25 bp yield fall: −8(−0.0025) + 0.5 × 80 × 0.0025² = +2.025%.
Watch out
A single duration assumes a common yield shift. Curve steepening and flattening need maturity-specific exposures; callable bonds may have negative convexity.
Credit spread and expected loss
Credit spreads compensate for several risks, including default, liquidity and risk aversion. Expected credit loss combines default probability and loss severity.
Expected loss = PD × LGD × EAD LGD = 1 − recovery rate
PD is default probability over the chosen horizon, LGD loss given default and EAD exposure at default.
Worked example
For exposure 100, PD 2% and recovery 40%, expected loss is 0.02 × 0.60 × 100 = 1.20.
Watch out
A 120 bp expected loss is not automatically a fair spread of 120 bp. Timing, discounting, liquidity and risk premia matter.
Your turn
A bond portfolio is worth 2 million, duration is 5 and convexity is 30. Estimate the price change if yield rises 20 bp.
Reveal the worked answer
Δy = 0.002. Percentage change ≈ −5 × 0.002 + 0.5 × 30 × 0.002² = −0.994%. Estimated currency loss = 19,880. Duration-only DV01 is 1,000.
Chapter 04
Commodities
Physical markets add storage, delivery, seasonality and inventory constraints. A spot-price view and a futures investment are different exposures.
Futures P&L and contract sizing
A futures contract has a specified quantity and quotation unit. Profit depends on the price change multiplied by that quantity, not on margin posted.
Long futures P&L = N × Q × (F₁ − F₀)
N is number of contracts, Q units per contract, and F the quoted price per unit. Short positions have the opposite sign.
Worked example
Two hypothetical contracts of 1,000 barrels each gain $3 per barrel: long P&L is $6,000.
Watch out
Margin is collateral, not the maximum loss or full exposure. Futures are marked to market daily and may require additional cash.
Cost of carry and convenience yield
Storage and financing increase the cost of holding inventory. Convenience yield represents the non-cash benefit of having the physical commodity available.
F₀,T = S₀ × e^((r + u − c)T)
r is financing, u proportional storage and insurance cost, c convenience yield; rates are continuously compounded and T is in years.
Worked example
Spot 80, r = 4%, u = 3%, c = 1% and T = 0.5 imply a forward price of 80 × e^0.03 ≈ 82.44.
Watch out
This is a simplified storable-commodity model. Capacity limits, short-sale constraints, seasonality and delivery specifications can disrupt a simple carry relation.
Contango and backwardation
An upward-sloping futures curve is called contango; a downward-sloping curve is backwardation. Always specify which maturities you are comparing.
Calendar spread = Fnear − Ffar
Fnear and Ffar are futures prices for nearby and more distant delivery months.
Worked example
Near 80 and far 84 imply a spread of −4 and contango between those maturities. Near 84 and far 80 imply +4 and backwardation.
Watch out
Curve shape is not a guaranteed forecast of spot prices. Different seasonal segments of the same curve may slope in different directions.
Rolling futures and total return
Maintaining exposure usually requires replacing an expiring contract. Subsequent convergence and curve changes affect performance alongside collateral income.
Futures P&L = contract quantity × change in held futures price
A fully collateralized strategy also earns or pays financing and collateral returns. Return decompositions depend on index and roll conventions.
Worked example
A contract bought at 84 later converges to an unchanged spot price of 80: it loses 4 per unit. Selling an old contract at 80 and buying the new at 84 does not itself create an immediate $4 mark-to-market loss.
Watch out
Contango can create a headwind for a long rolling strategy under a stable curve, but it does not guarantee losses. Do not confuse spot return with futures total return.
Basis risk and minimum-variance hedging
A hedge rarely matches the exact commodity, location, grade and delivery date of a physical exposure. The mismatch creates basis risk.
Basis = spot − futures h* = Cov(ΔS,ΔF) / Var(ΔF) = ρ × σΔS / σΔF Contracts ≈ h* × exposure units / contract units
This h* uses price changes in compatible currency-per-unit terms. It minimizes historical variance, assuming that relationship remains stable.
Worked example
For ρ = 0.8, σΔS = 6 and σΔF = 5, h* = 0.96. A producer with 100,000 units would short about 96 contracts of 1,000 units.
Watch out
A buyer hedging rising purchase costs typically goes long; a producer hedging falling sale prices typically goes short. Currency and unit conversions must be consistent.
Your turn
A producer sells one futures contract covering 1,000 units at 75. Futures later trade at 70. What is the futures P&L, and why can the overall hedge still be imperfect?
Reveal the worked answer
Short futures P&L is (75 − 70) × 1,000 = +5,000. The physical sale price may move differently because of location, grade, timing or currency, leaving basis risk.
Where to go next
Before moving to stochastic calculus, become comfortable with algebra, logarithms, derivatives, integrals, probability distributions and matrix notation. Then study optimization, time-series models, Monte Carlo simulation and risk-neutral pricing. Reproduce these examples in Excel or Python and explain every input before adding complexity.
Further reading
- CFA Institute: Portfolio Mathematics
- CFA Institute: Bond Convexity and Portfolio Properties
- CME Group: Contango and Backwardation
For deeper study: John C. Hull, Options, Futures, and Other Derivatives. Educational notes by Noé Saulet.