Meta optimisation
PortfolioOptimisers.outer_optimisation_finaliser Function
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
sourcePortfolioOptimisers.prepare_outer_rd Function
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 (ifrd.Bis a matrix).B: Adjusted benchmarkreturns matrix after applying inner weights (ifrd.Bis 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
sourcePortfolioOptimisers.rebuild_returns_result Function
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
rd: OriginalReturnsResult.predictions: Vector ofMultiPeriodPredictionResultobjects from cross-validation.
Returns
- Rebuilt
ReturnsResult.
Related
source