Stats.Nearest Correlation Matrix Method
Definition
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Overload List
Nearest | Returns a positive semi-definite matrix close to a matrix. |
Nearest | Returns a positive semi-definite matrix close to a matrix. |
Nearest | Returns a positive semi-definite matrix close to a matrix. |
NearestCorrelationMatrix(SymmetricMatrix<Double>)
public static SymmetricMatrix<double> NearestCorrelationMatrix(
SymmetricMatrix<double> matrix
)
Parameters
- matrix SymmetricMatrix<Double>
- A symmetric matrix.
Return Value
SymmetricMatrix<Double>A symmetric matrix that is positive semi-definite. If matrix itself is positive semi-definite, it is returned unchanged.
Remarks
This method uses a method by Rebonato and Jäckel (scaled projection) or the alternating projections method of Nigham.
NearestCorrelationMatrix(SymmetricMatrix<Double>, NearestCorrelationMatrixAlgorithm)
public static SymmetricMatrix<double> NearestCorrelationMatrix(
SymmetricMatrix<double> matrix,
NearestCorrelationMatrixAlgorithm algorithm
)
Parameters
- matrix SymmetricMatrix<Double>
- A symmetric matrix.
- algorithm NearestCorrelationMatrixAlgorithm
- Specifies the algorithm used to compute the matrix.
Return Value
SymmetricMatrix<Double>A symmetric matrix that is positive semi-definite. If matrix itself is positive semi-definite, it is returned unchanged.
Remarks
This method uses a method by Rebonato and Jäckel (scaled projection) or the alternating projections method of Nigham.
NearestCorrelationMatrix(SymmetricMatrix<Double>, NearestCorrelationMatrixAlgorithm, Double, Int32)
public static SymmetricMatrix<double> NearestCorrelationMatrix(
SymmetricMatrix<double> matrix,
NearestCorrelationMatrixAlgorithm algorithm,
double tolerance,
int maxIterations
)
Parameters
- matrix SymmetricMatrix<Double>
- A symmetric matrix.
- algorithm NearestCorrelationMatrixAlgorithm
- Specifies the algorithm used to compute the matrix.
- tolerance Double
- The relative tolerance used to test for convergence.
- maxIterations Int32
- The maximum number of iterations to perform.
Return Value
SymmetricMatrix<Double>A symmetric matrix that is positive semi-definite. If matrix itself is positive semi-definite, it is returned unchanged.
Remarks
This method uses a method by Rebonato and Jäckel (scaled projection) or the alternating projections method of Nigham.
Rebonato and Jäckel's method uses a direct approximation. The Nigham algorithm computes the matrix nearest to matrix in the sense that the sum of the squares of the differences between corresponding elements is minimized.