Mutual Information Covariance
PortfolioOptimisers.MutualInfoCovariance
— Typestruct MutualInfoCovariance{T1, T2, T3} <: AbstractCovarianceEstimator
ve::T1
bins::T2
normalise::T3
end
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 used to compute marginal standard deviations.bins
: Binning algorithm or fixed number of bins for histogram-based MI estimation.normalise
: Whether to normalise the MI matrix.
Constructor
MutualInfoCovariance(; ve::AbstractVarianceEstimator = SimpleVariance(),
bins::Union{<:AbstractBins, <:Integer} = HacineGharbiRavier(),
normalise::Bool = true)
Keyword arguments correspond to the fields above.
Validation
- If
bins
is an integer,bins > 0
.
Examples
julia> ce = MutualInfoCovariance()
MutualInfoCovariance
ve | SimpleVariance
| me | SimpleExpectedReturns
| | w | nothing
| w | nothing
| corrected | Bool: true
bins | HacineGharbiRavier()
normalise | Bool: true
Related
Statistics.cov
— Methodcov(ce::MutualInfoCovariance, X::AbstractMatrix; 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 compute the covariance.kwargs...
: Additional keyword arguments passed to the variance estimator.
Returns
sigma::Matrix{<:Real}
: Symmetric matrix of mutual information-based covariances.
Validation
dims
is either1
or2
.
Examples
Related
Statistics.cor
— Methodcor(ce::MutualInfoCovariance, X::AbstractMatrix; 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 compute the correlation.kwargs...
: Additional keyword arguments (currently unused).
Returns
rho::Matrix{<:Real}
: Symmetric matrix of mutual information-based correlation coefficients.
Validation
dims
is either1
or2
.
Related