Histograms are another possible indicator for a stock’s performance, by tracking daily returns


Daily returns of S&P 500 over a long time
Kurtosis can be used to compare a stock’s daily return histogram with a normal distribution

<aside> 📌 SUMMARY: Histograms are another indicator for a stock’s performance. We can use kurtosis for evaluation
</aside>
.hist() to get histogram
Histogram with 20 bins
daily_returns.hist()# First get the daily returns from the stock
daily_returns = (df/df.shift(1)) - 1
daily_returns = daily_returns[1:]
# Plot the histogram
daily_returns.hist() # Default 10 bins
# Increase the number of bines
daily_returns.hist(bins=20)
From the histogram, we can plot the mean and std to get additional information on the graph
<aside> 📌 SUMMARY: Use dataframe operations to discover statistics about histograms or even plot them together
</aside>