rolling correlation

For econometric discussions not necessarily related to EViews.

Moderators: EViews Gareth, EViews Moderator

jacintha
Posts: 2
Joined: Sun May 30, 2010 2:16 pm

rolling correlation

Postby jacintha » Sun May 30, 2010 2:25 pm

Hi there,

I am currently struggling with calculating a rolling (monthly) correlation coefficient, for a period of 17 years (between VIX and S&P500) Does anyone have a clue how to do this in Eviews? I have very little experience with this program..
Many thanks in advance!

regards,

Jacintha

terrya
Posts: 107
Joined: Wed Aug 26, 2009 2:37 pm

Re: rolling correlation

Postby terrya » Sun May 30, 2010 2:41 pm

jacintha wrote:Hi there,

I am currently struggling with calculating a rolling (monthly) correlation coefficient, for a period of 17 years (between VIX and S&P500) Does anyone have a clue how to do this in Eviews? I have very little experience with this program..
Many thanks in advance!

regards,

Jacintha


Try @movvar(x,n)

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

Re: rolling correlation

Postby EViews Gareth » Tue Jun 01, 2010 10:39 am

Actually, try @movcor(vix,sp500,10)

where 10 is the size of the window you want to roll.
Follow us on Twitter @IHSEViews

skgoh
Posts: 11
Joined: Thu Jul 07, 2011 9:42 pm

Re: rolling correlation

Postby skgoh » Fri Nov 16, 2012 9:41 pm

Dear Gareth


I have the same problem with Jachinta, i.e. I will like to calculate a rolling (daily) correlation coefficient between two interest rate series for a period of 20 years.

I read your suggestion that is to try the command, @movcor(x,y,10) where you mention 10 is the window size.

May I know is this command only work in a program i.e. I have to write a complete program on rolling correlation ? or is this command can work by itself?

I tried to type this command in a workfile. but Eviews will prompt a message @movecorr is illegal or reserve name..

thank you in advance

regards

Soo

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

Re: rolling correlation

Postby EViews Gareth » Sat Nov 17, 2012 5:04 pm

It does not require a program. Do you have EViews 7?
Follow us on Twitter @IHSEViews

skgoh
Posts: 11
Joined: Thu Jul 07, 2011 9:42 pm

Re: rolling correlation

Postby skgoh » Sun Nov 18, 2012 1:32 am

thanks for your prompt reply.


Yes. I have Eviews 7.

is it right, if I type genr corr1= @movcor(x,y,10) ??

Sooo

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

Re: rolling correlation

Postby EViews Gareth » Sun Nov 18, 2012 1:31 pm

Yep.
Follow us on Twitter @IHSEViews

skgoh
Posts: 11
Joined: Thu Jul 07, 2011 9:42 pm

Re: rolling correlation

Postby skgoh » Mon Nov 19, 2012 7:11 pm

Dear Gareth

Allow me to ask further question for clarity.. :

I have two series, mi and usi for a sample of 4795.

My understanding of rolling correlation is a overlapping window, meaning that if I set a window of 100, that means I will have first correlation from 1-100, 2-101, 3-102... so on and so forth.. Am I right??

When I run the command (genr corr1=@movcor (mi, usi,100)). I get a series of data for corr1 (attached herewith the workfile). Noted that the first 99 observation in corr1 is missing value. Why??? and at the 100 point, the value of corr1 is -0.231 and follow by some numbers at point 101, 102 and etc.

How does Eviews get -0.231. Is this a correlation from 1-100??

sorry for the lengty question. I try to understand what is @movcov??

I thank you in advance

Soo

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

Re: rolling correlation

Postby EViews Gareth » Tue Nov 20, 2012 8:42 am

No workfile attached, but your understanding is correct. The value for the 101th observation will be the correlation for 1-100. The value at 102 will be the correlation for 2-101. And so on.
Follow us on Twitter @IHSEViews

skgoh
Posts: 11
Joined: Thu Jul 07, 2011 9:42 pm

Re: rolling correlation

Postby skgoh » Tue Nov 20, 2012 7:35 pm

Dear Gareth

thanks again for your prompt reply.. appreciate it very much.

attached herewith my workfile (series corr1). Kindly let me know if I am doing it correctly?

secondly, allow me to ask a question on Panel Var. May I know can Eviews 7 run Panel VAR?

When I have eviews file which set up in panel data form, I notice that when I select a few variables from the panel data file, I was allowed to choose VAR in the option. That will prompt me to a window of VAR specification, which have allow me to choose unrestricted VAR, Vector Error Correction... something similar to time series VAR.. that make me puzzle is that a panel var?? furthermore there is no explanation on panel var in Eviews' help file. Am I right??

many thanks

regards

soo
Attachments
overall.wf1
(237.73 KiB) Downloaded 689 times

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

Re: rolling correlation

Postby EViews Gareth » Tue Nov 20, 2012 8:18 pm

Follow us on Twitter @IHSEViews

skgoh
Posts: 11
Joined: Thu Jul 07, 2011 9:42 pm

Re: rolling correlation

Postby skgoh » Tue Nov 20, 2012 8:24 pm

thanks again for showing the link on Panel VAR...

is the rolling correlation did correctly???

soo

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

Re: rolling correlation

Postby EViews Gareth » Tue Nov 20, 2012 11:02 pm

Sure.
Follow us on Twitter @IHSEViews

skgoh
Posts: 11
Joined: Thu Jul 07, 2011 9:42 pm

Re: rolling correlation

Postby skgoh » Tue Nov 20, 2012 11:04 pm

many thanks for your reply... :D

Raqia
Posts: 4
Joined: Mon Dec 11, 2017 11:54 pm

Re: rolling correlation

Postby Raqia » Sun Dec 24, 2017 10:44 pm

Dear, Are you now clear with rolling correlation?

It's time for you to help me.

Are you wiling?

Thanks in advance

Raqia


Return to “Econometric Discussions”

Who is online

Users browsing this forum: No registered users and 9 guests