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::AbstractVarianceEstimator
: Variance estimator used to compute marginal standard deviations.bins::Union{<:AbstractBins, <:Integer}
: Binning algorithm or fixed number of bins for histogram-based MI estimation.normalise::Bool
: Whether to normalise the MI matrix.
Constructor
MutualInfoCovariance(; ve::AbstractVarianceEstimator = SimpleVariance(),
bins::Union{<:AbstractBins, <:Integer} = HacineGharbiRavier(),
normalise::Bool = true)
Creates a MutualInfoCovariance
object with the specified variance estimator, binning strategy, and normalisation option.
Related
PortfolioOptimisers.MutualInfoCovariance
— MethodMutualInfoCovariance(; ve::AbstractVarianceEstimator = SimpleVariance(),
bins::Union{<:AbstractBins, <:Integer} = HacineGharbiRavier(),
normalise::Bool = true)
Construct a MutualInfoCovariance
estimator for robust covariance or correlation estimation using mutual information.
This constructor creates a MutualInfoCovariance
object using the specified variance estimator, binning algorithm (or fixed bin count), and normalisation flag. The estimator computes the covariance matrix by combining the mutual information matrix (optionally normalised) with the marginal standard deviations.
Arguments
ve::AbstractVarianceEstimator
: Variance estimator.bins::Union{<:AbstractBins, <:Integer}
: Binning algorithm or fixed number of bins for MI estimation.normalise::Bool
: Whether to normalise the MI matrix.
ReturnsResult
MutualInfoCovariance
: A configured mutual information-based covariance estimator.
Validation
- If
bins
is an integer, asserts thatbins > 0
.
Examples
julia> ce = MutualInfoCovariance()
MutualInfoCovariance
ve | SimpleVariance
| me | SimpleExpectedReturns
| | w | nothing
| w | nothing
| corrected | Bool: true
bins | HacineGharbiRavier()
normalise | Bool: true
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::MutualInfoCovariance
: Mutual information-based covariance estimator.X::AbstractMatrix
: Data matrix of asset returns (observations × assets).dims::Int
: Dimension along which to compute the correlation.kwargs...
: Additional keyword arguments (currently unused).
ReturnsResult
rho::Matrix{Float64}
: Symmetric matrix of mutual information-based correlation coefficients.
Validation
- Asserts that
dims
is either1
or2
.
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::MutualInfoCovariance
: Mutual information-based covariance estimator.X::AbstractMatrix
: Data matrix of asset returns (observations × assets).dims::Int
: Dimension along which to compute the covariance.kwargs...
: Additional keyword arguments passed to the variance estimator.
ReturnsResult
sigma::Matrix{Float64}
: Symmetric matrix of mutual information-based covariances.
Validation
- Asserts that
dims
is either1
or2
.
Examples
Related