return calculation
Moderators: EViews Gareth, EViews Moderator
-
quynh_nguyennz
- Posts: 25
- Joined: Tue Aug 07, 2012 4:00 am
return calculation
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
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
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13586
- Joined: Tue Sep 16, 2008 5:38 pm
Re: return calculation
What format is your data in?
-
quynh_nguyennz
- Posts: 25
- Joined: Tue Aug 07, 2012 4:00 am
Re: return calculation
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
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
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13586
- Joined: Tue Sep 16, 2008 5:38 pm
Re: return calculation
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...
-
quynh_nguyennz
- Posts: 25
- Joined: Tue Aug 07, 2012 4:00 am
Re: return calculation
7 countries in one page
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13586
- Joined: Tue Sep 16, 2008 5:38 pm
return calculation
Panel or pool?
-
quynh_nguyennz
- Posts: 25
- Joined: Tue Aug 07, 2012 4:00 am
Re: return calculation
panel data. sorry
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13586
- Joined: Tue Sep 16, 2008 5:38 pm
return calculation
Then what is wrong with the command you are currently using? In a panel workfile, it will do all 7 countries simultaneously.
-
quynh_nguyennz
- Posts: 25
- Joined: Tue Aug 07, 2012 4:00 am
Re: return calculation
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
-
quynh_nguyennz
- Posts: 25
- Joined: Tue Aug 07, 2012 4:00 am
Re: return calculation
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
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
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13586
- Joined: Tue Sep 16, 2008 5:38 pm
return calculation
Are you sure you have a panel workfile?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
-
quynh_nguyennz
- Posts: 25
- Joined: Tue Aug 07, 2012 4:00 am
Re: return calculation
I am really sorry . Actually I have no idea about panel or pool data look like :(
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13586
- Joined: Tue Sep 16, 2008 5:38 pm
return calculation
Post your workfile.
-
quynh_nguyennz
- Posts: 25
- Joined: Tue Aug 07, 2012 4:00 am
Re: return calculation
This is my file. And I want to calculate log daily return for each countries.
- Attachments
-
- data.wf1
- (208.12 KiB) Downloaded 938 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13586
- Joined: Tue Sep 16, 2008 5:38 pm
Re: return calculation
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:
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
Who is online
Users browsing this forum: No registered users and 2 guests
