2015年11月5日 星期四

Time Series Analysis - 時間序列模型基本概念:AR, MA, ARMA, ARIMA 模型

2 Comments
 

時間序列模型,AR、MA、ARMA、ARIMA模型等基礎知識,在訊號、金融時序分析通用,頗有萬物歸一之感^^




一、自迴歸模型 (AR, Autoregressive Models)


自身迴歸用同一變數例如x的之前各期,亦即 x1xt1 來預測本期 xt 的表現,並假設它們為一線性關係。


1. 自迴歸模型定義


The notation AR(p) indicates an autoregressive model of order p. The AR(p) model is defined as

Xt=c+pi=1φiXti+εt

where φ1,,φp are the parameters of the model, c is a constant, and εt is white noise.

[用心去感覺] X的當期值等於一個或數個落後期的線性組合,加常數項,加隨機誤差。


2. AR(p)探討


AR(0) : the simplest one, which has no dependence between the terms. Only the noise term contributes to the output of the process, so AR(0) corresponds to white noise.

AR(1) : AR(1) process with a positive φ, only the previous term in the process and the noise term contribute to the output.

  • If φ is close to 0, then the process still looks like white noise
  • but as φ approaches 1, the output gets a larger contribution from the previous term relative to the noise. This results in a "smoothing" or integration of the output, similar to a low pass filter.

AR(2) : the previous two terms and the noise term contribute to the output.

  •    If both φ1 and φ2 are positive, the output will resemble a low pass filter, with the high frequency part of the noise decreased. 
  •    If φ1 is positive while φ2 is negative, then the process favors changes in sign between terms of the process. The output oscillates. This can be likened to edge detection or detection of change in direction.


3. Example: An AR(1) process


An AR(1) process is given by : Xt=c+φXt1+εt

The process is wide-sense stationary if φ less than  1 since it is obtained as the output of a stable filter whose input is white noise.

If the mean is denoted by μ, it follows from : 

E(Xt)=E(c)+φE(Xt1)+E(εt),
μ=c+φμ+0,
μ=c1φ

The variance is : 

var(Xt)=E(X2t)μ2=σ2ε1φ2,
var(Xt)=φ2var(Xt1)+σ2ε,


The autocovariance is given by : 

Bn=E(Xt+nXt)μ2=σ2ε1φ2φ|n|.






二、移動平均模型 (MA, Moving Average Models)


序列可以由同期與過去的隨機項給予不同的權重來解釋,這稱為移動平均模型。移動平均模型在任何條件下都平穩。


1. 移動平均模型定義


The notation MA(q) refers to the moving average model of order q:

Xt=μ+εt+θ1εt1++θqεtq

where μ is the mean of the series, the θ1, ..., θq are the parameters of the model and the εt, εt−1,..., εt−q are white noise error terms. 





三、ARMA模型 (AR, MA 兩者的混合)


ARMA模型由自迴歸模型(簡稱AR模型)與滑動平均模型(簡稱MA模型)為基礎「混合」構成。


1. ARMA模型定義


ARMA(p,q)模型中包含了p個自回歸項和q個移動平均項,ARMA(p,q)模型可以表示為:

Xt=c+εt+pi=1φiXti+qj=0θjεtj 


[用心去感覺] 金融領域的AR與MA


以金融領域來說,AR是過去的報酬,MA是過去的預測誤差;在效率市場下,我們預期 AR 或 MA 的參數是0。

統計上常用下面兩種方式做檢定:

  • Ljung-Box Q 統計量:運用自我相關係數來檢定是否具有落後 p 期內的自我相關
  • Breush-Godfrey LM 檢定(Serial Correlation LM Test;序列相關 LM 檢定):運用殘差來檢定是否具有落後 p 期內的自我相關




四、ARIMA 模型 (Autoregressive Integrated Moving Average model)


非恆定的序列可以先經過差分的處理方式將其轉變為恆定序列,再透過ARMA的模型來預測。例如隨機漫步過程並沒有固定的平均水準,經過一階差分(first difference)後成為隨機震動所組成的數列,即變成平穩。ARIMA模型處理序列的一階動差,GARCH模型則處理二階動差。

ARIMA (p,d,q) 中,
  • AR是"自回歸",p為自回歸項數
  • MA為"滑動平均",q為滑動平均項數
  • d為使之成為平穩序列所做的差分次數 (階數),「差分」一詞雖未出現在ARIMA的英文名稱中,卻是關鍵步驟。


1. ARIMA模型定義


ARIMA (p,d,q) 模型是ARMA(p,q) 模型的擴展。ARIMA(p,d,q)模型可以表示為:

(1pi=1ϕiLi)(1L)dXt=(1+qi=1θiLi)εt

其中L 是滯後算子(Lag operator),dZ,d>0





References


wiki : MA models

ARIMA模型

財務筆記: 常用的Econometrics II (part 39)





技術提供:Blogger.