Email discussion lists for the UK Education and Research communities

## BUGS@JISCMAIL.AC.UK

#### View:

 Message: [ First | Previous | Next | Last ] By Topic: [ First | Previous | Next | Last ] By Author: [ First | Previous | Next | Last ] Font: Proportional Font

#### Options

Subject:

ARIMA GARCH

From:

Date:

Thu, 8 Apr 2010 16:28:46 +0100

Content-Type:

text/plain

Parts/Attachments:

 text/plain (83 lines)
 ```First of all, It is possible to estimate ARIMA-GARCH models in WinBugs, but, there are a few problems: 1. If a model has a lot of latent variables, WinBugs will be slow, sometimes It will even freeze. For example, to sample from ARIMA(1,1,1)-GARCH(1,1) model, you will need a really good computer. 2. The problem is in MA part of the model and the conditional variances. There are just to much latent/unobserved variables. For example WinBugs will sample really fast from the AR-ARCH model, but once you introduce latent variables It gets slow, especially if you have a lot of observations. The number of latent variables is determined by sample size. 3. One way to circumvent the problem is to: first separate ARIMA-GARCH model into two separate models, for example just ARIMA and just GARCH. Then estimate ARIMA model and recover the residuals. Use the estimated residuals as an input for GARCH model ad recover conditional variances. Rewrite the ARIMA model, so it will have time changing variance and use estimated conditional variances from the GARCH model in the new ARIMA model. Estimate the new residuals, past them to the GARCH model and estimate the new conditional variances... It suffices to do so around five times and the parameters will almost the same as if you would estimate ARIMA and GARCH models simultaneously. I won't say if this theoretically justified, since I don't know, but it works! 4. Alternatively, you could transform the model into the state space form. EXAMPLE ARMA-GARCH MODEL: model { for (t in 1:T) {y[t]~dnorm(mu[t],tau[t])                                     e[t]<-y[t]-mu[t]} #ARMA model                for (t in 2:T) {mu[t]<-cons+rho*y[t-1]+th*e[t-1]} #ARCH model                for (t in 2:T) {h[t]<-alpha[1]+alpha[2]*pow(e[t-1],2)+beta[1]*h[t-1]                                     tau[t]<-1/h[t]} #ARMA observations with latent data                                     mu[1]<-cons+th*e0+rho*y0 #GARCH observations with latent data                                     h[1]<-alpha[1]+alpha[2]*pow(e0,2)+beta[1]*h0                                     tau[1]<-1/h[1] #priors for latent data                                    e0~dt(0,0.01,10)                                    y0~dt(0,0.01,10)                                    h0~dnorm(1,0.1) I(0,10) #priors on ARMA coefficients                                   cons~dnorm(0,0.001)                                   rho~dnorm(0,0.001) I(-1,1)                                   th~dnorm(0,0.001) I(-1,1)                           ## alternative priors                                   # cons~dunif(10,10)                                   # rho~dunif(-1,1)                                   # th~dunif(-1,1) #priors for GARCH model                                   alpha[1]~dnorm( 0.396,0.001) I(0,)                                   alpha[2]~dnorm(0.440,0.001) I(0,1)                                   beta[1]~dnorm(0.370,0.001) I(0,1)                           ##some alternative priors                                   # alpha[1]~ dunif(0,10)                                   # alpha[2]~ dunif(0,1)                                   # beta[1]~dunif(0,1)                                   } Extensions to TARCH, PARCH, ABARCH,... models are straightforward. The models is based on the works of dr. Peter Congdon (he wrote quite a few books on Bayesian analysis using WinBugs), dr. Jakub Bijak and some of my changes. If you have any suggestions, corrections, or would like to share your method, please contact me! Kind regards, Vasja Sivec        ------------------------------------------------------------------- This list is for discussion of modelling issues and the BUGS software. For help with crashes and error messages, first mail [log in to unmask] To mail the BUGS list, mail to [log in to unmask] Before mailing, please check the archive at www.jiscmail.ac.uk/lists/bugs.html Please do not mail attachments to the list. To leave the BUGS list, send LEAVE BUGS to [log in to unmask] If this fails, mail [log in to unmask], NOT the whole list ```