return calculation

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

quynh_nguyennz
Posts: 25
Joined: Tue Aug 07, 2012 4:00 am

return calculation

Postby quynh_nguyennz » Tue Aug 07, 2012 4:34 pm

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

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

Re: return calculation

Postby EViews Gareth » Tue Aug 07, 2012 5:14 pm

What format is your data in?
Follow us on Twitter @IHSEViews

quynh_nguyennz
Posts: 25
Joined: Tue Aug 07, 2012 4:00 am

Re: return calculation

Postby quynh_nguyennz » Tue Aug 07, 2012 6:31 pm

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

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

Re: return calculation

Postby EViews Gareth » Tue Aug 07, 2012 6:40 pm

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...
Follow us on Twitter @IHSEViews

quynh_nguyennz
Posts: 25
Joined: Tue Aug 07, 2012 4:00 am

Re: return calculation

Postby quynh_nguyennz » Tue Aug 07, 2012 7:21 pm

7 countries in one page

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

return calculation

Postby EViews Gareth » Tue Aug 07, 2012 7:30 pm

Panel or pool?
Follow us on Twitter @IHSEViews

quynh_nguyennz
Posts: 25
Joined: Tue Aug 07, 2012 4:00 am

Re: return calculation

Postby quynh_nguyennz » Tue Aug 07, 2012 7:43 pm

panel data. sorry

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

return calculation

Postby EViews Gareth » Tue Aug 07, 2012 8:04 pm

Then what is wrong with the command you are currently using? In a panel workfile, it will do all 7 countries simultaneously.
Follow us on Twitter @IHSEViews

quynh_nguyennz
Posts: 25
Joined: Tue Aug 07, 2012 4:00 am

Re: return calculation

Postby quynh_nguyennz » Wed Aug 08, 2012 5:22 pm

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

Postby quynh_nguyennz » Wed Aug 08, 2012 5:35 pm

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

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

return calculation

Postby EViews Gareth » Wed Aug 08, 2012 5:47 pm

quynh_nguyennz wrote: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?
Follow us on Twitter @IHSEViews

quynh_nguyennz
Posts: 25
Joined: Tue Aug 07, 2012 4:00 am

Re: return calculation

Postby quynh_nguyennz » Wed Aug 08, 2012 6:20 pm

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

return calculation

Postby EViews Gareth » Wed Aug 08, 2012 6:34 pm

Post your workfile.
Follow us on Twitter @IHSEViews

quynh_nguyennz
Posts: 25
Joined: Tue Aug 07, 2012 4:00 am

Re: return calculation

Postby quynh_nguyennz » Thu Aug 09, 2012 9:22 pm

This is my file. And I want to calculate log daily return for each countries.
Attachments
data.wf1
(208.12 KiB) Downloaded 183 times

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

Re: return calculation

Postby EViews Gareth » Fri Aug 10, 2012 8:02 am

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
Follow us on Twitter @IHSEViews


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 10 guests