Block maxima
Until now you've worked with a portfolio of four investment banks for the period 2005 - 2010. Now you'll zero in on a single asset, the stock of General Electric, for the same period and apply extreme value theory to its time series.
In this exercise, you'll examine the time series of block maxima for GE's losses
over the period 2008 - 2009, using the .resample()
method for three different block lengths: one week, one month, and one quarter, visualizing each series in a plot using the axis_*
plot objects.
This exercise is part of the course
Quantitative Risk Management in Python
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Resample the data into weekly blocks
weekly_maxima = losses.____("W").____()
# Plot the resulting weekly maxima
axis_1.plot(____, label = "Weekly Maxima")
axis_1.legend()
plt.figure("weekly")
plt.show()