Near optimal centering (b)

PortfolioOptimisers._optimise — Function
_optimise(noc::NearOptimalCentering, rd::ReturnsResult = ReturnsResult();
          str_names::Bool = false, save::Bool = true, blocks::Tuple = (),
          kwargs...) -> NearOptimalCenteringResult

Build the model of a NearOptimalCentering, solve it, and return its result.

optimise reaches this method through shared_series_solve, which drops the observations of a Shared Series gap before the solve.

Algorithm

  1. Replace each schedule of noc with its static default through reset_time_dependent_estimator.
  2. Solve the anchor portfolios and find the bounds of the near optimal region with near_optimal_centering_setup, with the blocks of blocks, giving setup. It holds the anchor weights, their return codes, the inner optimiser opt and its resolved bundle attrs.
  3. Take the view of noc and of rd at the investable assets with investable_view. Both are unchanged when every asset is investable.
  4. Build a new model. Register the scales of opt with set_model_scales!, the number of observations of the prior with set_model_observations!, the expression k = 1 with set_maximum_ratio_factor_variables!, and the weights with set_w!. The weights start at the optimal anchor when w_opt is one weight vector. A vector of anchors, of a sweep, sets no start value.
  5. Add the rows of the variant noc.alg with assemble_near_optimal_centering_model!.
  6. Solve the barrier with solve_near_optimal_centering!, giving noc_retcode and sol.
  7. Combine the return codes of the three anchors and of the barrier with get_overall_retcode, giving retcode.
  8. Build the result. It holds attrs, retcode, sol, the model when save is true, the risk measures resolved against the prior, and the four return codes.

Arguments

  • noc::NearOptimalCentering: The optimiser.
  • rd: The returns result to use. When noc.opt.pe is a prior result, the solve does not read rd. A fallback or a clustering step can still read it.
  • str_names::Bool: true gives each variable and each row of the model its string name.
  • save::Bool: true keeps the model in the result.
  • blocks::Tuple = (): The blocks after the block of the optimiser of the head, the keyword blocks of resolve_jump_optimiser. The head adds the rows of every block to its model with assemble_jump_model!. The fallback chain of optimise passes the keyword to each member, so a fallback solves on the same blocks.
  • kwargs...: Passed on to near_optimal_centering_setup.

Returns

Related

source