Mutual Information Covariance
PortfolioOptimisers.MutualInfoCovariance Type
struct MutualInfoCovariance{__T_ve, __T_bins, __T_normalise} <: AbstractCovarianceEstimatorCovariance estimator based on mutual information.
MutualInfoCovariance implements a robust covariance estimator that uses mutual information (MI) to capture both linear and nonlinear dependencies between asset returns. This estimator is particularly useful for identifying complex relationships that are not detected by traditional correlation-based methods. The MI matrix is optionally normalised and then rescaled by marginal standard deviations to produce a covariance matrix.
Mathematical definition
Where:
: Mutual information-based correlation between assets and . : Covariance between assets and . : (Optionally normalised) mutual information between assets and . : Marginal standard deviation of asset from the variance estimator ve.
Fields
ve: Variance estimator.bins: Binning algorithm or fixed number of bins.normalise: Whether to normalise the mutual and/or variation of information calculation.
Constructors
MutualInfoCovariance(;
ve::AbstractVarianceEstimator = SimpleVariance(),
bins::Int_Bin = HacineGharbiRavier(),
normalise::Bool = true
) -> MutualInfoCovarianceKeywords correspond to the struct's fields.
Validation
- If
binsis an integer,0 < bins <= RESOURCE_LIMITS[].max_bins(the joint histogram isbins × bins; seeRESOURCE_LIMITS).
Examples
julia> MutualInfoCovariance()
MutualInfoCovariance
ve ┼ SimpleVariance
│ me ┼ SimpleExpectedReturns
│ │ w ┴ nothing
│ w ┼ nothing
│ corrected ┴ Bool: true
bins ┼ HacineGharbiRavier()
normalise ┴ Bool: trueRelated
sourceStatistics.cor Method
Statistics.cor(ce::MutualInfoCovariance, X::MatNum; dims::Int = 1, kwargs...)Compute the mutual information (MI) correlation matrix using a MutualInfoCovariance estimator.
This method computes the pairwise mutual information correlation matrix for the input data matrix X, using the binning strategy and normalisation specified in ce. The MI correlation captures both linear and nonlinear dependencies between asset returns, making it robust to complex relationships that may not be detected by traditional correlation measures.
Arguments
ce: Mutual information-based covariance estimator.X: Data matrix of asset returns (observations × assets).dims: Dimension along which to perform the computation.kwargs...: Additional keyword arguments (currently unused).
Returns
rho::Matrix{<:Number}: Symmetric matrix of mutual information-based correlation coefficients.
Validation
dimsis either1or2.
Related
source