## rolling correlation

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

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

### rolling correlation

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

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: 11848
Joined: Tue Sep 16, 2008 5:38 pm

### Re: rolling correlation

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

where 10 is the size of the window you want to roll.

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

### Re: rolling correlation

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: 11848
Joined: Tue Sep 16, 2008 5:38 pm

### Re: rolling correlation

It does not require a program. Do you have EViews 7?

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

### Re: rolling correlation

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: 11848
Joined: Tue Sep 16, 2008 5:38 pm

### Re: rolling correlation

Yep.

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

### Re: rolling correlation

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: 11848
Joined: Tue Sep 16, 2008 5:38 pm

### Re: rolling correlation

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.

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

### Re: rolling correlation

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

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

### Re: rolling correlation

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

### Re: rolling correlation

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: 11848
Joined: Tue Sep 16, 2008 5:38 pm

### Re: rolling correlation

Sure.

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

### Re: rolling correlation

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

### Re: rolling correlation

Dear, Are you now clear with rolling correlation?

It's time for you to help me.

Are you wiling?