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
Sample weights for each observation. If None, equal weights are assumed.
- Returns:
- corrndarray of shape (n_assets,)
The correlation matrix.