1. Learn
  2. /
  3. Courses
  4. /
  5. Quantitative Risk Management in Python

Exercise

Volatility and structural breaks

Visualizing volatility changes helps reveal possible structural break points in time series. By identifying when volatility appears to change, an informed choice of break point can be made that can, in turn, be used for further statistical analysis (such as the Chow test).

You'll examine two visualizations of volatility for the investment bank portfolio from 2008 - 2009, for two available portfolio weights: weights_with_citi and weights_without_citi. These correspond, respectively, to equal-weighted portfolios with and without Citibank, which exhibited (as you saw in Chapter 1) the highest volatility of the four assets over the period.

The portfolio prices for 2008 - 2009 with Citibank are available as prices_with_citi, and without Citibank as prices_without_citi.

Instructions

100 XP
  • Find the returns series for the two portfolios using weights_with_citi and weights_without_citi.
  • Compute the 30-day rolling window standard deviations for both portfolios.
  • Combine both Pandas Series objects into a single "vol" DataFrame object.
  • Plot the contents of the vol object to compare the two portfolio volatilities over time.