MODULE 06
Mathematical Reference
Complete derivations and formulas underlying the NewRiskGraph quantitative engine, beautifully typeset.
1. Stochastic Processes
1a. Geometric Brownian Motion (SDE)
Asset price dynamics under the risk-neutral measure. μ is the drift (expected return), σ is volatility, W_t is a Wiener process (standard Brownian motion).
1b. Euler-Maruyama Discretization
Discrete-time simulation of GBM. The Itô correction term −σ²/2 ensures E[S(t)] = S(0)e^{μt}, not S(0)e^{(μ+σ²/2)t}.
1c. Itô's Lemma
The fundamental theorem of stochastic calculus. Generalizes the chain rule to functions of Itô processes. The extra ½σ²S²∂²f/∂S² term arises because (dW)² = dt.
Used in →Monte Carlo
2. Portfolio Theory
2a. Portfolio Variance (Markowitz 1952)
For weight vector w and covariance matrix Σ. Cross-terms enable diversification: when ρᵢⱼ < 1, portfolio risk is strictly less than the weighted sum of individual risks.
2b. Diversification Ratio
DR = 1 means zero diversification (perfect correlation). DR > 1 means diversification reduces portfolio risk below the weighted sum. Under full stress (α→1), DR→1.
Used in →Stress Testing
2c. Sharpe Ratio
Risk-adjusted return. Annualized by √(252/T) where T is the simulation horizon in trading days. We use rf = 0 for simplicity (excess return = total return).
3. Graph Centrality
3a. Eigenvector Centrality
Node importance proportional to the importance of its neighbors. Computed via power iteration: x ← Ax/‖Ax‖ repeated until convergence. Equivalent to the dominant eigenvector of the adjacency matrix.
Used in →Network Graph
3b. Betweenness Centrality
Fraction of all shortest paths that pass through vertex v. σ_st = total shortest paths from s to t, σ_st(v) = those passing through v. Computed via Brandes algorithm O(VE).
Used in →Network Graph
3c. GSVI — Graph-Weighted Systemic Vulnerability Index
Portfolio-weighted average of blended centrality scores. λ_eig = 0.6, λ_bet = 0.4. High GSVI = concentrated exposure to systemically important (bridge) assets.
Used in →Network Graph
4. Spectral Risk
4a. Spectral Risk Ratio
Since Tr(Σ) = n for a correlation matrix, Σλ_i = n. SRR measures the fraction of total variance explained by the dominant factor. Under Random Matrix Theory (Marchenko-Pastur), SRR > (1+√(n/T))²/n signals a true systemic factor.
Used in →Network Graph
4b. Marchenko-Pastur Bounds
Eigenvalue bounds for a purely random n×T matrix (null hypothesis). Eigenvalues outside [λ₋, λ₊] carry genuine information. For n=10, T=252: λ₊ ≈ 1.84.
Used in →Network Graph
5. Monte Carlo Methods
5a. Cholesky Decomposition
Factorize the covariance matrix into a lower triangular L. Multiplying iid standard normals Z by L induces the correct correlation structure. Standard error ∝ 1/√N.
5b. Box-Muller Transform
Generates pairs of independent standard normal variates from uniform U₁,U₂ ~ Uniform(0,1). Used instead of inverse-CDF for numerical efficiency.
5c. Value at Risk (VaR)
The α-quantile loss. VaR(95%) = the loss exceeded by only 5% of simulated paths. Not subadditive — does not account for tail shape.
Used in →Monte Carlo
5d. Conditional Value at Risk (CVaR)
The expected loss given that the loss exceeds VaR. Coherent risk measure (subadditive, convex). Always ≥ VaR. Computed as the mean of the worst (1−α)×N simulation outcomes.
Used in →Monte Carlo
6. Stress Testing
6a. PSD-Safe Stress Operator
Convex combination between realized covariance and the worst-case (all correlations = 1) matrix. Σ_max = σσᵀ is rank-1 PSD. By convexity, Σ_s is PSD for all α ∈ [0,1].
Used in →Stress Testing
6b. Stressed Portfolio Volatility
Annualized portfolio volatility as a function of stress level α. Monotonically increasing from σ_p(0) = realized vol to σ_p(1) = (Σ_iw_iσ_i) = diversification-free vol.
Used in →Stress Testing
7. Contagion Dynamics
7a. Capital Flow Contagion Rule
Iterative weight redistribution driven by the correlation-weighted adjacency matrix A. β controls the contagion rate. L1 normalization keeps weights summing to 1.
Used in →Stress Testing
7b. Stability Condition
The spectral radius of the system matrix. When β exceeds 1/λ_max, the dominant eigenvector of A absorbs all weight — herding collapse. The stability threshold is shown as a red line in the contagion simulator.
Used in →Stress Testing
7c. Herding Collapse Limit
As t→∞ with β above threshold, weights converge to the dominant eigenvector of A. All capital concentrates in the most central assets — maximum systemic fragility.
Used in →Stress Testing
8. Risk Measures
8a. Log Returns
Log returns are approximately normally distributed, time-additive, and numerically stable for GBM simulation. Preferred over simple returns for multi-period analysis.
8b. Pearson Correlation
Measures linear co-movement between asset log returns. Used to construct the correlation matrix and graph edge weights. ρ = 1 means perfect co-movement.
8c. Network Density
Fraction of possible edges present above threshold θ = 0.4. Dense networks transmit shocks more efficiently. D = 1 means all assets are highly correlated.
9. Efficient Frontier
9a. Efficient Frontier (Markowitz)
The set of portfolios achieving minimum variance for each target return μ*. The upper boundary is the efficient frontier. Solved via Lagrangian: L = wᵀΣw - λ(wᵀμ - μ*) - γ(wᵀ1 - 1).
9b. Global Minimum Variance Portfolio
The portfolio with the lowest possible variance regardless of expected return. Found by setting ∂L/∂w = 0 with only the budget constraint active (λ = 0).
10. Portfolio Attribution
10a. Marginal Risk Contribution (MRC)
The rate of change in portfolio volatility for a small change in the weight of asset i.
10b. Component Risk Contribution (CRC)
By Euler's homogeneous function theorem, the sum of all CRCs exactly equals total portfolio volatility: Σ CRC_i = σ_p.
11. Drawdown Analysis
11a. Peak-to-Trough Drawdown
Percentage decline from the historical peak to the current value. Max Drawdown (MDD) is the maximum of D_t over the entire period.