모델 설명

Python으로 배우는 시계열 분석

Rob Reider

Adjunct Professor, NYU-Courant Consultant, Quantopian

MA(1) 모델의 수식 설명

$\large \quad \quad \quad \quad R_t \ = \ \ \mu \ \ + \ \ \epsilon_t \ + \ \ \theta \ \epsilon_{t-1} $

  • 우변에 시차 오차항이 하나이므로:
    • 1차 MA 모델, 또는
    • MA(1) 모델이라 함
  • MA 파라미터는 $\large \theta$
  • $\theta$의 모든 값에 대해 정상성 성립
Python으로 배우는 시계열 분석

MA(1) 파라미터 해석

$\large \quad \quad \quad \quad R_t \ \ = \ \ \mu \ \ + \ \ \epsilon_t\ + \ \ \theta \ \epsilon_{t-1} $

  • $\large \theta$ 음수: 1기간 평균 회귀
  • $\large \theta$ 양수: 1기간 모멘텀
  • 참고: 1기간 자기상관은 $\large \theta/(1+\theta^2)$이며, $\large \theta$가 아님
Python으로 배우는 시계열 분석

MA(1) 자기상관 함수 비교

  • $\large \theta=0.9$

  • $\large \theta=0.5$

  • $\large \theta=-0.9$

  • $\large \theta=-0.5$

Python으로 배우는 시계열 분석

MA(1) 과정 예시: 장중 주식 수익률

Python으로 배우는 시계열 분석

장중 주식 수익률의 자기상관 함수

Python으로 배우는 시계열 분석

고차 MA 모델

  • MA(1)

$\large \quad \quad R_t = \mu + \epsilon_t - \theta_1 \ \epsilon_{t-1}$

  • MA(2)

$\large \quad \quad R_t = \mu + \epsilon_t - \theta_1 \ \epsilon_{t-1} - \theta_2 \ \epsilon_{t-2}$

  • MA(3)

$\large \quad \quad R_t = \mu + \epsilon_t - \theta_1 \ \epsilon_{t-1} - \theta_2 \ \epsilon_{t-2} - \theta_3 \ \epsilon_{t-3}$

  • ...
Python으로 배우는 시계열 분석

MA 과정 시뮬레이션

from statsmodels.tsa.arima_process import ArmaProcess
ar = np.array([1])
ma = np.array([1, 0.5])
AR_object = ArmaProcess(ar, ma)
simulated_data = AR_object.generate_sample(nsample=1000)
plt.plot(simulated_data)
Python으로 배우는 시계열 분석

연습해 봅시다!

Python으로 배우는 시계열 분석

Preparing Video For Download...