rolling windows covariance matrix

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator

fiyalee
Posts: 3
Joined: Tue Mar 31, 2015 10:06 pm

rolling windows covariance matrix

Postby fiyalee » Tue Mar 31, 2015 10:14 pm

hi, i am trying to do rolling windows of covariance matrix
however, there seems to be only covariance matrix work....
and i have no idea about how to program rolling windows of covariance in the eviews..
does this work in the eviews?

thanks a lot :)

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 10926
Joined: Tue Sep 16, 2008 5:38 pm

Re: rolling windows covariance matrix

Postby EViews Gareth » Tue Mar 31, 2015 10:28 pm

How many series do you wish to find the covariance of?
Follow us on Twitter @IHSEViews

fiyalee
Posts: 3
Joined: Tue Mar 31, 2015 10:06 pm

Re: rolling windows covariance matrix

Postby fiyalee » Wed Apr 01, 2015 2:25 am

hi ~
i have 50 stocks from 2003 to 2014 monthly data, totally 138 months
And i wish to have 60-month rolling windows size

thank you so much !!!

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 10926
Joined: Tue Sep 16, 2008 5:38 pm

Re: rolling windows covariance matrix

Postby EViews Gareth » Wed Apr 01, 2015 8:16 am

You'll have to program it with a for loop. There are plenty of examples of performing rolling regression on the forum, such as this one:
viewtopic.php?f=15&t=878
Just change the code so that rather than estimating a regression and storing the coefficients, you calculate the covariance matrix and store that instead.

You'll want to put your series in a group, then do group.cov(out=myname)
Follow us on Twitter @IHSEViews

fiyalee
Posts: 3
Joined: Tue Mar 31, 2015 10:06 pm

Re: rolling windows covariance matrix

Postby fiyalee » Sun Apr 05, 2015 7:55 am

hi,
it does help a lot!!!
thank you so much :D

grahan
Posts: 1
Joined: Wed Nov 02, 2016 3:44 pm

Re: rolling windows covariance matrix

Postby grahan » Wed Nov 02, 2016 4:06 pm

Hi, I have five series that I want to roll and save the covariance matrix in each period. Can you please help to perform it? The initial estimates of the covariance matrix is generated from DCC and ADCC, and not sure if rolling under DCC and ADCC framework is possible.
Also how to take sample variance-covariance of the residuals of the most recent rolling? Thank you very much.

Charles_gre
Posts: 5
Joined: Sat Jan 21, 2017 3:30 am

Re: rolling windows covariance matrix

Postby Charles_gre » Sun Jan 22, 2017 2:51 am

Hi All,

I have to do a lot of rolling regressions with Eviews 9. Thus I made a program which makes lots of rolling regressions all at once. As you know when one performs a rolling regression with the add-in.The estimation command is similar to the line shown hereunder:

ROLL(F,WINDOW=756,STEP=21)LU0568578776varitwo @ defaultLU0568578776.

This is a rolling regresion which has a fixed window, window size of 756 and a step size of 21. The estimtion command then continues with the name of the roll regression output which is "LU0568578776varitwo". This is followed by the name of equation which the rolling regression is to take as an specification which is an equation named " defaultLU0568578776".

I have created a program made up of about 200 command lines similar to the one indicated above.

THE PROBLEM IS THAT ALL THE ROLLING REGRESSION OUTPUT ARE ALL BEING SPECIFIED ON THE FIRST EQUATION THAT EVEIWS HAS IN ALPHABTHICAL ORDER. I have to make about 200 rolling regressions all based on different specification equations and not on the same one.

How come I write these commands:

ROLL(F,WINDOW=756,STEP=21)LU0568578776sp5variablesix @ sp5dLU0568578776
ROLL(F,WINDOW=756,STEP=21)IE00B01VC057sp5variablesix @ sp5dIE00B01VC057
ROLL(F,WINDOW=756,STEP=21)IE00B01VC164sp5variablesix @ sp5dIE00B01VC164
ROLL(F,WINDOW=756,STEP=21)LU0012202338sp5variablesix @ sp5dLU0012202338
ROLL(F,WINDOW=756,STEP=21)LU0085493038sp5variablesix @ sp5dLU0085493038
ROLL(F,WINDOW=756,STEP=21)LU0094547725sp5variablesix @ sp5dLU0094547725
ROLL(F,WINDOW=756,STEP=21)LU0119136876sp5variablesix @ sp5dLU0119136876
ROLL(F,WINDOW=756,STEP=21)LU0119137254sp5variablesix @ sp5dLU0119137254
ROLL(F,WINDOW=756,STEP=21)LU0119137338sp5variablesix @ sp5dLU0119137338
ROLL(F,WINDOW=756,STEP=21)LU0119137502sp5variablesix @ sp5dLU0119137502

and the rolling regression outputs have the same equation specification which is not the one specified in my commands?

They are all specied on Specification: DEFAULTFR0000018277 which is another equation.

How can I tell Eviews to please use the specification equation mentioned after the @ symbol?

I would apprecaite your help.

Thank you for reading.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 10926
Joined: Tue Sep 16, 2008 5:38 pm

Re: rolling windows covariance matrix

Postby EViews Gareth » Sun Jan 22, 2017 4:55 pm

EViews doesn't have rolling regression built in.
Follow us on Twitter @IHSEViews

Charles_gre
Posts: 5
Joined: Sat Jan 21, 2017 3:30 am

Re: rolling windows covariance matrix

Postby Charles_gre » Mon Jan 23, 2017 2:01 am

EViews Gareth wrote:EViews doesn't have rolling regression built in.


How can I perform lots of rolling regressions at one time?
With the add- in one can only perform one rolling regression at one time.

I have a lot of regressions which I need to roll over a fixed window size of 756 and a step size of 21.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 10926
Joined: Tue Sep 16, 2008 5:38 pm

Re: rolling windows covariance matrix

Postby EViews Gareth » Mon Jan 23, 2017 9:18 am

You'll need to write a program to do it. You can look as the source code of the add-in, or use any of the many examples on the forum.
Follow us on Twitter @IHSEViews


Return to “Programming”

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests