Portfolio Risk Allocation
Overview
This project explored portfolio construction and risk allocation methods using MATLAB, with a focus on how different optimization frameworks translate return, covariance and investor-view assumptions into portfolio weights.
The work compared classical mean-variance ideas with resampled efficient frontiers, Black-Litterman expected returns and equal-risk-contribution portfolio construction.
The project should be read as an asset-allocation research prototype, not as a live trading system.
Problem
Portfolio optimization is highly sensitive to expected returns, covariance estimates and constraints. Small changes in inputs can produce unstable or concentrated allocations.
The goal was to compare allocation methods that address this instability from different angles: resampling, equilibrium-implied returns, subjective views and risk-budgeting logic.
Methods
The project combined several allocation approaches:
- Mean-variance efficient frontier as the classical benchmark.
- Resampled frontier using simulated return paths to reduce sensitivity to estimation noise.
- Black-Litterman to combine market-implied equilibrium returns with investor views.
- Equal Risk Contribution to allocate portfolio risk more evenly across assets.
- Inverse-volatility weighting as a simple risk-based benchmark.
- Rolling allocation experiments for time-varying portfolio construction.
- VaR-based risk controls for evaluating downside risk and allocation robustness.
Black-Litterman Framework
The Black-Litterman component started from market-capitalization weights and a covariance matrix to infer equilibrium expected returns through reverse optimization.
implied excess returns = risk_aversion * covariance * market_weights
Investor views were encoded through a view matrix and a vector of expected view returns. The posterior Black-Litterman returns were then used to derive new portfolio weights.
Equal Risk Contribution
The Equal Risk Contribution component searched for portfolio weights such that each asset contributed approximately the same amount of total portfolio risk.
minimize differences between asset risk contributions subject to: weights sum to 1 weights are non-negative
The implementation used constrained nonlinear optimization and verified the result through marginal and percentage risk contributions.
Resampling and Rolling Analysis
The resampling component simulated return paths from an estimated mean and covariance structure, computed multiple efficient frontiers and averaged the resulting portfolio weights.
The goal was to obtain smoother and less input-sensitive portfolio allocations than a single-sample efficient frontier.
Rolling experiments extended this logic to time-varying input estimates, allowing allocations to adapt as covariance and return estimates changed.
VaR-Based Risk Controls
The portfolio-allocation work was complemented by Value-at-Risk diagnostics and backtesting logic used to evaluate whether risk estimates were consistent with realized portfolio behavior.
These controls were used as a validation layer for allocation and strategy experiments, rather than as standalone trading signals.
- Rolling Value-at-Risk estimation for portfolio downside risk.
- Exceedance analysis comparing realized losses with VaR thresholds.
- Coverage-based tests for checking whether VaR violations were too frequent or too rare.
- Independence-style diagnostics for clustering of VaR violations over time.
- Traffic-light-style interpretation of backtesting results.
- Comparison of allocation behavior under different risk-control assumptions.
Implemented Elements
- Import and preparation of index return datasets.
- Covariance matrix construction from volatilities and correlations.
- Classical efficient-frontier calculation.
- Monte Carlo resampling of return paths and portfolio weights.
- Black-Litterman posterior expected-return calculation.
- Portfolio-weight reconstruction from Black-Litterman returns.
- Equal Risk Contribution optimization with nonlinear constraints.
- Inverse-volatility allocation benchmark.
- Rolling risk-allocation experiments.
- VaR and VaR-backtesting diagnostics for portfolio risk control.
Outputs
The project produced portfolio weights, efficient-frontier plots, resampled frontier comparisons, Black-Litterman expected-return adjustments and risk-contribution diagnostics.
The outputs were used to compare how different allocation methods distribute risk and expected return across assets.
Evaluation Limits
The project focused on allocation methodology rather than production-grade trading evaluation.
- Expected returns: mean-variance and Black-Litterman outputs depend strongly on return assumptions.
- Covariance estimation: sample covariance can be unstable in small or changing samples.
- Views: Black-Litterman requires careful interpretation of subjective views and confidence levels.
- Backtesting: a full trading evaluation would require transaction costs, turnover and walk-forward rules.
- VaR diagnostics: VaR-based tests depend on distributional assumptions, window design and the number of exceedances.
- Constraints: real portfolios may require liquidity, concentration and mandate constraints.
Modern Extension
A modern version of the project would turn the allocation logic into a reproducible research notebook and add a stronger backtesting layer.
- Run walk-forward portfolio rebalancing with transaction costs.
- Compare equal-weight, inverse-volatility, ERC, minimum-variance and Black-Litterman portfolios.
- Add shrinkage covariance estimators and factor-model covariance estimates.
- Track drawdown, turnover, volatility, Sharpe ratio and tail risk.
- Formalize VaR backtesting with Kupiec, Christoffersen and Basel traffic-light reporting.
- Stress-test allocations across market regimes.
- Port the implementation to Python with transparent tests and configuration.
Technologies and Methods Used
- MATLAB for optimization, simulation and visualization.
- Mean-variance optimization for efficient-frontier construction.
- Black-Litterman for equilibrium returns and investor views.
- Equal Risk Contribution for risk-budgeting portfolio weights.
- Monte Carlo resampling for more stable frontier estimation.
- Constrained nonlinear optimization for risk-contribution objectives.
- Covariance and correlation modeling for portfolio risk estimation.
- Value-at-Risk backtesting for downside-risk validation.
Resources
Code and raw market data are not public.
An anonymized technical note can be prepared upon request.