standard deviation of group

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

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

d0hMole
Posts: 2
Joined: Thu Oct 30, 2014 4:17 am

standard deviation of group

Postby d0hMole » Thu Oct 30, 2014 4:26 am

Hello,

1. I have daily data of 100 stocks, for 21 days (1 month), and i want to calculate the standard deviation of the group. How can this be done easily (without creating covariation matrices?).
Seems pretty easy to me, but I cannot work it out.

2. I want to calculate amultiple regression. I have two explanatory variables, that have to explain the return of every individual stock. So for every stock (of these 100) I want to do a multiple regression:
r (return of stock) = alpha + beta1 + beta2 + e
Is there a way to do this easily or must every regression for every stock be done individually?

Thanks (i'm using eviews 7)

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: standard deviation of group

Postby trubador » Thu Oct 30, 2014 5:07 am

1) Convert the group into a matrix, and then calculate the statistics of interest

Code: Select all

stom(mygr,mymat) scalar sdev = @stdev(mymat)
2) Loop through the members of the group (i.e. series), which can be done easily in EViews.

d0hMole
Posts: 2
Joined: Thu Oct 30, 2014 4:17 am

Re: standard deviation of group

Postby d0hMole » Thu Oct 30, 2014 6:43 am

Thanks. Im sorry, but i am really not good with Eviews.

1. Can @stdev(mymat) be done for more groups at one time?
2) Loop through the members of the group (i.e. series), which can be done easily in EViews.
How do I 'loop' ?

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: standard deviation of group

Postby trubador » Thu Oct 30, 2014 7:37 am

1) Groups and Matrices are two different "object"s in EViews. Since you seem to wish to compute the pooled variance, I suggested the use of Matrix instead of Group. Again, if you need to compute a single (pooled) variance of all groups, then you need to create a larger matrix. Otherwise, you have to do it separately for each group.

2) http://forums.eviews.com/viewtopic.php?f=5&t=1638


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests