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},
) -> PortfolioOptimisersCovarianceConvenience constructor. Returns a PortfolioOptimisersCovariance configured to apply positive definite projection then detoning, in that order, via MatrixProcessing.
detone! in src/04_MatrixProcessing/03_Detone.jl states the mathematics of the detoning step, and posdef! in src/04_MatrixProcessing/01_PosdefMatrix.jl that of the projection.
Algorithm
- Build a
MatrixProcessingfrompdmanddt, withorder = (:pdm, :dt). - Return a
PortfolioOptimisersCovariancecarryingceand that estimator.
order is what fixes the composition: Statistics.cov runs ce first, then projects the matrix onto the positive definite cone, and detones last. A caller who needs the reverse order builds the MatrixProcessing itself.
Arguments
ce: Covariance estimator.dt: Matrix detoning estimator.pdm: Optional positive definite matrix estimator.
Returns
ce::PortfolioOptimisersCovariance: Composite estimator that detones the matrixcecomputes.
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