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.std(ce::AbstractCovarianceEstimator, X::MatNum; dims::Int = 1, kwargs...)Compute the standard deviation vector from the diagonal of the covariance matrix.
Statistics.std(ve::AbstractVarianceEstimator, X::MatNum; dims::Int = 1, kwargs...)Compute the standard deviation vector as the element-wise square root of the variance vector.
Statistics.var(ce::AbstractCovarianceEstimator, X::MatNum; dims::Int = 1, kwargs...)Compute the variance vector from the diagonal of the covariance matrix.
const MatNum = AbstractMatrix{<:Union{<:Number, <:JuMP.AbstractJuMPScalar}}Alias for an abstract matrix of numeric types or JuMP scalar types.
abstract type AbstractCovarianceEstimator <: CovarianceEstimatorAbstract supertype for all covariance estimator types.
abstract type AbstractVarianceEstimator <: AbstractCovarianceEstimatorAbstract supertype for all variance estimator types.
cor(
ce::AbstractCovarianceEstimator,
state::SampleBufferState
) -> AnyReads a correlation matrix out of a SampleBufferState, by running the batch verb over the observations the buffer holds.
Statistics.cov(ce::AbstractCovarianceEstimator, X::MatNum; dims::Int = 1, kwargs...)Generic covariance fallback assembling the covariance matrix from the estimator's correlation matrix and the marginal standard deviations of its variance estimator ce.ve.
cov(
ce::AbstractCovarianceEstimator,
state::SampleBufferState
) -> AnyReads a covariance matrix out of a SampleBufferState, by running the batch verb over the observations the buffer holds.
std(
ve::AbstractVarianceEstimator,
state::SampleBufferState
) -> AnyReads a standard deviation out of a SampleBufferState, by running the batch verb over the observations the buffer holds.
var(
ve::AbstractVarianceEstimator,
state::SampleBufferState
) -> AnyReads a variance out of a SampleBufferState, by running the batch verb over the observations the buffer holds.
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 using a Covariance estimator.
cor(
ce::Covariance{<:Any, <:Any, <:SemiMoment},
X::AbstractMatrix{<:Union{var"#s136", var"#s53"} where {var"#s136"<:Number, var"#s53"<:AbstractJuMPScalar}};
dims,
mean,
active_mask,
kwargs...
) -> AnySemiMoment variant of cor(ce::Covariance, X::MatNum; dims::Int = 1, mean = nothing, kwargs...).
Statistics.cor(
ce::GeneralCovariance,
X::MatNum;
dims::Int = 1,
mean = nothing,
kwargs...
) -> MatNumCompute the correlation matrix using a GeneralCovariance estimator.
Statistics.cor(ce::Union{<:GeneralCovariance,
<:Covariance{<:Any, <:Any, <:FullMoment}},
state::CovarianceState)
Statistics.cor(ce::Union{<:GeneralCovariance, <:Covariance})Reads a correlation matrix out of a folded covariance estimator.
Statistics.cov(
ce::Covariance,
X::MatNum;
dims::Int = 1,
mean = nothing,
kwargs...
) -> MatNumCompute the covariance matrix using a Covariance estimator.
cov(
ce::Covariance{<:Any, <:Any, <:SemiMoment},
X::AbstractMatrix{<:Union{var"#s136", var"#s53"} where {var"#s136"<:Number, var"#s53"<:AbstractJuMPScalar}};
dims,
mean,
active_mask,
kwargs...
) -> AnySemiMoment variant of cov(ce::Covariance, X::MatNum; dims::Int = 1, mean = nothing, kwargs...).
Statistics.cov(
ce::GeneralCovariance,
X::MatNum;
dims::Int = 1,
mean = nothing,
kwargs...
) -> MatNumCompute the covariance matrix using a GeneralCovariance estimator.
Statistics.cov(
ce::Union{<:GeneralCovariance, <:Covariance{<:Any, <:Any, <:FullMoment}},
state::CovarianceState
) -> MatNum
Statistics.cov(ce::Union{<:GeneralCovariance, <:Covariance}) -> MatNumRead the covariance matrix of an incremental fit out of a CovarianceState.
struct SimpleVariance{__T_me, __T_w, __T_corrected, __T_cvg, __T_cache} <: AbstractVarianceEstimatorComputes the marginal variance and standard deviation, optionally weighted and optionally bias-corrected.
Statistics.std(
ve::SimpleVariance,
X::MatNum;
dims::Int = 1,
mean = nothing,
kwargs...,
) -> ArrNumCompute the standard deviation using a SimpleVariance estimator for a matrix.
Statistics.std(
ve::SimpleVariance,
X::VecNum;
mean = nothing
) -> NumberCompute the standard deviation using a SimpleVariance estimator for a vector.
std(
ve::SimpleVariance{Nothing},
X::AbstractMatrix{<:Union{var"#s136", var"#s53"} where {var"#s136"<:Number, var"#s53"<:AbstractJuMPScalar}};
dims,
mean,
kwargs...
) -> AnySimpleVariance{Nothing} overload of std(ve::SimpleVariance, X::MatNum; dims::Int = 1, mean = nothing, kwargs...).
Statistics.var(
ve::SimpleVariance,
X::MatNum;
dims::Int = 1,
mean = nothing,
kwargs...
) -> ArrNumCompute the variance using a SimpleVariance estimator for a matrix.
Statistics.var(
ve::SimpleVariance,
X::VecNum;
mean = nothing
) -> NumberCompute the variance using a SimpleVariance estimator for a vector.
Statistics.var(
ve::SimpleVariance,
state::SimpleVarianceState
) -> VecNum
Statistics.var(
ve::SimpleVariance
) -> VecNumRead the variance of an incremental fit out of a SimpleVarianceState.
var(
ve::SimpleVariance{Nothing},
X::AbstractMatrix{<:Union{var"#s136", var"#s53"} where {var"#s136"<:Number, var"#s53"<:AbstractJuMPScalar}};
dims,
mean,
kwargs...
) -> AnySimpleVariance{Nothing} overload of var(ve::SimpleVariance, X::MatNum; dims::Int = 1, mean = nothing, kwargs...).
Statistics.cor(
ce::GerberCovariance,
X::MatNum;
dims::Int = 1,
kwargs...
) -> MatNumCompute the Gerber correlation matrix using the algorithm specified in ce.alg.
Statistics.cov(
ce::GerberCovariance,
X::MatNum;
dims::Int = 1,
kwargs...
) -> MatNumCompute the Gerber covariance matrix using the algorithm specified 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.
Statistics.cov(
ce::GerberIQCovariance,
X::MatNum;
dims::Int = 1,
kwargs...
) -> MatNumCompute the Gerber IQ covariance matrix.
Statistics.cor(ce::DistanceCovariance, X::MatNum; dims::Int = 1, kwargs...)Compute the pairwise distance correlation matrix for all columns in a data matrix using a configured DistanceCovariance estimator.
Statistics.cov(ce::DistanceCovariance, X::MatNum; dims::Int = 1, kwargs...)Compute the pairwise distance covariance matrix for all columns in a data matrix using a configured DistanceCovariance estimator.
Statistics.cor(ce::LowerTailDependenceCovariance, X::MatNum; dims::Int = 1, kwargs...)Compute the lower tail dependence correlation matrix using a LowerTailDependenceCovariance estimator.
Statistics.cor(::KendallCovariance, X::MatNum; dims::Int = 1, kwargs...)Compute the Kendall's tau rank correlation matrix using a KendallCovariance estimator.
Statistics.cor(::SpearmanCovariance, X::MatNum; dims::Int = 1, kwargs...)Compute the Spearman's rho rank correlation matrix using a SpearmanCovariance estimator.
Statistics.cor(ce::MutualInfoCovariance, X::MatNum; dims::Int = 1, kwargs...)Compute the mutual information (MI) correlation matrix using a MutualInfoCovariance estimator.
Statistics.cor(ce::PortfolioOptimisersCovariance, X::MatNum; dims = 1,
active_mask::Option{<:AbstractMatrix{<:Bool}} = nothing, kwargs...)Compute the correlation matrix with post-processing using a PortfolioOptimisersCovariance estimator.
Statistics.cov(ce::PortfolioOptimisersCovariance, X::MatNum; dims = 1,
active_mask::Option{<:AbstractMatrix{<:Bool}} = nothing, kwargs...)Compute the covariance matrix with post-processing using a PortfolioOptimisersCovariance estimator.
Statistics.cor(ce::ImpliedVolatility, X::MatNum; dims::Int = 1, mean = nothing,
iv::MatNum, ivpa::Option{<:Num_VecNum} = nothing, kwargs...)Compute the correlation matrix using implied volatility scaling.
Statistics.cov(ce::ImpliedVolatility, X::MatNum; dims::Int = 1, mean = nothing,
iv::MatNum, ivpa::Option{<:Num_VecNum} = nothing, kwargs...)Compute the covariance matrix using implied volatility scaling.
Statistics.cor(ce::CorrelationCovariance, X::MatNum; dims::Int = 1,
kwargs...)Compute the correlation matrix using the underlying estimator.
Statistics.cov(ce::CorrelationCovariance, X::MatNum; dims::Int = 1,
kwargs...)Compute the correlation matrix using the underlying estimator.
Statistics.cor(ce::WindowedCovariance, X::MatNum; dims::Int = 1, mean = nothing, iv::Option{<:MatNum} = nothing, kwargs...)Compute Statistics.cor over a rolling or indexed observation window (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 observation window (matrix input).
Statistics.std(ve::WindowedVariance, X::MatNum; dims::Int = 1, mean = nothing, iv::Option{<:MatNum} = nothing, kwargs...)Compute Statistics.std over a rolling or indexed observation window (matrix input).
Statistics.std(ve::WindowedVariance, X::VecNum; mean = nothing)Compute Statistics.std over a rolling or indexed observation window (vector input).
Statistics.var(ve::WindowedVariance, X::MatNum; dims::Int = 1, mean = nothing, iv::Option{<:MatNum} = nothing, kwargs...)Compute Statistics.var over a rolling or indexed observation window (matrix input).
Statistics.var(ve::WindowedVariance, X::VecNum; mean = nothing)Compute Statistics.var over a rolling or indexed observation window (vector input).
Statistics.std(
ce::ExpWeightedVariance,
X::MatNum;
dims::Int = 1,
active_mask::Option{<:AbstractMatrix{<:Bool}} = nothing,
kwargs...
) -> Vector{<:Number}Compute the exponentially weighted volatility of each asset.
Statistics.std(ce::ExpWeightedVariance, state::ExpWeightedVarianceState; kwargs...) -> Vector{<:Number}Read the exponentially weighted volatility out of a state the caller holds.
Statistics.var(
ce::ExpWeightedVariance,
X::MatNum;
dims::Int = 1,
active_mask::Option{<:AbstractMatrix{<:Bool}} = nothing,
kwargs...
) -> Vector{<:Number}Compute the exponentially weighted variance of each asset.
Statistics.var(ce::ExpWeightedVariance, state::ExpWeightedVarianceState; kwargs...) -> Vector{<:Number}Read the exponentially weighted variance out of a state the caller holds.
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 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 the caller holds.
Statistics.std(
ce::RegimeAdjustedExpWeightedVariance,
X::MatNum;
dims::Int = 1,
estimation_mask::Option{<:AbstractMatrix{<:Bool}} = nothing,
active_mask::Option{<:AbstractMatrix{<:Bool}} = nothing,
kwargs...
) -> Vector{<:Number}Compute the regime-adjusted exponentially weighted standard deviation for each asset.
Statistics.std(
ce::RegimeAdjustedExpWeightedVariance,
state::RegimeAdjustedVarianceState;
kwargs...
) -> Vector{<:Number}Read the regime-adjusted standard deviation out of a state held by hand.
Statistics.var(
ce::RegimeAdjustedExpWeightedVariance,
X::MatNum;
dims::Int = 1,
estimation_mask::Option{<:AbstractMatrix{<:Bool}} = nothing,
active_mask::Option{<:AbstractMatrix{<:Bool}} = nothing,
kwargs...
) -> Vector{<:Number}Compute the regime-adjusted exponentially weighted variance for each asset.
Statistics.var(
ce::RegimeAdjustedExpWeightedVariance,
state::RegimeAdjustedVarianceState;
kwargs...
) -> Vector{<:Number}Read the regime-adjusted variance out of a state held by hand.
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.