Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

st: Rolling correlation coefficients with panel data

From   Alexandre Athanassiadis <>
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,


*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index