Generating random covariance and correlation matrices with beautiful geodesic interpolation visualizations! 🎯
pip install randomcov
or for latest
pip install git+https://github.com/microprediction/randomcov.git
from randomcov import random_covariance_matrix
cov = random_covariance_matrix(n=50, corr_method='residuals', var_method='lognormal')
To collect standard but also novel correlation and covariance generation methods, in order to better understand when some estimation methods work better than others in different contexts: such as the construction of machine learning model ensembles, combinations of forecasts, or financial portfolios.
The geodesic interpolation capabilities enable smooth transformations between covariance structures while preserving mathematical properties, making it ideal for portfolio optimization and risk management applications.
An example of the kind of thing I wish to test against generative models.
Correlation Inflation: A Working Paper
The transformation preserves geometric properties while smoothly interpolating towards perfect correlation structure using differential geometry on the manifold of positive definite matrices.
