- #1
BWV
- 1,524
- 1,865
Trying to run the factoran function in MATLAB on a large matrix of daily stock returns. The function requires the data to have a positive definite covariance matrix, but this data has many very small negative eigenvalues (< 10^-17), which I understand to be a floating point issue as 'real' covariance matrices are positive semi-definite. Does not make a difference whether or not I subtract the market return (which reduces the correlation). Any thoughts, I can find options to 'fix' the cov matrix, but nothing to tweak the data prior to calculating the cov matrix