GARCH 모형 가정 검증

Python으로 배우는 GARCH 모델

Chelsea Yang

Data Science Instructor

시각 검토

원시 수익률 데이터

표준화 잔차

Python으로 배우는 GARCH 모델

자기상관

  • 시차가 있을 때 변수와 자기 자신의 상관을 설명

  • 표준화 잔차에 자기상관이 있으면 모형이 적절하지 않을 수 있음

자기상관 탐지:

  • ACF 플롯
  • Ljung-Box
Python으로 배우는 GARCH 모델

ACF 플롯

  • ACF: AutoCorrelation Function
  • ACF 플롯: 시차별 자기상관의 시각화

ACF 플롯

그림의 빨간 영역은 신뢰구간(알파 = 5%)을 나타냅니다.

Python으로 배우는 GARCH 모델

Python에서 ACF 플롯

from statsmodels.graphics.tsaplots import plot_acf

plot_acf(my_data, alpha = 0.05)
Python으로 배우는 GARCH 모델

Ljung-Box 검정

  • 시계열의 여러 자기상관이 0과 다른지 검정
  • H0: 데이터는 독립적으로 분포함
  • p-값 < 5%: 모형이 적절하지 않음
Python으로 배우는 GARCH 모델

Ljung-Box 검정 Python

# Import the Python module
from statsmodels.stats.diagnostic import acorr_ljungbox
# Perform the Ljung-Box test
lb_test = acorr_ljungbox(std_resid , lags = 10)
# Check p-values
print('P-values are: ', lb_test[1])
Python으로 배우는 GARCH 모델

연습해 봅시다!

Python으로 배우는 GARCH 모델

Preparing Video For Download...