Detone covariance

PortfolioOptimisers.DetoneCovariance — Function
DetoneCovariance(;
    ce::StatsBase.CovarianceEstimator = Covariance(),
    dt::AbstractDetoneEstimator = Detone(),
    pdm::Option{<:AbstractPosdefEstimator} = Posdef(),
) -> PortfolioOptimisersCovariance

DetoneCovariance(
    ce::StatsBase.CovarianceEstimator,
    dt::AbstractDetoneEstimator,
    pdm::Option{<:AbstractPosdefEstimator},
) -> PortfolioOptimisersCovariance

Returns a PortfolioOptimisersCovariance that projects the covariance matrix to the positive definite cone and then detones it. A MatrixProcessing applies the two steps in that order.

detone! in src/04_MatrixProcessing/03_Detone.jl states the mathematics of the detoning step. posdef! in src/04_MatrixProcessing/01_PosdefMatrix.jl states the mathematics of the projection.

Algorithm

  1. Build a MatrixProcessing from pdm and dt, with order = (:pdm, :dt).
  2. Return a PortfolioOptimisersCovariance that holds ce and that estimator.

The order field sets the composition. Statistics.cov runs ce first. Then it projects the matrix onto the positive definite cone, and it detones the matrix last. For the reverse order, build the MatrixProcessing directly.

Arguments

  • ce: Covariance estimator.
  • dt: Matrix detoning estimator.
  • pdm: Optional positive definite matrix estimator.

Returns

  • ce::PortfolioOptimisersCovariance: The composite estimator that detones the matrix that ce computes.

Examples

julia> DetoneCovariance()PortfolioOptimisersCovariance  ce ┼ Covariance     │    me ┼ SimpleExpectedReturns     │       │   w ┴ nothing     │    ce ┼ GeneralCovariance     │       │   ce ┼ StatsBase.SimpleCovariance: StatsBase.SimpleCovariance(true)     │       │    w ┴ nothing     │   alg ┼ FullMoment()     │     w ┴ nothing  mp ┼ MatrixProcessing     │     pdm ┼ Posdef     │         │      alg ┼ UnionAll: NearestCorrelationMatrix.Newton     │         │   kwargs ┴ @NamedTuple{}: NamedTuple()     │      dn ┼ nothing     │      dt ┼ Detone     │         │   pdm ┼ Posdef     │         │       │      alg ┼ UnionAll: NearestCorrelationMatrix.Newton     │         │       │   kwargs ┴ @NamedTuple{}: NamedTuple()     │         │     n ┴ Int64: 1     │     alg ┼ nothing     │   order ┴ Tuple{Symbol, Symbol}: (:pdm, :dt)

Related

source