ComeçarComece de graça

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.

Este exercício faz parte do curso

Introduction to Portfolio Risk Management in Python

Ver curso

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

# Convert the decimal returns into percentage returns
percent_return = StockPrices['Returns']____
Editar e executar o código