skfolio.measures.correlation#
- skfolio.measures.correlation(X, sample_weight=None)[source]#
Compute the correlation matrix.
- Parameters:
- Xndarray of shape (n_observations, n_assets)
Array of values.
- sample_weightndarray of shape (n_observations,), optional
Relative observation weights. Must be finite and nonnegative. If None, equal weights are assumed.
- Returns:
- corrndarray of shape (n_assets, n_assets)
The correlation matrix.