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)
standard deviation of group
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
Re: standard deviation of group
1) Convert the group into a matrix, and then calculate the statistics of interest
2) Loop through the members of the group (i.e. series), which can be done easily in EViews.
Code: Select all
stom(mygr,mymat)
scalar sdev = @stdev(mymat)Re: standard deviation of group
Thanks. Im sorry, but i am really not good with Eviews.
1. Can @stdev(mymat) be done for more groups at one time?
1. Can @stdev(mymat) be done for more groups at one time?
How do I 'loop' ?2) Loop through the members of the group (i.e. series), which can be done easily in EViews.
Re: standard deviation of group
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
2) http://forums.eviews.com/viewtopic.php?f=5&t=1638
Who is online
Users browsing this forum: No registered users and 2 guests
