[web:reg] ARMA Ecel Add-In [web:reg] Kur Annen www.web-reg.de annen@web-reg.de Körner Sr. 30 41464 Neuss - Germany -
[web:reg] arma Ecel Add-In [web:reg] ARMA Ecel Add-In is a XLL for esimaing and forecas AR(I)MA models wih Ecel. You do no have o know anyhing abou numerical mehods o use [web:reg] ARMA Ecel Add-In us insall i and use i wih Ecel. Reuiremens Oeraing Sysem: Windows 95, 98, ME, 2000, XP Microsof Ecel 97, 2000 or XP Seu and Insallaion To insall he [web:reg] ARMA Add-In you mus download and eecue he seu rogram from my web age and follow han he insallaion insrucions. Funcions [web:reg] ime series funcions The following ime series funcions are available. The ouu will be a range of he series size. Noe ha #N/A will be reurned for observaions for which lagged values are no available. diff(ime series as range, d as ineger) difflog(ime series, d as ineger) diffs(ime series as range, d as ineger, s as ineger) diffslog(ime series as range, d as ineger, s as ineger) d'h order difference d'h order difference of he logarihm d'h order difference wih a seasonal difference s d'h order difference wih a seasonal difference s of he logarihm If he values are no numbers or he values are no osiive using difflog or diffslog #N/A will be reurned. All ime series funcions are array-funcion. Firs selec an emy range which is of he same dimension as he ime series ha should be differenced. Then wrie he funcion you wan o use. A his oin, do no ress Ener. Raher, hold down he Shif and he Crl Keys and hen ress Ener. Eamle diff(a2:a102,1) will ouu he difference of he ime series Range A2:A102. 2
[web:reg] arma funcion This funcion esimaes he arameers of an ARMA(,) model. arma needs as arameers a ime series as a range, he order of auoregressive erms as ineger, he order of moving average erms as ineger, and if you wan an consan erm ino he model an boolean as rue. arma(ime series as range, as Ineger, as Ineger, c as bool) Afer esimaing his funcions reurns he residual, he arameers, useful saisics, imulse resonse funcion and forecas evoluion in a range of he size ( T ) ma( + + c,3). The firs arameer will be ouued in column 2 and row 1. The order of arameer are consan, auoregressive arameers and moving average arameers. Ouu consan -> AR-coeffiens -> MA- coeffiens Residual coefficien 1 coefficien (++c) Residual +1 sd. error 1 sd. error (++c) -sa. 1 -sa (++c) P-Value 1 P-Value (++c) invered roos (if c = invered roos 1 invered invered roos false. else #N/A) roos R-suared Mean deenden var #N/A #N/A Adused R-suared S.D. deenden var #N/A #N/A S.E. of regression Akaike info crierion #N/A #N/A Sum suared resid Schwarz crierion #N/A #N/A Log likelihood Durbin-Wason sa #N/A #N/A Imulse Resonse Forecas (T=1) #N/A #N/A (T=1) #N/A #N/A Residual T Imulse Resonse (T=observaions-10- ) Forecas (T=observaions-10- ) #N/A #N/A The esimaion emloys an efficien non linear echniue (Levenber Maruard algorihm). The derivaes will be comued by finie differencing mehods. The maimum of ieraions is 500 and he convergence is 0.0001. Moving average erms will be backcased Eamle arma(a2:a102,2,0,false) will esimaes an AR(2) model wihou consan. 1 Ecel does no know comle numbers. On his accoun he invered AR/MA roos are Srings. 3
[web:reg] ARMA form The ouu of he funcion is difficul for many ersons o recognize. For his reason I inegraed a VBA form. The inu is simlified and he ouus is formaed and diagrams will be creaed. When insalled, [web:reg] ARMA Ecel Add-In adds a new menu iem o Ecel's main menu. Sar he Add in by clicking on [web:reg] -> univariae ime series -> ARMA- Esimaion in Ecel. The following dialog aears: In here, you ell he rogram abou he daa ha we would like o esimae. If here is he name of he ime series in he firs row, you are going o ell his, by clicking on he "Label" checkbo. Eiher you could secify he model manual or he Add-In fis he bes model by using informaion crieria. You could also secify he ime horizon of he imulse resonse funcion and forecas. The esimaion resul will be dislayed in a new workshee. 4
Furher noes [web:reg] ARMA Ecel Add-In was wrien by Kur Annen. This rogram is freeware. Bu I would highly areciae if you could give me credi for my work by roviding me wih informaion abou ossible oen osiions as an economis. My focus as an economis is on economerics and dynamic macroeconomics. If you like he rogram, lease send me an email. This Add-In was wrien in C/C++/Assembler and comiled wih MinGW 2. The Levenberg-Maruard algorihm was aken from he MINPACK 3 ackage ranslaed by f2c. Each 30 esimaion aears my visied card. Do no ask lease wheher I can remove his. I would like hank Roland Grube 4 for designing he new [web:reg] logo. 2 Before you ask, why he XLL-file is so large. From MinGW - Freuenly Asked Quesions C++ rograms using he Sandard Temlae Library (ie/ #include <iosream>) cause a large ar of he library o be saically linked ino he binary. The need o saically link he sdc++ ino he binary is wo fold. Firs MSVCRT.dll does no conain C++ sdlib consrucs. Second he legal imlicaions of generaing a libsdc++.dll are resriced by he licensing associaed wih he library. 3 MINPACK is a numerical library wrien in Forran 4 Roland is one of my bes friends - www.rgec.com 5
Brief inroducion in AR(I)MA models Time series arise in many fields, including economics and finance. A ime series is defined as a vecor of observaions made a regulary ime oins = 1,2, K, T. Ideally, one would like o describe hese ime series wih mahemaically models o do, e.g. redicions for fuure. A widely oular class of generaing rocess, or models, are he AR(I)MA models. The acronym AR(I)MA sands for Auo- Regressive Inegraed Moving Average. Lags of he differenced ime series aearing in he model are called auoregressive erms, lags of he errors are called moving average, and a ime series which needs o be differenced o made be saionary is said o be an inegraed ime series. Is he ime series saionary i is ossible o reresen i by an ARMA model. Noe lease ha he heory of AR(I)MA model is based on saionary. Using he backshif oeraor L ( ) d = 1 L d secifies he d-h order of difference of he ime series X. An ARMA(,) model can be eressed as: φ 1 1 K φ = ε + θ1ε 1 + K+ θ ε 5 or eressed by he backshif oeraor Φ ( L) = Θ( L) ε where Φ ( L) = and 1 φ = 1 L Θ ( L) = = 0 θ L b0 = 1 = one has an auoregressive, AR ( ), model if = 0 MA If 0 average, denoed ( ) he model is a moving. The error erms are, of course no direcly observable, bu a model is said o be inverible if he original errors an be re-consruced from he observed. Mahemaically a ARMA model is be inverible if he roos of he euaion 6 ( ) = 0 is greaer han one. Θ z all lie ouside he uni circle or he absolue value of each roo If he roos of he euaion ( ) = 0 Φ z all lie ouside he uni circle he model is saionary. If only one of he roos is in absolue value greaer one he difference sysem is elosive. 5 ofen a consan µ will be included φ 1 1 K φ = µ + ε + θ1ε 1 + K+ 6 z migh be a comle number θ ε 6
A saionary ARMA (, ) rocess has an ( ) of he ( ) MA reresenaion. The coefficiens MA reresenaion could be calculaed recursively and are called imulse resonse funcion. The imulse resonse funcion gives he answer of he uesion: wha is he effec on given a uni shock a ime s. Noe lease if here is only a ure MA ( ) rocess he effec holds only unil s +. The effec of ARMA, rocess converges o zero if he ime series is an AR ( ) or an ( ) saionary. Forecas Normally ARMA models are used o forecas a ime series. A very simle mehod for forecasing ARMA models is: T + h φ1 T + h 1 + K+ φ + h + ε T θ1ε T + h 1 K = θ ε T + h As you can see course, zero for Esimaing T + h can easily be udaed. The oimal forecas for T h h >. Esimaing an ( ) is alicable. Unforunaely, an MA ( ) or an (, ) ( > 0) ε is, of AR model is really simle, because he model is linear and OLS ARMA is non linear in naure, and reuires an ieraive rocedure o resolve he arameers. A very good algorihm in esimaing non-linear model is he Levenberg-Maruard algorihm. Idenifying he order of and The Bo Jenkins rocedure for idenifying he orders of and is very difficul and will no be described. A simle and oular rocedure is o minimize Akaike or Schwarz Informaion crieria. These crierions forms a rade-off beween he fi of he model (which lowers he sum of suared residuals) and he model's comleiy, which is measured by he numbers of arameers. 7