Login  Register

Re: Sqrt of large correlation matrix

Posted by Etuka Onono-2 on Aug 04, 2016; 9:23am
URL: http://quantlib.414.s1.nabble.com/Sqrt-of-large-correlation-matrix-tp17596p17636.html

Hello Ian

Essentially, what Klaus just said.  His response is much more helpful than mine,  Lapack is a great source of linear-algebra-routines-that-work.  

The QuantLib row reduction algorithm is no good for you because it calculates all of the eigenvalues (and this is almost certainly what you don’t want), whether or not you discard them when you come to simulate.  This is most likely the reason why you see little difference in performance when you perform the rank reduction.  It is also rather hard to see how many eigenvalues are discarded when you choose a rank reduction factor.

PCA is just finding the largest, most contributing eigenvalues such that the variance explained is not too small - and this is what QuantLib’s calculation is trying to achieve.  

Etuka


On 4 Aug 2016, at 10:11, [hidden email] wrote:

From: Klaus Spanderen <[hidden email]>
Subject: Re: [Quantlib-users] Sqrt of large correlation matrix
Date: 2 August 2016 at 21:08:30 BST
Cc: ian_dfw <[hidden email]>


Hi 

I guess the number of non-zero eigenvalues is much smaller than 4000.  There 
are good routines available to calculate the largest n eigenvalues / 
eigenvectors and these routines perform much better than trying to calculate 
all eigenvalues suppose most of them are zero. You might want to try LAPACK or 
ARPACK. IMO QuantLib does not offer these alogrithms.

regards
Klaus

On Montag, 1. August 2016 06:22:31 CEST ian_dfw wrote:
Thanks for your comment. Reason I was doing x4000 issues is that we are
trying to do Monte Carlo simulation on most of traded issues.  Potentially
the number would be much larger than 4000.  For the rank reduction, I tried
0.95 but not much improvement.
So right now I am thinking some dimension reduction like PCA.



------------------------------------------------------------------------------

_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users