Comments on: Calculating Moving Correlation in Matlab http://etf-central.com/2010/10/03/calculating-moving-correlation-in-matlab/ Fast-paced market news, analysis, and discussion - Michael J. Bommarito II Sun, 15 Apr 2012 03:42:02 +0000 hourly 1 http://wordpress.org/?v=3.3.1 By: Michael Bommarito http://etf-central.com/2010/10/03/calculating-moving-correlation-in-matlab/#comment-7 Michael Bommarito Thu, 28 Oct 2010 13:42:24 +0000 http://etf-central.com/?p=98#comment-7 Hi Paolo, The code as I've posted doesn't deal with NaNs gracefully. You can see from this Matlab documentation page that you can add "'rows', 'complete'" to the corrcoef command to gracefully deal with the issue. http://www.mathworks.com/help/techdoc/ref/corrcoef.html The other alternatives are to drop that date completely, interpolate, or use a more sophisticated method for dealing with missing observations. Hi Paolo,
The code as I’ve posted doesn’t deal with NaNs gracefully. You can see from this Matlab documentation page that you can add “‘rows’, ‘complete’” to the corrcoef command to gracefully deal with the issue.
http://www.mathworks.com/help/techdoc/ref/corrcoef.html

The other alternatives are to drop that date completely, interpolate, or use a more sophisticated method for dealing with missing observations.

]]>
By: Paolo http://etf-central.com/2010/10/03/calculating-moving-correlation-in-matlab/#comment-6 Paolo Thu, 28 Oct 2010 13:39:45 +0000 http://etf-central.com/?p=98#comment-6 Hi Michael, it's not clear how you deal with NA. How would you calculate correlations for indexes across different countries where one data point can be missing due to a particular holiday in a single country? Thanks, Paolo Hi Michael,

it’s not clear how you deal with NA.

How would you calculate correlations for indexes across different countries where one data point can be missing due to a particular holiday in a single country?

Thanks,

Paolo

]]>