Skip to main content

Module linalg

Module linalg 

Source
Expand description

Linear algebra utilities: matrix decompositions and correlation handling.

decomp holds the general-purpose factorizations (Cholesky, QR, SVD, symmetric eigen). On top of them sit the correlation tools: empirical correlation matrices (estimated pairwise, stressed by hand, or copied from a term sheet) frequently fail positive semi-definiteness; nearest_correlation repairs them with the alternating-projections algorithm of Higham (2002), and cholesky factorizes the result for correlated simulation.

Re-exports§

pub use cholesky::cholesky;
pub use decomp::cholesky_factor;
pub use decomp::cholesky_solve;
pub use decomp::least_squares;
pub use decomp::pseudo_solve;
pub use decomp::qr;
pub use decomp::qr;
pub use decomp::svd;
pub use decomp::svd;
pub use decomp::symmetric_eigen;
pub use nearest_correlation::nearest_correlation;

Modules§

cholesky
Cholesky factorization of correlation matrices (PSD-tolerant): the unit-diagonal validation layer over the general factorization in decomp::cholesky.
decomp
Matrix decompositions, one per file — general-purpose kernels for future use across the library (regression, calibration, PCA, factor models), independent of any finance semantics.
nearest_correlation
Higham’s alternating-projections algorithm for the nearest correlation matrix (Higham, IMA J. Numer. Anal. 2002).