Volatility clustering

Run the following code to investigate this second fact by plotting the log returns series.

  1. Visualize the log returns series:
df.log_rtn.plot(title='Daily MSFT returns')

Executing the code results in the following plot:

We can observe clear clusters of volatility—periods of higher positive and negative returns.

Get Python for Finance Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.