Get startedGet started for free

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.

This exercise is part of the course

Introduction to Portfolio Risk Management in Python

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Convert the decimal returns into percentage returns
percent_return = StockPrices['Returns']____
Edit and Run Code