Skip to content

tejaslinge/Risk-Management-and-Markowitz-Efficient-Frontier

Repository files navigation

Risk-Management-Measures-and-Markowitz-Efficient-Frontier

Markowitz Efficient Frontier and other risk management measures

Developed by Nobel Laureate Harry Markowitz, Modern portfolio theory is a widely used investing model designed to help investors minimize market risk while maximizing returns for their portfolio. It is a theory of investing based on the premise that markets are efficient and more reliable than investors.

In this Jupyter Notebook, I've demonstrated how to calculate some of the basic risk measures and plot the Efficient Frontier for a portfolio in Python. This notebook includes calculation and plots of measures such as:

  1. Standard Deviation (Volatility)
  2. Expected Returns
  3. Drawdown
  4. VaR and CVar
  5. Sharpe Ratio
  6. Efficient Frontier
  7. Capital Market Line (CML)
  8. Global Minimum Variance (GMV) Portfolio
  9. Beta

The notebook contains calculations of portfolio volatility based on a number of measures and how portfolios can be optimized using Modern Portfolio Theory (MPT). The results are plotted using visualization libraries like Plotly and Seaborn.

Github performs a static render of the notebooks and it doesn't include the embedded HTML/JavaScript that makes up a plotly graph, so the graphs which are plotted using Plotly cannot be displayed in Github. To view the complete notebook with outputs as well, one nice option is to paste the link of GitHub notebook into http://nbviewer.jupyter.org/, which will present a rich view of the notebook.

OR

Visit https://nbviewer.jupyter.org/github/tejaslinge/Risk-Management-and-Markowitz-Efficient-Frontier/blob/main/Risk%20Measures%20and%20Efficient%20Frontier.ipynb to view complete Jupyter notebook.