Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Rolling correlation coefficients with panel data


From   Alexandre Athanassiadis <[email protected]>
To   [email protected]
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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index