Code covered by the BSD License

### Highlights from Matrix Decomposition

4.0
4.0 | 2 ratings Rate this file 12 Downloads (last 30 days) File Size: 903 KB File ID: #31296 Version: 1.7

# Matrix Decomposition

### Aleksander (view profile)

03 May 2011 (Updated )

Positive definite correlation matrix based on spectral decomposition. Now both for .m, C and Mex

File Information
Description

Matrix decomposition using, e.g. the Cholesky decomposition requires the correlation matrix to be positive definite. That is, the eigenvalues must all be positive. In finance, this is rarely the case, and one often observes negative eigenvalues, or zero eigenvalues. These two functions do essentially the same thing. One adjusts only the <= 0 eigenvalues, while the other adjusts those eigenvalues, but then also increases the other non-negative eigenvalues to compensate for the higher 'weight' given to the smaller eigenvalues.

Required Products Econometrics Toolbox
Financial Toolbox
Optimization Toolbox
Statistics and Machine Learning Toolbox
MATLAB
MATLAB release MATLAB 7.12 (R2011a)
Other requirements The C programming code implementation is optimized for Intel 64-bit CPUs.
26 May 2015 Ashim

### Ashim (view profile)

The Coherence results in Coherence of 1.2 maximum, which is not possible, could you recommend what may be the problem?

12 Aug 2014 Lorenzo

### Lorenzo (view profile)

Hi,

[Eig_Vec,~]=eig(Corr_Mat) this give me the following error:

|
Error: Unbalanced or unexpected parenthesis or bracket.

But I cannot figure out why. Do you have any idea? Thanks

Comment only
18 Nov 2012 Aleksander

### Aleksander (view profile)

The latest submission includes the function written in the C programming language, as well as a MEX implementation, thus providing significant speed and memory enhancements.

Comment only
03 Nov 2012 Aleksander

### Aleksander (view profile)

Does the trick!

Comment only
07 Jul 2011 Marco

### Marco (view profile)

Very useful and efficient functions. Thanks to the willing and gentle author for the prompt and clear help.

20 Jul 2011 1.2

Removed one function

05 Nov 2012 1.3

Updated description

05 Nov 2012 1.6