Anda di halaman 1dari 22

http://staffweb.hkbu.edu.hk/billhung/econ3600/application/app05/app05.

html

Building ARIMA Models


In an ARIMA model we do not ha!e a p"io"i fo" fo"ecasting model befo"e model identification takes place. ARIMA helps us to choose a #"ight model$ to best fit the time se"ies. %ut it in a flow cha"t:

Demonstration to find "right ARIMA model (p, d, q)" to fit the time series through trial and error: &i"stl' download the e(cel file called ) exchange rate) f"om the )*ample +ata) of ,con3600 homepage. *econd open !"I!#$ p"og"am in this wa': click )%ile) )&e') )#or(file) commands then in the )#or(file Range) choose )Monthl)) and t'pe )*++,-,*" fo" the )$tart o.ser/ation) and )0,,,-,1"fo" )!nd o.ser/ation) in the dialogue bo(. -hen we will get a wo"kfile- .e(t impo"t the data f"om the e(cel file to gene"ate the following "esult: /Remembe" to change )01) fo" uppe" left data cell.2

+ouble click the !a"iable ))en) to check its data whethe" it is consistent with the ,(cel file and choose )"ie') )2ine) to get a gene"al idea about the time se"ies is stationa"' o" no. Also choose )"ie') )3orrelogram) to get the tentati!el' identif'

patte"ns and model components /i.e. the deg"ee of p d 3 of ARIMA2 -he "esulting g"aphs a"e:

&"om the abo!e g"aphs 'ou can see that the time se"ies is likel' to ha!e "andom walk patte"n which "andom walk up and down in the line g"aph. Also in co""elog"am the A4&s a"e suffe"ed f"om linea" decline and the"e is onl' one significant spike fo" %A4&s. -he g"aph of co""elog"am suggests that ARIMA(*, ,, ,) ma' be an app"op"iate model. -hen we take the fi"st5diffe"ence of )6en) to see whethe" the time

se"ies becomes stationa"' befo"e fu"the" finding AR/p2 and MA/32. /Remembe" that I/d2 is used to get stationa"' se"ies if necessa"'.2 -o see whethe" fi"st diffe"ence can get le!el5stationa"' time se"ies o" not 'ou need to gene"ate it b' choosing )4!&R) t'pe )d)en5d()en)). -hen 'ou will get )d)en) item in the )#or(file) and use it to d"aw a line g"aph and also get a co""elog"am g"aph. the "esults a"e:

.ow the fi"st5diffe"ence se"ies )+6,.) becomes stationa"' as showing in line g"aph and is white noise as shown no significant patte"ns in the g"aph of co""elg"am. And the unit "oot test also confi"ms the fi"st5diffe"ence becomes stationa"'. -he st"ong e!idents suppo"t that the ARIMA(,,*,,) is suitable fo" the time se"ies. -hen we can const"uct the ARIMA model as following steps: *tep 7. 4hoosing )6uic() )!stimate !quation) then specif' the mode and t'pe ) )en c ar(*))

click )78) the "esult is:

*tep 8. choosing ) "ie') )Residual tests) )3orrelogram969 $tatistic) the "esult is:

/*ince the"e is no significant spikes of A4&s and %A4&s it means that the "esiduals of this selected ARIMA model a"e white noise so that the"e is no othe" significant patte"ns left in the time se"ies then we can stop at he"e and don9t need to fu"the" conside" anothe" AR/p2 and MA/322 -he c"ite"ions to :udge fo" the best model a"e as follows:

Relati!el' small of 0I4 /*chwa"; c"ite"ion which is measu"ed b' n<og/*,,2 =k<og/n22 Relati!el' small of *,, Relati!el' high ad:ust R8 >5 statistics and co""elog"am show that the"e is no significant patte"n left in the A4&s and %A4&s of the "esiduals it means the "esiduals of the selected model a"e white noise.

6ou ma' t"' anothe" ARIMAs and compa"e the statistical "esults as in the following table:
ARIMA model /7 0 02 /7 0 72 BI3 5.?01 5.?3A Ad:usted R0 0.@3A?6 0.@3503 $!! A.0?5 A.06?

/8 0 02 /0 0 72 /0 0 82 /7 7 02 /0 7 02

5.?85 ?.31A 6.111 5.?8A 5.?01

0.@3A85 0.655@1 0.?@?5A 0.007@ 0.@3A?

A.0A? @.A88 ?.880 A.701 A.0?5

As 'ou can see that ARIMA(*,,,,) is a "elati!el' best model Rema"k: -he ARIMA (*, ,, ,) is same as ARIMA (,, *, ,). -he "esult of ARIMA/0 7 02 is:

In ou" se!e"al t"ial and e""o" p"ocedu"es the ARIMA/7 0 02 o" ARIMA/0 7 02 is selected as the best model. .ow we can e(p"ess this selected best model as

*tudents a"e encou"aged to t"' to find the best ARIMA model fo" the se"ies of )pound).

&on9stationar) /ariance time series &i"stl' download the e(cel file called ) h( gdp- xls ) f"om the )*ample +ata) of ,con3600 homepage. -hen following the p"e!ious p"ocedu"es to plot the line g"aph and co""elog"am g"aph as the following outputs so as to get gene"al idea of the time se"ies:

&"om the time plot g"aph the le!el of BCD+% is clea"l' a non5stationa"' se"ies because it has an dete"ministic upwa"d t"end and seasonal c'cle. Also the A4&s a"e suffe"ed f"om linea" decline and the"e a"e two significant spikes of %A4&s in pe"iod 7 and pe"iod 5. It is ha"d to guess an app"op"iate ARIMA model fo" this time se"ies now. &i"stl' what we need to do is to identif' the integ"ation o"de" of the non5 stationa"' time se"ies. Ee take the fi"st5diffe"ence of the se"ies and want to see whethe" the fi"st5diffe"ence se"ies becomes stationa"' befo"e we go fo" fu"the" sea"ching fo" the AR/p2 and MA/32. Afte" taking the fi"st5diffe"ence and plotting the line g"aph as follow:

A* we can see in the time plot g"aph the fi"st5diffe"ence se"ies pe"fo"ms with a non5 constant /inc"easing2 !a"iance and it indicates non5stationa"it' of this fi"st5diffe"ence. -he"efo"e we ma' need to t"ansfo"m the data into the loga"ithm !alues. *impl' click )4ene) and t'pe "lnh(gdp 5 2og(h(gdp)". And then fu"the" to gene"ate a log fo"m of fi"st5diffe"ence to "emo!e the non5constant !a"iance and non5 stationa"' p"oblem. -he time plot g"aphs of the loga"ithm of the le!el se"ies )lnhkgdp) and the fi"st5diffe"ence se"ies )dlnhkgdp) a"e as follows:

-he fi"st5diffe"ence of log fi"st5diffe"ence se"ies is now f"ee f"om non5stationa"' p"oblems. -he"efo"e we can go back to the p"e!ious steps to const"uct the ARIMA model .

As shown abo!e taking the loga"ithmic t"ansfo"mation can sol!e the p"oblem of !a"iance non5stationa"' but no fo" the p"oblem of le!el non5stationa"'. Afte" taking fi"st5diffe"ence of lnh(gdp the se"ies achie!es stationa"'. Bowe!e" the "esulting "esiduals a"e not white noise as showing in following g"aph of co""elog"am:

*ince the"e a"e seasonal c'cles e(isting in the co""elog"am we can fu"the" t"' the fou"5pe"iod diffe"ence. 4lick )4!&R) and t'pe )d;lnh(gdp 5 lnh(gdp 9 lnh(gdp(9 ;)). -o confi"m whethe" fou"5o"de" diffe"ences a"e necessa"' let us estimate a seasonal auto"eg"essi!e model to the data. -his model is ARIMA/7 0 02 A and the
estimated "esult is as follow

-he estimated coefficient confi"ms that the le!el of 2&<84D= is seasonall' non5 statistiona"'. .ow the time plot g"aph and co""elog"am of the fou"5o"de" diffe"ence se"ies a"e shown as follows:

As 'ou can see f"om the abo!e g"aph the"e a"e two significant spikes of %A4&s and th"ee significant spikes of A4&s thus we can ha!e a 3uick idea to e(amine whethe" the"e is a AR/82 and MA/32 of the fou"5pe"iod diffe"ence of 2&<84D= i.e. whethe" )ARIMA(0, *, >);, *,*) is the best modelF -o :udge which is a best fit ARIMA model f"om diffe"ent t"ials and e""o"s we ha!e to base on some c"ite"ia such as the smallest *chwa"; c"ite"ion /0I42 *tanda"d ,"""o of Reg"ession /*,,2 the highest ad:usted R8 and the in!e"tiabilit' condition and significant of AR and MA "oot to dete"mine the best fitted model. Also the "esiduals of the selected best model must be white noise. !xample *- ARIMA (0, *, >);, *, *

!xample 0- ARIMA(>, *, >);, *,*:

Afte" t"'ing se!e"al ARIMA models compa"e thei" statistical info"mation as in the following table:
ARIMA Model /8 7 32 7 7 /8 7 32A 0 7 /3 7 32 7 7 /3 7 32 0 7 /8 7 82A 7 7 /8 7 82 7 7 /7 7 82A 7 7 /3 7 32 7 7 /8 7 32 7 7 /8 7 82 7 7
A A A A

BI3 53.708 53.07@ 53.0@7 58.@15 53.010 58.@53 53.07A 58.535 58.880 58.5@8

ad:usted R0 0.150 0.138 0.155 0.13A 0.1A8 0.17A 0.138 0.5A? 0.357 0.53?

$!! 0.0A67 0.0A1@ 0.0A55 0.0A11 0.0A?A 0.057A 0.0A@7 0.0603 0.0?71 0.060?

Ehich model is best fitted ARIMA modelF In ou" se!e"al t"ial and e""o" p"ocedu"es the ARIMA/8 7 32 A 7 7 is selected as the best one. Ee can e(p"ess this model as

?<! !&D

Anda mungkin juga menyukai