Page 1 of 1

Time Varying AR Model

Posted: Mon Jul 26, 2010 4:11 am
by orbit777
Hi Guys,

Im very inexperienced with EViews and was wondering if you could help me with the following problem.

Im conducting a study of time varying autocorrleation in stock markets using 50 years of data from the S&P500.

I took the log first difference of the data, specified the following equation: y c y(-1) and used this to estimate the first order correlation of monthly returns using a rolling regression model.

I would now like to create a time varying AR model using a state space model to show how the AR coefficients vary through time, however I am unsure as how to go about this.

Any help would be greatly appreciated.

Thank you in advance.

Re: Time Varying AR Model

Posted: Mon Jul 26, 2010 4:52 am
by trubador
You need to work with State Space object (Object\New Object\SSpace) and write a syntax like the following:

Code: Select all

@signal y = c(1) + ar1*y(-1) + [var=exp(c(2))]
@state ar1 = ar1(-1) + [var=exp(c(3))]


Do not forget to adjust the Sample (start from the second observation) in the Estimation window. Please refer to help files for more details...

Re: Time Varying AR Model

Posted: Mon Jul 26, 2010 7:34 am
by orbit777
Thanks for your help. Being playing around with the syntax and definately made some progress, however I'm still to achieve the desired outcome. To be more specific I'm trying to use the same methodology adopted by Ito and Sugiyama ("Measuring the degree of time varying market inefficiency", 2009) who specify the following equation for their state space model:

Image

Thanks again.

Re: Time Varying AR Model

Posted: Tue Jul 27, 2010 7:24 am
by orbit777
Hey guys,

Sorry to bump this, but does anyone have any recommendations? I would be eternally greatful. Really struggling to come up with the correct syntax by myself.
Thx

Re: Time Varying AR Model

Posted: Tue Jul 27, 2010 7:59 am
by trubador
You can extend the model as you want. As an example for three lags:

Code: Select all

@signal y = c(1) + ar1*y(-1) + ar2*y(-2) + ar3*y(-3) + [var=exp(c(2))]
@state ar1 = ar1(-1) + [var=exp(c(3))]
@state ar2 = ar2(-1) + [var=exp(c(4))]
@state ar3 = ar3(-1) + [var=exp(c(5))]


btw. you can drop the constant term in the signal equation if you like...

Re: Time Varying AR Model

Posted: Tue Jul 27, 2010 8:33 am
by orbit777
Thanks for your prompt reply trubador, i really appreciate your input. I'm now just trying to replicate the results obtained by Ito and Sugiyama (2009) just to make sure the procedure is correct when I apply it to my own sample. I've obtained the same graphical representation as in figure 1 of their study. However, after specifying the state space model which steps should I then take to obtain a kalman smoothed graph like the one in figure 2?

Re: Time Varying AR Model

Posted: Wed Jul 28, 2010 4:11 am
by trubador
Just click on View/State Views/Graph State Series... and select Smoothed State Estimates . In order to save these smoothed series, you have to select Proc in the sspace toolbar and then click on Make State Series... Please refer to users guide for more details.

Re: Time Varying AR Model

Posted: Sun Jul 23, 2017 3:09 am
by touhid247
Good afternoon to all.
I am doing a research on Time Varying Autoregressive Model (TVAR) in consistent with Adaptive Market Hypothesis (AMH) by Andrew Lo (2004).
To analyze AMH, TVAR model is useful. But I am new to Eviews and therefore I am unable to run the TVAR model in the Eviews.
Please help me out to analyze the AMH by TVAR model given by Noda (2016).