Risk Budgeting: Allocating Risk Across Portfolios
Module: Fintech AI | Difficulty: Advanced
Risk Budget
Risk Budgeting Problem
Equal Risk Contribution
import numpy as np
from scipy.optimize import minimize
class RiskBudgetOptimizer:
def __init__(self, cov_matrix, risk_budgets):
self.cov = cov_matrix; self.budgets = risk_budgets
def optimize(self):
n = len(self.budgets)
def objective(w):
portfolio_vol = np.sqrt(w @ self.cov @ w)
risk_contributions = w * (self.cov @ w) / portfolio_vol
target_rc = self.budgets * portfolio_vol
return np.sum((risk_contributions - target_rc)**2)
constraints = [{'type': 'eq', 'fun': lambda w: np.sum(w) - 1}]
w0 = np.ones(n) / n
result = minimize(objective, w0, constraints=constraints, method='SLSQP')
return result.x
Research Insight: Risk budgeting allows investors to allocate risk based on conviction rather than capital. The key insight is that traditional equal-weight or market-cap-weight portfolios have unintended risk concentrations. Risk budgeting provides explicit control over risk allocation.