This repository demonstrates how to analyze diversification in a portfolio through covariance and correlation among assets, and then optimize the portfolio for minimum risk using Python and Object-Oriented Programming (OOP).
In portfolio theory, risk is not just about individual asset volatility โ it depends on how assets move together.
This project implements a Portfolio Optimizer that:
- Calculates covariance and correlation matrices
- Builds portfolios (equal-weight & optimized)
- Shows how diversification reduces risk
- Finds the optimal risk-minimizing portfolio using numerical optimization
For n assets with weights ( w ), covariance matrix ( \Sigma ):
We minimize risk subject to full investment: