Compact Radius Rules: private API

PortfolioOptimisers.compact_reference_weights — Function
compact_reference_weights(::Nothing, N::Integer, ::Any, ::Type{E}) where {E}
compact_reference_weights(w0::VecNum, N::Integer, ::Any, ::Type)
compact_reference_weights(w0::NonFiniteAllocationOptimisationEstimator, N::Integer,
                          rd, ::Type)

Reference portfolio at which a VarianceFraction sizes its penalty.

Algorithm

  1. On nothing, return the equal-weight portfolio over the N assets of the span, in the element type E.
  2. On a vector, check that it has one entry per asset and return it.
  3. On an optimiser, run optimise on rd, check that the weights have one entry per asset, and return them. The optimiser carries its own solver, so the fit of the set passes it nothing.

Arguments

  • w0: The w0 field of the rule.
  • N: Number of assets of the span.
  • rd: Returns data of the fit, or nothing.
  • E: Element type of the geometry.

Validation

  • A stated vector has N entries, else a DimensionMismatch.
  • An optimiser meets a ReturnsResult, else an IsNothingError. A set fitted from a prior result alone has no returns data for the optimiser to run on.
  • The optimiser's weights have N entries, else a DimensionMismatch.

Returns

  • w0::VecNum: Reference portfolio of length N. A stated vector comes back unchanged.

Related

source