Derivatives & Risk
Asset Allocation
Corporate Finance
Technical Methodology
A deep dive into the mathematical frameworks, assumptions, and architectural decisions powering this portfolio.
Heston Stochastic Volatility Model
Options PricingThe Black-Scholes model assumes constant volatility, which fails to capture the "Volatility Smile" observed in real markets. I implemented the Heston Model (1993), which models volatility as a stochastic process governed by the following Stochastic Differential Equations (SDEs):
The Dynamics (SDEs)
Where \( dW_{1,t} \) and \( dW_{2,t} \) are Wiener processes with correlation \( \rho \).
Negative correlation (\( \rho < 0 \)) creates the "skew" (downside crash fear).
Modern Portfolio Theory vs. HRP
Asset AllocationTraditional Mean-Variance Optimization (MVO) is mathematically elegant but practically unstable. It is a "garbage-in, garbage-out" system where small errors in expected returns lead to extreme corner solutions.
To solve this, I implemented Hierarchical Risk Parity (HRP), a machine learning approach that uses clustering to allocate capital more robustly.
Mean-Variance (Markowitz)
Solves the quadratic programming problem to minimize variance for a target return.
Flaw: Inverts the covariance matrix \( \Sigma^{-1} \), amplifying noise and estimation errors.
Hierarchical Risk Parity
Uses graph theory to cluster assets (e.g., Tech vs. Energy) and allocates risk recursively down the tree.
- Step 1: Clustering (Linkage)
- Step 2: Matrix Seriation (Quasi-Diag)
- Step 3: Recursive Bisection
Edge: No matrix inversion needed. Highly robust to market shocks.
Automated Valuation Engine (DCF)
Intrinsic ValueThe Valuation Sandbox is an institutional-grade Discounted Cash Flow (DCF) engine designed for rapid fundamental analysis. It automates the retrieval of financial statements (via Yahoo Finance API) and constructs a dynamic 2-stage valuation model.
1. Free Cash Flow Forecast
The engine projects Unlevered Free Cash Flow (UFCF) for an explicit forecast period (5 years) based on user-defined growth assumptions.
2. Terminal Value
Users can toggle between Perpetuity Growth (Gordon Growth) and Exit Multiple methods to capture value beyond the forecast horizon.
Enterprise to Equity Bridge
To arrive at the final Intrinsic Value per Share, the model automatically performs the standard bridge adjustments. Net Debt and Share Count are auto-fetched but can be overridden for scenario analysis.
Features
- Sensitivity Matrix: A dynamic data table that visualizes how the target price evolves under different regimes of risk (WACC) and growth.
- Scenario Overrides: Users can manually stress-test "Net Debt" or "EBITDA" to see how leverage impacts equity value.
- Excel Export: One-click generation of a fully formula-based Excel model for offline use.
Reverse LBO Solver
Deal AdvisoryStandard DCF models are sensitive to WACC and Terminal Growth. In Private Equity, the "Ability to Pay" is often determined by the Maximum Leverage available and a target IRR Floor (usually 20-25%).
The algorithm solves backwards:
1. Calculate Exit Enterprise Value in Year 5.
2. Subtract Net Debt (reduced by FCF paydown).
3. Discount resulting Equity Value by Target IRR (20%).
4. Add Initial Debt Capacity (4.5x EBITDA).
Credit & Insolvency Models
Distressed DebtAssessing default risk requires a hybrid approach. I combine accounting-based forensics (Altman) with structural market-based models (Merton) to triangulate the true health of a firm.
Structural Model: Merton Distance-to-Default
Based on Merton (1974), we treat a company's Equity as a Call Option on its assets, with the Strike Price equal to its Debt.
If the Asset Value \( V_A \) drops below the Debt \( D \), the option is Out-of-the-Money, implying default. The "Distance to Default" measures how many standard deviations the asset value is from this distress barrier.
Accounting Model: Altman Z-Score
Statistical Arbitrage (Pairs)
Quant TradingCorrelation is not enough for pairs trading; high correlation can break down ("spurious correlation"). Instead, I rely on Cointegration, which tests for a long-term stationary relationship between two non-stationary time series.
Step 1: OLS Regression
We calculate the "Hedge Ratio" \( \beta \) by regressing Asset Y against Asset X.
The residual \( \epsilon_t \) is the "Spread."
Step 2: ADF Test
We apply the Augmented Dickey-Fuller test to the spread \( \epsilon_t \).
If p-value < 0.05, we reject the null hypothesis (Random Walk) and confirm the spread is Mean Reverting.
Value-at-Risk (VaR)
Risk MgmtMy engine calculates both Parametric VaR (assuming normal distribution) and Historical VaR (using actual past returns). Financial returns exhibit "Fat Tails" (Kurtosis > 3), meaning 3-sigma events happen far more often than a normal distribution predicts.
Parametric Formula
Where \( z_{\alpha} \) is the Z-score for the confidence interval (e.g., 1.645 for 95%). Historical VaR simply takes the \( \alpha \)-percentile of the actual return distribution.