PortfolioOptimisersCovariance
PortfolioOptimisers.PortfolioOptimisersCovariance
— Typestruct PortfolioOptimisersCovariance{T1, T2} <: AbstractCovarianceEstimator
ce::T1
mp::T2
end
Composite covariance estimator with post-processing.
PortfolioOptimisersCovariance
is a flexible container type that combines any covariance estimator with a matrix post-processing step. This enables users to apply additional transformations or corrections (such as shrinkage, regularisation, or projection to positive definite) to the covariance or correlation matrix after it is estimated.
Fields
ce
: The underlying covariance estimator.mp
: Matrix post-processing estimator.
Constructor
PortfolioOptimisersCovariance(; ce::AbstractCovarianceEstimator = Covariance(),
mp::AbstractMatrixProcessingEstimator = DefaultMatrixProcessing())
Keyword arguments correspond to the fields above.
Examples
julia> ce = PortfolioOptimisersCovariance()
PortfolioOptimisersCovariance
ce | Covariance
| me | SimpleExpectedReturns
| | w | nothing
| ce | GeneralWeightedCovariance
| | ce | StatsBase.SimpleCovariance: StatsBase.SimpleCovariance(true)
| | w | nothing
| alg | Full()
mp | DefaultMatrixProcessing
| pdm | Posdef
| | alg | UnionAll: NearestCorrelationMatrix.Newton
| denoise | nothing
| detone | nothing
| alg | nothing
Related
Statistics.cov
— Methodcov(ce::PortfolioOptimisersCovariance, X::AbstractMatrix; dims = 1, kwargs...)
Compute the covariance matrix with post-processing using a PortfolioOptimisersCovariance
estimator.
This method computes the covariance matrix for the input data matrix X
using the underlying covariance estimator in ce
, and then applies the matrix post-processing step specified by ce.mp
. This enables workflows such as shrinkage, regularisation, or projection to positive definite after covariance estimation.
Arguments
ce
: Composite covariance estimator with post-processing.X
: Data matrix of asset returns (observations × assets).dims
: Dimension along which to compute the covariance (1 = columns/assets, 2 = rows). Default is1
.kwargs...
: Additional keyword arguments passed to the underlying covariance estimator and matrix processing step.
Returns
sigma::Matrix{<:Real}
: The processed covariance matrix.
Validation
dims
is either1
or2
.
Related
Statistics.cor
— Methodcor(ce::PortfolioOptimisersCovariance, X::AbstractMatrix; dims = 1, kwargs...)
Compute the correlation matrix with post-processing using a PortfolioOptimisersCovariance
estimator.
This method computes the correlation matrix for the input data matrix X
using the underlying covariance estimator in ce
, and then applies the matrix post-processing step specified by ce.mp
. This enables workflows such as shrinkage, regularisation, or projection to positive definite after correlation estimation.
Arguments
ce
: Composite covariance estimator with post-processing.X
: Data matrix of asset returns (observations × assets).dims
: Dimension along which to compute the correlation (1 = columns/assets, 2 = rows). Default is1
.kwargs...
: Additional keyword arguments passed to the underlying covariance estimator and matrix processing step.
Returns
rho::Matrix{<:Real}
: The processed correlation matrix.
Validation
dims
is either1
or2
.
Related