金融危機期間的極端事件
你可以使用廣義極值(GEV, Generalized Extreme Value)分配來檢視通用電氣(GE)在 2008 與 2009 年金融危機期間的極端損失。
這段期間同時發生 GE 的流動性危機,最終需要波克夏海瑟威(Berkshire Hathaway)的華倫·巴菲特(Warren Buffet)緊急投資 30 億美元,才避免其商業本票違約。
已提供 GE 的 losses 與每週最大損失 weekly_max,以及 scipy.stats 中的 GEV 分配 genextreme。
本練習屬於課程
Python 量化風險管理
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Plot the log daily losses of GE over the period 2007-2009
losses.____()
# Find all daily losses greater than 10%
extreme_losses = losses[____]
# Scatter plot the extreme losses
____.plot(style='o')
plt.show()