BaşlayınÜcretsiz başlayın

Portfolio optimization: Max Sharpe

In this exercise, you're going to calculate the portfolio that gives the Maximum Sharpe ratio. Often, this is the portfolio the investor wants to invest in, as it provides the highest possible return to risk ratio.PyPortfolioOpt makes it very easy to calculate this portfolio from a set of historical price data.

Available for you are the mean historic return for a small portfolio of stocks under mu and a covariance matrix belonging to our portfolio under Sigma. You'll need these as inputs to calculate the Efficient Frontier and Maximum Sharpe portfolio. Let's try it!

Bu egzersiz, kursun bir parçasıdır

Introduction to Portfolio Analysis in Python

Kursa Göz Atın

Uygulamalı etkileşimli egzersiz

Bu egzersizi bu örnek kodu tamamlayarak deneyin.

# Define the efficient frontier
ef = ____(____, ____)
Kodu Düzenle ve Çalıştır