Hi all, I have a problem in make it faster when regressing using rolling window first note: 1. The date has no definite cycle, but commonly two or four records a year, but allow a large gap 2. Industry can be not just a and b 3. for each date and each industry, y is product's price, there are N products, so y has three levels: y_(date,industry,product) 4. what we need: we need regress y on x of each each and industry using window rolling 5. for example, if we use three years as window, we can calculate beta=-6.3352 (with stderr=0.181942) of industry A in 2009/12/31 using the observation 3-22 (in 2007/1/1 to 2009/12/31), we require the unique date records of industry A within 3 years should at least 3*2=6, otherwise we will not estimate it, e.g., we don’t have enough observation of industry A in 2008/12/31, because there are only 5 unique date records only in 2006/1/1 to 2008/12/31 6. the rolling window can also be 1 year (require at least 2 unique date records) and 5 years (at least 5*2=10)
... View more