Skip to content
13

Mutual Information Covariance

PortfolioOptimisers.MutualInfoCovariance Type
julia
struct MutualInfoCovariance{__T_ve, __T_bins, __T_normalise} <: AbstractCovarianceEstimator

Covariance 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.

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

julia
MutualInfoCovariance(;
    ve::AbstractVarianceEstimator = SimpleVariance(),
    bins::Int_Bin = HacineGharbiRavier(),
    normalise::Bool = true
) -> MutualInfoCovariance

Keywords correspond to the struct's fields.

Validation

  • If bins is an integer, bins > 0.

Examples

julia
julia> MutualInfoCovariance()
MutualInfoCovariance
         ve ┼ SimpleVariance
            │          me ┼ SimpleExpectedReturns
            │             │   w ┴ nothing
            │           w ┼ nothing
            │   corrected ┴ Bool: true
       bins ┼ HacineGharbiRavier()
  normalise ┴ Bool: true

Related

source
Statistics.cov Method
julia
Statistics.cov(ce::MutualInfoCovariance, X::MatNum; dims::Int = 1, kwargs...)

Compute the mutual information (MI) covariance matrix using a MutualInfoCovariance estimator.

This method computes the pairwise mutual information covariance matrix for the input data matrix X, using the binning strategy and normalisation specified in ce. The MI covariance matrix is obtained by rescaling the MI correlation matrix by the marginal standard deviations, as estimated by the variance estimator in ce.

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 passed to the variance estimator.

Returns

  • sigma::Matrix{<:Number}: Symmetric matrix of mutual information-based covariances.

Validation

  • dims is either 1 or 2.

Examples

Related

source
Statistics.cor Method
julia
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

  • dims is either 1 or 2.

Related

source