報酬的非常態分配

Python 投資組合分析入門

Charlotte Werger

Data Scientist

理想情況下,報酬服從常態分配

S&P500 報酬的常態分配

1 來源:evestment.com 的 S&P500 月報酬分配
Python 投資組合分析入門

但只看均值與標準差可能有誤導

同均值與標準差的兩個分配

1 來源:「An Introduction to Omega, Con Keating and William Shadwick, The Finance Development Center, 2002
Python 投資組合分析入門

偏度:偏向負向一側

偏度不同的分配

Python 投資組合分析入門

皮爾森偏度係數

$ $ $ Skewness = \frac{3(mean - median)}{\sigma} $ $ $

經驗法則:

  • $ Skewness < -1 $ 或 $ Skewness > 1 \Rightarrow$ 高度偏斜的分配
  • $ -1 < Skewness < -0.5 $ 或 $ 0.5 < Skewness < 1 \Rightarrow$ 中度偏斜的分配
  • $ -0.5 < Skewness < 0.5 \Rightarrow$ 近似對稱的分配
1 來源:https://brownmath.com/stat/shape.htm
Python 投資組合分析入門

峰度:肥尾分配

與常態相比的肥尾分配

1 來源:Pimco
Python 投資組合分析入門

如何解讀峰度

較高的峰度代表變異多由罕見的極端偏離造成,而非頻繁但幅度適中的偏離。

  • 常態分配的峰度正好為 3,稱為(中峰,mesokurtic)
  • 峰度 <3 稱為低峰(platykurtic):尾端較短且較細,中心峰較低且較寬。
  • 峰度 >3 稱為高峰(leptokurtic):尾端較長且較肥,中心峰較高且較尖(肥尾)。
1 來源:https://brownmath.com/stat/shape.htm
Python 投資組合分析入門

計算偏度與峰度

apple_returns=apple_price.pct_change()
apple_returns.head(3)

date
2015-01-02         NaN
2015-01-05   -0.028172
2015-01-06    0.000094
Name: AAPL, dtype: float64
apple_returns.hist()
Python 投資組合分析入門

Apple 近期報酬的長條圖

Python 投資組合分析入門

計算偏度與峰度

print("mean : ", apple_returns.mean())
print("vol  : ", apple_returns.std())
print("skew : ", apple_returns.skew())
print("kurt : ", apple_returns.kurtosis())
mean :  0.0006855391415724799
vol  :  0.014459504468360529
skew :  -0.012440851735057878
kurt :  3.197244607586669
Python 投資組合分析入門

一起來練習吧!

Python 投資組合分析入門

Preparing Video For Download...