![](https://neoshare.net/wp-content/uploads/2021/03/09yf-9nw2Nf_QEdDr-750x420.png)
![Rishi Mishra](https://neoshare.net/wp-content/uploads/2021/03/Stock-Price-Analysis-via-Python-using-Hindustan-Unilever-Limited-Dataset.png)
Module 5 : Modern Portfolio Theory
In this module, We’ll be looking at investment portfolio optimization with python, the fundamental concept of diversification and the creation of an efficient frontier that can be used by investors to choose specific mixes of assets based on investment goals; that is, the trade-off between their desired level of portfolio return vs their desired level of portfolio risk.
Modern Portfolio Theory suggests that it is possible to construct an “efficient frontier” of optimal portfolios, offering the maximum possible expected return for a given level of risk. It suggests that it is not enough to look at the expected risk and return of one particular stock. By investing in more than one stock, an investor can reap the benefits of diversification, particularly a reduction in the riskiness of the portfolio. MPT quantifies the benefits of diversification, also known as not putting all of your eggs in one basket.
Read more about Modern Portfolio Theory
Problem Statements :
- For your chosen stock, calculate the mean daily return and daily standard deviation of returns, and then just annualise them to get the mean expected annual return and volatility of that single stock. ( annual mean = daily mean 252 , annual stdev = daily stdev sqrt(252) )
2. Now, we need to diversify our portfolio. Build your own portfolio by choosing any 5 stocks, preferably of different sectors and different caps. Assume that all 5 have the same weightage, i.e. 20%. Now calculate the annual returns and volatility of the entire portfolio ( Hint: Don’t forget to use the covariance )
3. Prepare a scatter plot for differing weights of the individual stocks in the portfolio, the axes being the returns and volatility. Colour the data points based on the Sharpe Ratio ( Returns/Volatility) of that particular portfolio.
Mark the 2 portfolios where:
- Portfolio 1 — The Sharpe ratio is the highest
- Portfolio 2 — The volatility is the lowest.
Output Scatter plot :
Link to the Datasets :
Link to my previous article in the series :