Python 量化風險管理
Jamsheed Shorish
Computational Economist
scipy.stats.norm.fit(),將常態分配擬合到資料
norm.fit() 的常態分配
norm.fit() 的常態分配t.fit() 的 Student t 分配
critical_values,則拒絕常態分配scipy.stats.andersonloss 資料計算檢定結果from scipy.stats import andersonanderson(loss)
AndersonResult(statistic=11.048641503898523,
critical_values=array([0.57 , 0.649, 0.779, 0.909, 1.081]),
significance_level=array([15. , 10. , 5. , 2.5, 1. ]))


scipy.stats 中為 skewnorm
scipy.stats.skewtestscipy.stats 匯入 skewtestloss 資料計算檢定from scipy.stats import skewtestskewtest(loss)
SkewtestResult(statistic=-7.786120875514511,
pvalue=6.90978472959861e-15)
Python 量化風險管理