Denoise covariance
PortfolioOptimisers.DenoiseCovariance — Function
DenoiseCovariance(;
ce::StatsBase.CovarianceEstimator = Covariance(),
dn::AbstractDenoiseEstimator = Denoise(),
pdm::Option{<:AbstractPosdefEstimator} = Posdef(),
) -> PortfolioOptimisersCovariance
DenoiseCovariance(
ce::StatsBase.CovarianceEstimator,
dn::AbstractDenoiseEstimator,
pdm::Option{<:AbstractPosdefEstimator},
) -> PortfolioOptimisersCovarianceReturns a PortfolioOptimisersCovariance that projects the covariance matrix to the positive definite cone and then denoises it. A MatrixProcessing applies the two steps in that order.
denoise! in src/04_MatrixProcessing/02_Denoise.jl states the mathematics of the denoising step. posdef! in src/04_MatrixProcessing/01_PosdefMatrix.jl states the mathematics of the projection.
Algorithm
- Build a
MatrixProcessingfrompdmanddn, withorder = (:pdm, :dn). - Return a
PortfolioOptimisersCovariancethat holdsceand 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 denoises the matrix last. For the reverse order, build the MatrixProcessing directly.
Arguments
ce: Covariance estimator.dn: Matrix denoising estimator.pdm: Optional positive definite matrix estimator.
Returns
ce::PortfolioOptimisersCovariance: The composite estimator that denoises the matrix thatcecomputes.
Examples
julia> DenoiseCovariance()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 ┼ Denoise │ │ pdm ┼ Posdef │ │ │ alg ┼ UnionAll: NearestCorrelationMatrix.Newton │ │ │ kwargs ┴ @NamedTuple{}: NamedTuple() │ │ alg ┼ ShrunkDenoise │ │ │ alpha ┴ Float64: 0.0 │ │ args ┼ Tuple{}: () │ │ kwargs ┼ @NamedTuple{}: NamedTuple() │ │ kernel ┼ typeof(AverageShiftedHistograms.Kernels.gaussian): AverageShiftedHistograms.Kernels.gaussian │ │ m ┼ Int64: 10 │ │ n ┴ Int64: 1000 │ dt ┼ nothing │ alg ┼ nothing │ order ┴ Tuple{Symbol, Symbol}: (:pdm, :dn)Related