About this question
Hard · portfolio_optimization · Quant Researcher interview question · portfolio-optimization, risk, covariance, risk-parity, linear-algebra
Marginal risk contribution (MRC) measures the sensitivity of portfolio volatility to a small change in an asset's weight. It is a key component in modern portfolio construction, enabling risk decomposition and the design of risk-parity and risk-budgeting strategies. The MRC vector is defined as the gradient of portfolio volatility with respect to the asset weights, ∇_w(σ_p). Task Implement the function solution(cov: list, weights: list) -> list to calculate the marginal risk contribution (MRC)