Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Alexandre Athanassiadis <msf11aa3@mail.wbs.ac.uk> |
To | statalist@hsphsun2.harvard.edu |
Subject | st: Rolling correlation coefficients with panel data |
Date | Sat, 1 Sep 2012 22:45:30 +0100 |
Dear All, I hope you are well. In the context of my research, I am using a rather large dataset (730 corporates, their daily stock price for the 2003-2011 period and the risk free rate for the same period). Among other things, I am trying to compute the rolling correlation coefficients of the stock prices with the risk free rate. I have declared the data to be 'panel' without any difficulties: - egen id=group(tic) - xtset id Date, daily and I am using the following line to compute the correlation coefficients: - rolling, window(20) clear; corr price rate Unfortunately it take ages to get the job done! Any ideas on how I could improve my method? Thank you very much for your help, Regards, Alexandre * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/