Skip to content
11

PortfolioOptimisersCovariance

PortfolioOptimisers.PortfolioOptimisersCovariance Type
julia
struct 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.

Fields

  • ce: The underlying covariance estimator.

  • mp: Matrix post-processing estimator.

Constructor

julia
PortfolioOptimisersCovariance(; ce::AbstractCovarianceEstimator = Covariance(),
                              mp::AbstractMatrixProcessingEstimator = DenoiseDetoneAlgMatrixProcessing())

Keyword arguments correspond to the fields above.

Examples

julia
julia> PortfolioOptimisersCovariance()
PortfolioOptimisersCovariance
  ce ┼ Covariance
     │    me ┼ SimpleExpectedReturns
     │       │     w ┼ nothing
     │       │   idx ┴ nothing
     │    ce ┼ GeneralCovariance
     │       │    ce ┼ StatsBase.SimpleCovariance: StatsBase.SimpleCovariance(true)
     │       │     w ┼ nothing
     │       │   idx ┴ nothing
     │   alg ┴ Full()
  mp ┼ DenoiseDetoneAlgMatrixProcessing
     │     pdm ┼ Posdef
     │         │      alg ┼ UnionAll: NearestCorrelationMatrix.Newton
     │         │   kwargs ┴ @NamedTuple{}: NamedTuple()
     │      dn ┼ nothing
     │      dt ┼ nothing
     │     alg ┼ nothing
     │   order ┴ DenoiseDetoneAlg()

Related

source
Statistics.cov Method
julia
Statistics.cov(ce::PortfolioOptimisersCovariance, X::MatNum; 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.

Arguments

  • ce: Composite covariance estimator with post-processing.

  • X: Data matrix of asset returns (observations × assets).

  • dims: Dimensions along which to perform the computation.

  • kwargs...: Additional keyword arguments passed to the underlying covariance estimator and matrix processing step.

Returns

  • sigma::Matrix{<:Number}: The processed covariance matrix.

Validation

  • dims is either 1 or 2.

Related

source
Statistics.cor Method
julia
Statistics.cor(ce::PortfolioOptimisersCovariance, X::MatNum; 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.

Arguments

  • ce: Composite covariance estimator with post-processing.

  • X: Data matrix of asset returns (observations × assets).

  • dims: Dimensions along which to perform the computation.

  • kwargs...: Additional keyword arguments passed to the underlying covariance estimator and matrix processing step.

Returns

  • rho::Matrix{<:Number}: The processed correlation matrix.

Validation

  • dims is either 1 or 2.

Related

source