This repository implements a Risk Parity portfolio optimization strategy, a modern alternative to traditional capital allocation methods such as Equal Weighting and Market Capitalization Weighting. The goal is to construct a portfolio where each asset contributes equally to the overall risk.
Risk Parity is an asset allocation strategy that focuses on equalizing risk contribution from all portfolio components rather than equally allocating capital. By doing so, it enhances portfolio diversification, improves resilience to market shocks, and reduces concentration risk.
├── README.md # This file
├── notebook.ipynb # Main implementation and visualization notebook
├── references.txt # Research and reference materials
└── requirements.txt # List of dependencies
-
Volatility & Covariance Matrix (Σ)
Portfolio volatility is computed using the covariance matrix of asset returns. -
Marginal Risk Contribution (MRC)
MRC quantifies the risk an asset contributes to the portfolio. -
Equal Risk Contribution (ERC)
The goal is to find weights such that each asset’s contribution to portfolio risk is equal. -
Optimization Using SQP (Sequential Quadratic Programming)
The optimization problem is solved numerically usingscipy.optimize.minimize()
with the SLSQP method.
- Fetching data using
yfinance
- Computing covariance matrix
- Implementing portfolio volatility and MRC
- Solving the optimization problem using SLSQP
- Evaluating portfolio performance using optimized weights
- Clone the Repository:
git clone https://github.com/its-adityagoyal/Risk-Parity-Portfolio-Management.git
cd Risk-Parity-Portfolio-Management
- Create Virtual Environment (optional but recommended):
python -m venv env
source env/bin/activate # For Unix or Mac
env\Scripts\activate # For Windows
- Install Dependencies:
pip install -r requirements.txt
A detailed explanation of the Risk Parity model, mathematical derivations, and optimization procedure is available in the Risk Parity Documentation
This project is licensed under the MIT License. See LICENSE License for details.
- Sébastien Maillard†, Thierry Roncalli‡ & Jérôme Teiletche§ - PDF
- For more reference, see
references.txt