Today I practiced Python for Finance on Sololearn! This time I learned to optimize a portfolio. I allocated assets to get the maximum return and minimum risk. I ran a loop to calculate the returns, volatility, and Sharpe ratios for randomly generated portfolios. Finally, I plotted them in an Efficient Frontier to show the most efficient portfolio. Next time I will be reviewing everything we have learned!

Bug Zero Icon

OUR NEWSLETTER