Skip to content
13

Meta optimisation

PortfolioOptimisers.outer_optimisation_finaliser Function
julia
outer_optimisation_finaliser(wb, wf, w_inner, w_outer)

Finalise outer optimisation weights for the NCO algorithm.

Combines inner cluster weights w_inner with outer portfolio weights w_outer, applying weight bounds wb and finalisation algorithm wf.

Arguments

  • wb: Weight bounds (optional).

  • wf: Weight finaliser.

  • w_inner: Inner (within-cluster) weights.

  • w_outer: Outer (across-cluster) weights.

Returns

  • Final combined portfolio weights.

Related

source
PortfolioOptimisers.prepare_outer_rd Function
julia
prepare_outer_rd(
    rd::ReturnsResult,
    wi::AbstractMatrix{<:Union{var"#s20", var"#s19"} where {var"#s20"<:Number, var"#s19"<:AbstractJuMPScalar}}
) -> Tuple{Any, Any, Any, Any, Matrix}

Prepares the ReturnsResult for outer optimisation, applying the inner cluster weights wi to the returns matrix rd.B, and adjusting the independent variable matrices rd.iv and rd.ivpa accordingly.

Arguments

  • rd: ReturnsResult containing the returns data.

  • wi: Inner weights matrix.

Returns

  • nb: New names for the benchmark returns columns after applying inner weights (if rd.B is a matrix).

  • B: Adjusted benchmarkreturns matrix after applying inner weights (if rd.B is a matrix).

  • iv: Adjusted independent variable matrix (if present).

  • ivpa: Adjusted independent variable per asset matrix (if present).

  • X: Buffer for the outer returns matrix.

Related

source
PortfolioOptimisers.rebuild_returns_result Function
julia
rebuild_returns_result(rd, predictions)

Reconstruct a returns result from cross-validation predictions.

Combines individual fold predictions from predictions into a new ReturnsResult corresponding to the original data layout.

Arguments

Returns

Related

source