์˜ค์ฐจ๋กœ ๋ฏธ๋ž˜๋ฅผ ์˜ˆ์ธกํ•œ๋‹ค

3 minute read

์˜ค์ฐจ๋กœ ๋ฏธ๋ž˜๋ฅผ ์˜ˆ์ธกํ•œ๋‹ค

<Moving-Average Model>์€ ์Œ๋‘ฅ์ด ๊ฐ™์€ ์กด์žฌ์ธ <Auto-Regressive Model>๋ณด๋‹ค๋Š” ์ดํ•ดํ•˜๊ธฐ ์–ด๋ ค์› ๋‹ค. ๐Ÿ˜ฅ ๊ทธ๋ž˜๋„ ์ตœ๋Œ€ํ•œ ์‰ฝ๊ฒŒ ํ’€์–ด์„œ ์„ค๋ช…ํ•ด๋ณด๊ฒ ๋‹ค.

Definition. Moving-Average Model

\[X(t) = \epsilon(t) + \phi_0 + \phi_1 \epsilon(t-1) + \phi_2 \epsilon(t-2) + \cdots + \phi_q \epsilon(t-q)\]

where all $\epsilon(t)$ are white noise.

๋ณดํ†ต $\phi_0$๋Š” ์‹œ๊ณ„์—ด์˜ ํ‰๊ท  $\mu = E \left[ X(t) \right]$๋กœ ๋‘”๋‹ค.

<MA Model>์˜ ์ˆ˜์‹์„ ๋ณด๋ฉด, ํ˜„์žฌ์™€ ๊ณผ๊ฑฐ์˜ ์˜ค์ฐจ $\epsilon(t)$์˜ Multiple Regression์œผ๋กœ ๊ตฌ์„ฑ๋˜์–ด ์žˆ๋‹ค.

Hyper-parameter๋Š” ๋ช‡๊ฐœ์˜ Lagged Error๋ฅผ ์“ธ ๊ฒƒ์ธ์ง€์— ๋Œ€ํ•œ $q$ ๊ฐ’์ด๋‹ค. ์ด๋ฅผ ๊ธฐ์ค€์œผ๋กœ $q$์ฐจ MA ๋ชจ๋ธ์€

\[\text{MA}(q)\]

๋ผ๊ณ  ํ‘œํ˜„ํ•œ๋‹ค.


๊ทธ๋Ÿฌ๋‚˜ ์ผ๋ฐ˜์ ์ธ Multiple Regression๊ณผ ๋‹ค๋ฅด๊ฒŒ, Regression์„ ๊ตฌ์„ฑํ•˜๋Š” lagged error term์˜ ๊ฐ’์€ ํ™•์ •์ ์œผ๋กœ ์ •ํ•ด์ง„ ํ˜•ํƒœ๊ฐ€ ์•„๋‹ˆ๋‹ค. ๊ทธ๋ ‡๊ธฐ์— ์ผ๋ฐ˜์ ์ธ LS method์˜ Regression Fitting์„ ํ•˜๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๋ผ Iterative Fitting์œผ๋กœ Fitting์„ ์ˆ˜ํ–‰ํ•œ๋‹ค๊ณ  ํ•œ๋‹ค.

์™œ ์ด๋ฆ„์ด Moving-Average ์ธ๊ฐ€?

โ€œMoving Averageโ€๋ผ๋Š” ์ด๋ฆ„์€ ํ˜ผ๋ž€์„ ์ค€๋‹ค. ์‹œ๊ณ„์—ด ๋ถ„์„ ๊ธฐ๋ฒ• ์ค‘์— โ€œMoving Averageโ€๋ผ๋Š” ์ด๋ฆ„์ด ๋ถ™์€ <Moving Average Smoothing> ๊ธฐ๋ฒ•์ด ์žˆ๊ณ , ์ด๊ฒŒ ๋” ์œ ๋ช…ํ•˜๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.๐Ÿ˜

Definition. Moving Average Smoothing

\[\text{MA}(t) = \frac{1}{m} \sum^k_{j = -k} = X(t + j)\]


๊ทธ๋Ÿฐ๋ฐ ์™œ ๊ตณ์ด, ํ—ท๊ฐˆ๋ฆฌ๊ฒŒ ์ด ๋…€์„๋„ โ€œMoving Averageโ€๋ผ๋Š” ์ด๋ฆ„์ด ๋ถ™์€ ๊ฑธ๊นŒ?๐Ÿค”

๋จผ์ € โ€œ์ด๋™โ€์€ ๋ชจํ˜•์˜ ํ‰๊ท  $\mu$๋ฅผ ์ค‘์‹ฌ์œผ๋กœ ๋ฐฑ์ƒ‰์žก์Œ๊ณผ์ •์„ ๋”ฐ๋ฅด๋Š”ย $\epsilon(t)$๋“ค๋กœ ์ธํ•ด ์‹œ๊ณ„์—ด์ด ์œ„์•„๋ž˜๋กœ ์ด๋™ํ•œ๋‹ค๋Š” ์˜๋ฏธ์ž…๋‹ˆ๋‹ค.

๊ทธ๋ฆฌ๊ณ  โ€œํ‰๊ท โ€์€ ์œ„์•„๋ž˜๋กœ ์›€์ง์ด๋Š” ์ •๋„๋ฅผ ๋ฐฑ์ƒ‰์žก์Œ๊ณผ์ • $\epsilon(t)$์˜ $t$์‹œ์ ์˜ ๊ฐ’๊ณผ ๊ณผ๊ฑฐ ์‹œ์ ์˜ ๊ฐ’๋“ค์˜ โ€œ๊ฐ€์ค‘ํ•ฉโ€ํ–ˆ๋‹ค๋Š” ์˜๋ฏธ๋กœ ์ดํ•ดํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

๊ฐ„ํ† ๋ผ๋‹˜์˜ ๋ธ”๋กœ๊ทธ์—์„œ ์„ค๋ช…์„ ๊ฐ€์ ธ์™”๋Š”๋ฐ, ๊ทธ๋Ÿด๋“ฏํ•˜๋‹ค!๐Ÿ˜€

AR vs. MA

  • You would choose an AR model if you believe that โ€œprevious observations have a direct effect on the time seriesโ€.
  • You would choose an MA model if you believe that โ€œthe weighted sum of lagged errors have a direct effect on the time seriesโ€.

์‚ฌ์‹ค Lagged Error๋ฅผ ์‚ฌ์šฉํ•ด Fitting์„ ํ•œ๋‹ค๋Š”๊ฒŒ ์ž˜ ์™€๋‹ฟ์ง€ ์•Š๋Š”๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ๊ทธ๊ฒƒ์ด ๋‹น์—ฐํ•œ ๊ฒƒ์ด ๋’ค์—์„œ ์‚ดํŽด๋ณผ ๊ฒƒ์ด์ง€๋งŒ, Lagged Error ํ•˜๋‚˜๋งŒ ๊ณ ๋ คํ•ด์„œ๋Š” ์‹œ๊ณ„์—ด ๋ฐ์ดํ„ฐ๋ฅผ ๋ชจ๋ธ๋งํ•˜๊ธฐ ์–ด๋ ต๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค!

๊ฒฐ๊ตญ์—” AR๊ณผ MA์„ ํ•จ๊ป˜ ์“ฐ๋Š” <ARMA ๋ชจ๋ธ>๊ณผ ๊ฐ™์ด MA ๋ชจ๋ธ์„ ๋‹ค๋ฅธ ๊ธฐ๋ฒ•๊ณผ ํ•จ๊ป˜ ์“ฐ๊ฒŒ ๋œ๋‹ค. ๊ทธ๋Ÿฌ๋‹ˆ ์ง€๊ธˆ์€ MA ๋ชจ๋ธ์˜ ์ฝ˜์…‰ํŠธ๋งŒ ํ™•์ธํ•˜๊ณ  ๋‹ค์Œ ๋ชจ๋ธ๋กœ ์–ผ๋ฅธ ๋„˜์–ด๊ฐ€์ž ๐Ÿ‘

MA models have stationairty

$-1 < \phi_1 < 1$ ์กฐ๊ฑด ์•„๋ž˜์—์„œ ์ •์ƒ์„ฑ์„ ๋งŒ์กฑํ•˜๋˜ $\text{AR}(p)$ ๋ชจ๋ธ๊ณผ ๋‹ค๋ฅด๊ฒŒ, $\text{MA}(q)$ ๋ชจ๋ธ์„ ํ•ญ์ƒ ์ •์ƒ์„ฑ์„ ๋งŒ์กฑํ•œ๋‹ค.

์ด๊ฒƒ์€ $\text{MA}(q)$๊ฐ€ ์ •์ƒ์„ฑ์„ ๋งŒ์กฑํ•˜๋Š” white noise $\epsilon(t)$์˜ ์œ ํ•œํ•œ ํ•ฉ์ด๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค ๐Ÿ˜€

Invertible

(Forecasting: Principles and Practices: ์ด๋™ํ‰๊ท ์˜ ๋‚ด์šฉ์œผ๋กœ ๋Œ€์ฒด. ์ดํ•˜ ์ƒ๋žต ๐Ÿ˜‰)

Reference