สมมติฐานการกระจาย

GARCH Models ใน Python

Chelsea Yang

Data Science Instructor

ทำไมต้องตั้งสมมติฐาน

  • ความผันผวนไม่สามารถสังเกตได้โดยตรง

  • โมเดล GARCH ใช้ค่าคงเหลือเป็น volatility shocks $$ r_t = \mu_t + \epsilon_t $$

  • ความผันผวนสัมพันธ์กับค่าคงเหลือ: $$ \epsilon_t = \sigma_t * \zeta (WhiteNoise)$$

GARCH Models ใน Python

ค่าคงเหลือมาตรฐาน

  • ค่าคงเหลือ = ผลตอบแทนที่คาดการณ์ - ผลตอบแทนเฉลี่ย $$ residuals = \epsilon_t = r_t - \mu_t $$
  • ค่าคงเหลือมาตรฐาน = ค่าคงเหลือ / ความผันผวนของผลตอบแทน $$ std\,Resid = \frac{\epsilon_t}{\sigma_t} $$
GARCH Models ใน Python

ค่าคงเหลือใน GARCH

gm_std_resid = gm_result.resid / gm_result.conditional_volatility
plt.hist(gm_std_resid, facecolor = 'orange',label = 'standardized residuals')

ฮิสโตแกรมของค่าคงเหลือมาตรฐาน

GARCH Models ใน Python

Fat tails

  • ความน่าจะเป็นที่จะพบผลตอบแทนขนาดใหญ่ (บวกหรือลบ) สูงกว่าการกระจายแบบปกติ

ตัวอย่าง Fat tail

GARCH Models ใน Python

ความเบ้ (Skewness)

  • วัดความไม่สมมาตรของการกระจายความน่าจะเป็น

ตัวอย่างของความเบ้

GARCH Models ใน Python

Student's t-distribution

ตัวอย่าง t-distribution

พารามิเตอร์ $\nu$ ของการกระจาย Student's t บ่งบอกรูปร่างของการกระจาย

GARCH Models ใน Python

GARCH กับ t-distribution

arch_model(my_data, p = 1, q = 1,
           mean = 'constant', vol = 'GARCH', 
           dist = 't')
                              Distribution                              
========================================================================
                 coef    std err          t      P>|t|  95.0% Conf. Int.
.-----------------------------------------------------------------------
nu             4.9249      0.507      9.709  2.768e-22 [  3.931,  5.919]
========================================================================
GARCH Models ใน Python

GARCH กับ skewed t-distribution

arch_model(my_data, p = 1, q = 1,
           mean = 'constant', vol = 'GARCH', 
           dist = 'skewt')
                                Distribution                               
===========================================================================
                 coef    std err          t      P>|t|     95.0% Conf. Int.
.--------------------------------------------------------------------------
nu             5.2437      0.575      9.118  7.681e-20    [  4.117,  6.371]
lambda        -0.0822  2.541e-02     -3.235  1.216e-03 [ -0.132,-3.241e-02]
===========================================================================
GARCH Models ใน Python

มาฝึกกันเถอะ!

GARCH Models ใน Python

Preparing Video For Download...