Appendix B — Mathematical Reference
A quick-reference summary of the mathematics used throughout this book.
B.1 Linear Algebra
Key Operations
| Symbol | Meaning |
|---|---|
| $A^\top$ | Transpose of matrix $A$ |
| $A^{-1}$ | Inverse of square matrix $A$ |
| $\det(A)$ | Determinant |
| $\text{tr}(A)$ | Trace: sum of diagonal elements |
| $A = L L^\top$ | Cholesky decomposition (positive definite $A$) |
Eigendecomposition
For symmetric $A$: $$A = Q \Lambda Q^\top$$ where $Q$ is orthogonal (columns are eigenvectors) and $\Lambda = \text{diag}(\lambda_1, \ldots, \lambda_n)$.
Solving Linear Systems
$Ax = b$ solved by LU decomposition: $O(n^3)$ complexity.
B.2 Calculus and Optimisation
Taylor Series (second order)
$$f(x + \delta) \approx f(x) + f'(x),\delta + \tfrac{1}{2} f''(x),\delta^2$$
Integration by Parts
$$\int_a^b u,dv = [uv]_a^b - \int_a^b v,du$$
Gradient Descent
$$\theta_{k+1} = \theta_k - \eta \nabla_\theta \mathcal{L}(\theta_k)$$
Convergence guaranteed for $L$-smooth convex $\mathcal{L}$ with $\eta < 1/L$.
B.3 Probability and Statistics
Normal Distribution
$$\phi(x) = \frac{1}{\sqrt{2\pi}} e^{-x^2/2}, \qquad \Phi(x) = \int_{-\infty}^x \phi(t),dt$$
Useful identities:
- $\Phi(-x) = 1 - \Phi(x)$
- $E[e^{\sigma Z}] = e^{\sigma^2/2}$ for $Z \sim N(0,1)$
Log-Normal Distribution
If $X = e^{\mu + \sigma Z}$, $Z \sim N(0,1)$: $$E[X] = e^{\mu + \sigma^2/2}, \qquad \text{Var}(X) = e^{2\mu+\sigma^2}(e^{\sigma^2}-1)$$
Moment Generating Function
$$M_X(t) = E[e^{tX}]$$
For $X \sim N(\mu, \sigma^2)$: $M_X(t) = e^{\mu t + \sigma^2 t^2/2}$.
B.4 Stochastic Calculus
Brownian Motion Properties
- $W_0 = 0$
- $W_t - W_s \sim N(0, t-s)$ for $t > s$
- Independent increments
- Continuous paths (almost surely)
Itô's Lemma
For $f(t, W_t)$ twice differentiable: $$df = \frac{\partial f}{\partial t},dt + \frac{\partial f}{\partial x},dW_t + \frac{1}{2}\frac{\partial^2 f}{\partial x^2},dt$$
Geometric Brownian Motion
$$dS_t = \mu S_t,dt + \sigma S_t,dW_t$$ $$S_t = S_0 \exp!\left[\left(\mu - \tfrac{\sigma^2}{2}\right)t + \sigma W_t\right]$$
Girsanov Theorem
Under measure $\mathbb{Q}$ defined by: $$\frac{d\mathbb{Q}}{d\mathbb{P}} = \exp!\left(-\int_0^T \theta_t,dW_t - \tfrac{1}{2}\int_0^T \theta_t^2,dt\right)$$ the process $\tilde{W}_t = W_t + \int_0^t \theta_s,ds$ is a $\mathbb{Q}$-Brownian motion.
B.5 Black-Scholes Formula Quick Reference
$$C = S,\Phi(d_1) - K e^{-rT}\Phi(d_2)$$ $$P = K e^{-rT}\Phi(-d_2) - S,\Phi(-d_1)$$
$$d_1 = \frac{\ln(S/K) + (r + \sigma^2/2)T}{\sigma\sqrt{T}}, \qquad d_2 = d_1 - \sigma\sqrt{T}$$
Greeks
| Greek | Call | Put |
|---|---|---|
| $\Delta$ | $\Phi(d_1)$ | $\Phi(d_1) - 1$ |
| $\Gamma$ | $\phi(d_1)/(S\sigma\sqrt{T})$ | same |
| $\mathcal{V}$ | $S,\phi(d_1)\sqrt{T}$ | same |
| $\Theta$ | $-S\phi(d_1)\sigma/(2\sqrt{T}) - rKe^{-rT}\Phi(d_2)$ | $-S\phi(d_1)\sigma/(2\sqrt{T}) + rKe^{-rT}\Phi(-d_2)$ |
| $\rho$ | $KTe^{-rT}\Phi(d_2)$ | $-KTe^{-rT}\Phi(-d_2)$ |
B.6 Standard Normal Table (selected values)
| $z$ | $\Phi(z)$ |
|---|---|
| 0.00 | 0.5000 |
| 0.25 | 0.5987 |
| 0.50 | 0.6915 |
| 0.75 | 0.7734 |
| 1.00 | 0.8413 |
| 1.28 | 0.8997 |
| 1.645 | 0.9500 |
| 1.96 | 0.9750 |
| 2.326 | 0.9900 |
| 2.576 | 0.9950 |
| 3.00 | 0.9987 |
B.7 Key Financial Formulas
Bond Duration and Convexity
$$D = \frac{1}{P}\sum_{i=1}^n \frac{t_i \cdot C_i}{(1+y)^{t_i}}, \qquad \text{Cx} = \frac{1}{P}\sum_{i=1}^n \frac{t_i(t_i+1)\cdot C_i}{(1+y)^{t_i+2}}$$
Nelson-Siegel Yield Curve
$$y(\tau) = \beta_0 + (\beta_1 + \beta_2)\frac{1 - e^{-\tau/\lambda}}{\tau/\lambda} - \beta_2 e^{-\tau/\lambda}$$
Vasicek Short Rate
$$dr_t = \kappa(\theta - r_t),dt + \sigma,dW_t$$
Zero-coupon bond: $P(t,T) = A(t,T)e^{-B(t,T)r_t}$ where: $$B(t,T) = \frac{1 - e^{-\kappa(T-t)}}{\kappa}$$ $$\ln A(t,T) = \left(\theta - \frac{\sigma^2}{2\kappa^2}\right)(B(t,T) - (T-t)) - \frac{\sigma^2}{4\kappa}B(t,T)^2$$
B.8 Numerical Methods Reference
Root-Finding
Bisection — guaranteed convergence, $O(\log_2((b-a)/\varepsilon))$ iterations: $$x_{n+1} = \frac{a_n + b_n}{2}, \quad \text{update } [a,b] \text{ to keep sign change}$$
Newton-Raphson — quadratic convergence near a simple root: $$x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}$$
Convergence: $|x_{n+1} - x^| \leq C|x_n - x^|^2$ for some $C > 0$.
Brent's method — combines bisection, secant, and inverse quadratic interpolation. Superlinear convergence, guaranteed to converge. Preferred in practice.
Numerical Integration
Composite Simpson's rule (error $O(h^4)$): $$\int_a^b f(x),dx \approx \frac{h}{3}\left[f(x_0) + 4f(x_1) + 2f(x_2) + \cdots + 4f(x_{n-1}) + f(x_n)\right]$$
Gauss-Legendre quadrature — exact for polynomials of degree $\leq 2n-1$ with $n$ nodes: $$\int_{-1}^1 f(x),dx \approx \sum_{i=1}^n w_i f(x_i)$$
5-point nodes and weights on $[-1, 1]$:
| $x_i$ | $w_i$ |
|---|---|
| $\pm 0.9061798459$ | $0.2369268851$ |
| $\pm 0.5384693101$ | $0.4786286705$ |
| $0$ | $0.5688888889$ |
Monte Carlo integration (error $O(1/\sqrt{N})$): $$\int_\Omega f(x),dx \approx \frac{|\Omega|}{N}\sum_{i=1}^N f(x_i), \quad x_i \sim \text{Uniform}(\Omega)$$
Finite Differences
| Scheme | Formula | Error |
|---|---|---|
| Forward | $f'(x) \approx \frac{f(x+h)-f(x)}{h}$ | $O(h)$ |
| Backward | $f'(x) \approx \frac{f(x)-f(x-h)}{h}$ | $O(h)$ |
| Central | $f'(x) \approx \frac{f(x+h)-f(x-h)}{2h}$ | $O(h^2)$ |
| Second | $f''(x) \approx \frac{f(x+h)-2f(x)+f(x-h)}{h^2}$ | $O(h^2)$ |
B.9 Stochastic Calculus Extended Reference
Itô Integral Properties
For adapted process $H_t$: $$\int_0^T H_t,dW_t \sim N!\left(0, \int_0^T H_t^2,dt\right) \quad \text{(Itô isometry)}$$
$$E!\left[\int_0^T H_t,dW_t\right] = 0$$
Itô's Lemma (General Form)
For $f(t, X_t)$ where $dX_t = \mu_t,dt + \sigma_t,dW_t$: $$df = \left(\frac{\partial f}{\partial t} + \mu_t\frac{\partial f}{\partial x} + \frac{\sigma_t^2}{2}\frac{\partial^2 f}{\partial x^2}\right)dt + \sigma_t\frac{\partial f}{\partial x},dW_t$$
Multidimensional Itô's Lemma
For $f(t, X_t^1, \ldots, X_t^n)$ with $dX_t^i = \mu_t^i,dt + \sum_j \sigma_t^{ij},dW_t^j$: $$df = \frac{\partial f}{\partial t},dt + \sum_i \frac{\partial f}{\partial x_i},dX_t^i + \frac{1}{2}\sum_{i,j}\frac{\partial^2 f}{\partial x_i \partial x_j},d\langle X^i, X^j\rangle_t$$
where $d\langle X^i, X^j\rangle_t = \sum_k \sigma_t^{ik}\sigma_t^{jk},dt$.
Feynman-Kac Formula
If $u(t,x)$ satisfies the PDE: $$\frac{\partial u}{\partial t} + \mu(t,x)\frac{\partial u}{\partial x} + \frac{\sigma^2(t,x)}{2}\frac{\partial^2 u}{\partial x^2} - r,u = 0$$ with terminal condition $u(T,x) = g(x)$, then: $$u(t,x) = E^{\mathbb{Q}}!\left[e^{-r(T-t)}g(X_T),\Big|,X_t = x\right]$$
This connects PDEs (Crank-Nicolson) to Monte Carlo simulation.
Ornstein-Uhlenbeck Process
$$dX_t = \kappa(\theta - X_t),dt + \sigma,dW_t$$
Exact solution: $X_t = \theta + (X_0 - \theta)e^{-\kappa t} + \sigma\int_0^t e^{-\kappa(t-s)},dW_s$
Stationary distribution: $X_\infty \sim N!\left(\theta, \frac{\sigma^2}{2\kappa}\right)$
B.10 Interest Rate Models Reference
Short Rate Models
| Model | SDE | Zero-coupon bond |
|---|---|---|
| Vasicek | $dr = \kappa(\theta-r),dt + \sigma,dW$ | Affine: $P = A(t,T)e^{-B(t,T)r}$ |
| CIR | $dr = \kappa(\theta-r),dt + \sigma\sqrt{r},dW$ | Affine (non-negative rates) |
| Hull-White | $dr = (\theta(t)-\kappa r),dt + \sigma,dW$ | Affine, fits initial curve exactly |
| Black-Karasinski | $d\ln r = (\theta(t)-\kappa\ln r),dt + \sigma,dW$ | Log-normal rates, no closed form |
CIR Model
$$dr_t = \kappa(\theta - r_t),dt + \sigma\sqrt{r_t},dW_t$$
Feller condition for non-negative rates: $2\kappa\theta > \sigma^2$.
Zero-coupon bond: $P(t,T) = A(t,T)e^{-B(t,T)r_t}$ where: $$B(t,T) = \frac{2(e^{\gamma(T-t)}-1)}{(\gamma+\kappa)(e^{\gamma(T-t)}-1)+2\gamma}, \quad \gamma = \sqrt{\kappa^2 + 2\sigma^2}$$
Forward Rate Agreement (FRA)
A FRA on the rate $L(T_1, T_2)$ has payoff at $T_2$: $$N \cdot \delta \cdot (L(T_1, T_2) - K)$$ where $\delta = T_2 - T_1$ (day count fraction). PV at $t < T_1$: $$\text{PV} = N\delta,P(t,T_2),(F(t;T_1,T_2) - K)$$
LIBOR Market Model (BGM)
Forward LIBOR rates $L_k(t)$ for period $[T_k, T_{k+1}]$ under the terminal measure $\mathbb{Q}^{T_N}$: $$dL_k(t) = L_k(t)\left(-\sum_{j=k+1}^{N-1}\frac{\delta_j L_j(t)\sigma_k(t)\cdot\sigma_j(t)}{1+\delta_j L_j(t)}\right)dt + L_k(t)\sigma_k(t)\cdot d\tilde{W}_t$$
B.11 Credit Mathematics
Hazard Rate and Survival Probability
For constant hazard rate $\lambda$: $$Q(\tau > t) = e^{-\lambda t}, \qquad Q(\tau \leq t) = 1 - e^{-\lambda t}$$
For time-varying $\lambda(t)$: $$Q(\tau > t) = \exp!\left(-\int_0^t \lambda(s),ds\right)$$
CDS Pricing (Simplified)
Par spread $s$ satisfies: $$s = \frac{(1-R)\int_0^T P(0,t),dQ(\tau \leq t)}{\int_0^T P(0,t),Q(\tau > t),dt}$$
where $R$ is the recovery rate and $P(0,t)$ is the risk-free discount factor.
Merton Model
Equity as a call on firm assets: $$E_0 = V_0\Phi(d_1) - De^{-rT}\Phi(d_2)$$ $$d_1 = \frac{\ln(V_0/D) + (r + \sigma_V^2/2)T}{\sigma_V\sqrt{T}}, \quad d_2 = d_1 - \sigma_V\sqrt{T}$$
Risk-neutral default probability: $\Phi(-d_2)$.
B.12 Risk Measures
Value at Risk
For loss $L$ with CDF $F_L$: $$\text{VaR}_\alpha = F_L^{-1}(\alpha) = \inf{l : F_L(l) \geq \alpha}$$
For $L \sim N(\mu, \sigma^2)$: $\text{VaR}_\alpha = \mu + \sigma\Phi^{-1}(\alpha)$.
Expected Shortfall (CVaR)
$$\text{ES}\alpha = E[L \mid L \geq \text{VaR}\alpha] = \frac{1}{1-\alpha}\int_\alpha^1 \text{VaR}_u,du$$
For $L \sim N(\mu, \sigma^2)$: $$\text{ES}_\alpha = \mu + \sigma\frac{\phi(\Phi^{-1}(\alpha))}{1-\alpha}$$
ES is a coherent risk measure (satisfies subadditivity); VaR is not.
Coherent Risk Measure Axioms
A risk measure $\rho$ is coherent if:
- Monotonicity: $X \leq Y \Rightarrow \rho(X) \geq \rho(Y)$
- Subadditivity: $\rho(X+Y) \leq \rho(X) + \rho(Y)$
- Positive homogeneity: $\rho(\lambda X) = \lambda\rho(X)$ for $\lambda > 0$
- Translation invariance: $\rho(X + c) = \rho(X) - c$
Back to Summary