CommencerCommencer gratuitement

Comparing approaches

In this exercise, you're going to investigate whether the maximum Sharpe portfolios differ when you are using the normal historic expected risk and returns, and when using the exponentially weighted risk and returns. You saw during the video that the exponentially weighted volatility follows the real volatility much closer, but do you actually see a big difference in the portfolio weights when using one, or the other? That's what you'll find out.

The exponentially weighted risk and return have been calculated using a span of 252 trading days, so it looks back through a maximum period of a year. Available for you are: cleaned_weights_maxsharpe, perf_max_sharpe, cleaned_weights_maxsharpe_EW, perf_max_sharpe_EW. The _EW part stands for exponentially weighted.

Cet exercice fait partie du cours

Introduction to Portfolio Analysis in Python

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Print the weights of both portfolios types
print(____, ____, sep="\n")
Modifier et exécuter le code