Page 1 of 2

return calculation

Posted: Tue Aug 07, 2012 4:34 pm
by quynh_nguyennz
Hi there,
I am currently calculating the return for 7 countries by using series return = log( ri)- log (ri (-1))
and I aplly for 7 countries. anybody know how to apply one command that can give the result straight away for the 7 countries??
regards

Re: return calculation

Posted: Tue Aug 07, 2012 5:14 pm
by EViews Gareth
What format is your data in?

Re: return calculation

Posted: Tue Aug 07, 2012 6:31 pm
by quynh_nguyennz
my format is csv.
and one more about the principle component, I have one serie include the daily data for 10 countries from 2005 to 2011.
I would like to run the principle component for each year and for each countries. Could you please show me how to run principle component
Thank you very much
Best regards

Re: return calculation

Posted: Tue Aug 07, 2012 6:40 pm
by EViews Gareth
No, I meant what format is it in in EViews. Is it a panel? Pool? Simple time series with each country on a different page? Etc...

Re: return calculation

Posted: Tue Aug 07, 2012 7:21 pm
by quynh_nguyennz
7 countries in one page

return calculation

Posted: Tue Aug 07, 2012 7:30 pm
by EViews Gareth
Panel or pool?

Re: return calculation

Posted: Tue Aug 07, 2012 7:43 pm
by quynh_nguyennz
panel data. sorry

return calculation

Posted: Tue Aug 07, 2012 8:04 pm
by EViews Gareth
Then what is wrong with the command you are currently using? In a panel workfile, it will do all 7 countries simultaneously.

Re: return calculation

Posted: Wed Aug 08, 2012 5:22 pm
by quynh_nguyennz
this is nothing wrong with the command, but it doesnot come out each countries return.for example, since i got seven countries daily data and i want to calculate the return for each country, i have to run 7 command in order to get that

Re: return calculation

Posted: Wed Aug 08, 2012 5:35 pm
by quynh_nguyennz
HI, one more question,
I got the daily data return from 2005-2011 for 7 countries,and I want to run pricipal component for each year in order to run the regression for each countries. this is the model for regression
Rj,t = ∑i=1- 5 βj,t PCi,t + εj,t .
if I just click on the return and views/ principal component/ and select some options, it just show the table. How ever I want to create the table for principal component for each year.
could you please help me
regards

return calculation

Posted: Wed Aug 08, 2012 5:47 pm
by EViews Gareth
this is nothing wrong with the command, but it doesnot come out each countries return.for example, since i got seven countries daily data and i want to calculate the return for each country, i have to run 7 command in order to get that
Are you sure you have a panel workfile?

Re: return calculation

Posted: Wed Aug 08, 2012 6:20 pm
by quynh_nguyennz
I am really sorry . Actually I have no idea about panel or pool data look like :(

return calculation

Posted: Wed Aug 08, 2012 6:34 pm
by EViews Gareth
Post your workfile.

Re: return calculation

Posted: Thu Aug 09, 2012 9:22 pm
by quynh_nguyennz
This is my file. And I want to calculate log daily return for each countries.

Re: return calculation

Posted: Fri Aug 10, 2012 8:02 am
by EViews Gareth
ok.

You actually have neither a panel or a pool workfile. The easiest way to do it from where you are is with the following program:

Code: Select all

for !i=1 to group01.@count %name = group01.@seriesname(!i) %newname = "return_" + %name series {%newname} = log({%name}) - log({%name}(-1)) next