Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Nick Cox <njcoxstata@gmail.com> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | Re: st: Sorting data in deciles and then regressing and storing coefficients. (Looping) |
Date | Mon, 8 Jul 2013 19:11:20 +0100 |
I see no reason to believe that you need to loop, but much depends on precisely how much detail you need for the regressions. See also -statsby-. Nick njcoxstata@gmail.com On 8 July 2013 16:14, C. Evans <ce306@cam.ac.uk> wrote: > I'm using Stata/SE 12.1 > > I am trying to create a new variable called BETA. It follows the computation > of many financial papers. Amihud 2002 gives a good description of what I am > trying to do. > > Extract paraphrased from Amihud (2002)accessed here > http://www.sciencedirect.com/science/article/pii/S1386418101000246 : > > At the end of each year Y, stocks are ranked by their size and divided into > ten equal portfolios. Next, the porfolio return R is calculated as the > equally weighted average of stock returns in portfolio P on day T in year Y. > Then, the market model is estimated for each portfolio P, P=1,2,....10 [...] * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/