Return distributions
In order to analyze the probability of outliers in returns, it is helpful to visualize the historical returns of a stock using a histogram.
You can use the histogram to show the historical density or frequency of a given range of returns. Note the outliers on the left tail of the return distribution are what you often want to avoid, as they represent large negative daily returns. Outliers on the right hand side of the distribution are normally particularly good events for the stock such as a positive earnings surprise.
StockPrices from the previous exercise is available in your workspace, and matplotlib.pyplot is imported as plt.
Cet exercice fait partie du cours
Introduction to Portfolio Risk Management in Python
Exercice interactif pratique
Essayez cet exercice en complétant cet exemple de code.
# Convert the decimal returns into percentage returns
percent_return = StockPrices['Returns']____