struct CorrelationCovariance{__T_ce, __T_cache} <: AbstractCovarianceEstimatorReturns the correlation matrix of the wrapped estimator from both cov and cor.
Statistics.cor(ce::CorrelationCovariance, X::MatNum; dims::Int = 1,
kwargs...)Compute the correlation matrix with the wrapped estimator.
Statistics.cov(ce::CorrelationCovariance, X::MatNum; dims::Int = 1,
kwargs...)Compute the correlation matrix with the wrapped estimator, and return it as the covariance matrix.
const MatNum = AbstractMatrix{<:Union{Number, JuMP.AbstractJuMPScalar}}Alias for an abstract matrix of numeric types or JuMP scalar types.
const Option{T} = Union{Nothing, T}Alias for an optional value of type T, which can be nothing.
abstract type AbstractPartialFitState <: AbstractResultAbstract supertype for the state of an incremental fit.
cor(
ce::AbstractCovarianceEstimator,
state::SampleBufferState;
kwargs...
) -> AnyComputes a correlation matrix from the observations of a SampleBufferState with the batch verb.
Statistics.cov(ce::AbstractCovarianceEstimator, X::MatNum; dims::Int = 1, kwargs...)Computes the covariance matrix from the correlation matrix of the estimator and the standard deviations of its variance estimator ce.ve.
cov(
ce::AbstractCovarianceEstimator,
state::SampleBufferState;
kwargs...
) -> AnyComputes a covariance matrix from the observations of a SampleBufferState with the batch verb.
struct Covariance{__T_me, __T_ce, __T_alg, __T_w, __T_cvg, __T_cache} <: AbstractCovarianceEstimatorEstimates the covariance matrix of asset returns from a centring estimator, a covariance estimator, and a moment algorithm.
Statistics.cor(
ce::Covariance,
X::MatNum;
dims::Int = 1,
mean = nothing,
kwargs...
) -> MatNumCompute the correlation matrix with a Covariance estimator.
Statistics.cor(
ce::GeneralCovariance,
X::MatNum;
dims::Int = 1,
mean = nothing,
kwargs...
) -> MatNumCompute the correlation matrix with a GeneralCovariance estimator.
Statistics.cor(ce::Union{GeneralCovariance,
Covariance{<:Any, <:Any, <:FullMoment}},
state::CovarianceState)
Statistics.cor(ce::Union{GeneralCovariance, Covariance})Reads a correlation matrix from a folded covariance estimator.
Statistics.cov(
ce::Covariance,
X::MatNum;
dims::Int = 1,
mean = nothing,
kwargs...
) -> MatNumCompute the covariance matrix with a Covariance estimator.
Statistics.cov(
ce::GeneralCovariance,
X::MatNum;
dims::Int = 1,
mean = nothing,
kwargs...
) -> MatNumCompute the covariance matrix with a GeneralCovariance estimator.
Statistics.cov(
ce::Union{GeneralCovariance, Covariance{<:Any, <:Any, <:FullMoment}},
state::CovarianceState;
strict::Bool = false
) -> MatNum
Statistics.cov(ce::Union{GeneralCovariance, Covariance}; strict::Bool = false) -> MatNumRead the covariance matrix of an incremental fit from a CovarianceState.
Statistics.cor(
ce::GerberCovariance,
X::MatNum;
dims::Int = 1,
kwargs...
) -> MatNumCompute the Gerber correlation matrix with the algorithm in ce.alg.
Statistics.cov(
ce::GerberCovariance,
X::MatNum;
dims::Int = 1,
kwargs...
) -> MatNumCompute the Gerber covariance matrix with the algorithm in ce.alg.
Statistics.cor(ce::SmythBrobyCovariance, X::MatNum; dims::Int = 1, kwargs...)Compute the Smyth-Broby correlation matrix.
Statistics.cov(ce::SmythBrobyCovariance, X::MatNum; dims::Int = 1, kwargs...)Compute the Smyth-Broby covariance matrix.
Statistics.cor(
ce::GerberIQCovariance,
X::MatNum;
dims::Int = 1,
kwargs...
) -> MatNumCompute the Gerber IQ correlation matrix with the squeezing template in ce.kind and the marker in ce.alg.
Statistics.cov(
ce::GerberIQCovariance,
X::MatNum;
dims::Int = 1,
kwargs...
) -> MatNumCompute the Gerber IQ covariance matrix with the squeezing template in ce.kind and the marker in ce.alg.
Statistics.cor(ce::DistanceCovariance, X::MatNum; dims::Int = 1, kwargs...)Compute the distance correlation matrix of the columns of a data matrix with a DistanceCovariance estimator.
Statistics.cov(ce::DistanceCovariance, X::MatNum; dims::Int = 1, kwargs...)Compute the distance covariance matrix of the columns of a data matrix with a DistanceCovariance estimator.
Statistics.cor(ce::LowerTailDependenceCovariance, X::MatNum; dims::Int = 1, kwargs...)Compute the lower tail dependence correlation matrix with a LowerTailDependenceCovariance estimator.
Statistics.cor(::KendallCovariance, X::MatNum; dims::Int = 1, kwargs...)Compute the Kendall's tau rank correlation matrix with a KendallCovariance estimator.
Statistics.cor(::SpearmanCovariance, X::MatNum; dims::Int = 1, kwargs...)Compute the Spearman's rho rank correlation matrix with a SpearmanCovariance estimator.
Statistics.cor(ce::MutualInfoCovariance, X::MatNum; dims::Int = 1, kwargs...)Compute the mutual information correlation matrix with a MutualInfoCovariance estimator.
Statistics.cor(ce::PortfolioOptimisersCovariance, X::MatNum; dims = 1,
active_mask::Option{<:AbstractMatrix{<:Bool}} = nothing, kwargs...)Compute the correlation matrix with a PortfolioOptimisersCovariance estimator, and process the matrix.
Statistics.cov(ce::PortfolioOptimisersCovariance, X::MatNum; dims = 1,
active_mask::Option{<:AbstractMatrix{<:Bool}} = nothing, kwargs...)Compute the covariance matrix with a PortfolioOptimisersCovariance estimator, and process the matrix.
Statistics.cor(ce::ImpliedVolatility, X::MatNum; dims::Int = 1, mean = nothing,
iv::Option{<:MatNum} = nothing, ivpa::Option{<:Num_VecNum} = nothing, kwargs...)Returns the base correlation matrix of X, after the same checks as the covariance method.
Statistics.cov(ce::ImpliedVolatility, X::MatNum; dims::Int = 1, mean = nothing,
iv::Option{<:MatNum} = nothing, ivpa::Option{<:Num_VecNum} = nothing, kwargs...)Returns the covariance matrix of X, scaled by the realised volatilities that ce.alg predicts from iv.
Statistics.cor(ve::AbstractVarianceEstimator, X::MatNum; dims::Int = 1, kwargs...)Always throw a MethodError.
Statistics.cov(ve::AbstractVarianceEstimator, X::MatNum; dims::Int = 1, kwargs...)Always throw a MethodError.
Statistics.cor(ce::WindowedCovariance, X::MatNum; dims::Int = 1, mean = nothing, iv::Option{<:MatNum} = nothing, kwargs...)Compute Statistics.cor over a rolling or indexed window of observations, for a matrix input.
Statistics.cov(ce::WindowedCovariance, X::MatNum; dims::Int = 1, mean = nothing, iv::Option{<:MatNum} = nothing, kwargs...)Compute Statistics.cov over a rolling or indexed window of observations, for a matrix input.
Statistics.cor(
ce::ExpWeightedCovariance,
X::MatNum;
dims::Int = 1,
active_mask::Option{<:AbstractMatrix{<:Bool}} = nothing,
kwargs...
) -> MatNumCompute the exponentially weighted correlation matrix.
Statistics.cor(ce::ExpWeightedCovariance, state::ExpWeightedCovarianceState; kwargs...) -> MatNumRead the exponentially weighted correlation out of a state that the caller holds.
Statistics.cov(
ce::ExpWeightedCovariance,
X::MatNum;
dims::Int = 1,
active_mask::Option{<:AbstractMatrix{<:Bool}} = nothing,
kwargs...
) -> MatNumCompute the exponentially weighted covariance matrix.
Statistics.cov(ce::ExpWeightedCovariance, state::ExpWeightedCovarianceState; kwargs...) -> MatNumRead the exponentially weighted covariance out of a state that the caller holds.
Statistics.cor(
ce::RegimeAdjustedExpWeightedCovariance,
X::MatNum;
dims::Int = 1,
estimation_mask::Option{<:AbstractMatrix{<:Bool}} = nothing,
active_mask::Option{<:AbstractMatrix{<:Bool}} = nothing,
kwargs...
) -> MatNumCompute the regime-adjusted exponentially weighted correlation matrix.
Statistics.cor(
ce::RegimeAdjustedExpWeightedCovariance,
state::RegimeAdjustedCovarianceState;
kwargs...
) -> MatNumRead the regime-adjusted correlation out of a state held by hand.
Statistics.cov(
ce::RegimeAdjustedExpWeightedCovariance,
X::MatNum;
dims::Int = 1,
estimation_mask::Option{<:AbstractMatrix{<:Bool}} = nothing,
active_mask::Option{<:AbstractMatrix{<:Bool}} = nothing,
kwargs...
) -> MatNumCompute the regime-adjusted exponentially weighted covariance matrix.
Statistics.cov(
ce::RegimeAdjustedExpWeightedCovariance,
state::RegimeAdjustedCovarianceState;
kwargs...
) -> MatNumRead the regime-adjusted covariance out of a state held by hand.
Statistics.cor(ce::RankOneCovariance, X::MatNum; dims::Int = 1, kwargs...)Computes the correlation matrix of the rank-one covariance of a window of returns, assets × assets.
Statistics.cov(ce::RankOneCovariance, X::MatNum; dims::Int = 1, kwargs...)Computes the rank-one covariance of a window of returns, assets × assets.
Statistics.cov(ce::GeodesicShrinkageCovariance, X::MatNum; dims::Int = 1, kwargs...)
Statistics.cor(ce::GeodesicShrinkageCovariance, X::MatNum; dims::Int = 1, kwargs...)Computes the covariance matrix with ce.ce, and shrinks it towards ce.tgt along the geodesic of the positive definite matrices.