Prediction weights: private API
PortfolioOptimisers.fold_label — Function
fold_label(ts::Nothing, k::Integer)
fold_label(ts::AbstractVector, k::Integer)The label of fold k of a path: the first timestamp of the fold, or "fold k" when the fold carries no timestamps.
Arguments
ts: The timestamps of the fold, ornothing.k: The position of the fold in the path.
Returns
label::String: The label.
Related
PortfolioOptimisers.prediction_members — Function
prediction_members(pred::PredictionResult)
prediction_members(pred::MultiPeriodPredictionResult)
prediction_members(ppred::PopulationPredictionResult)The number of members of a prediction: the number of portfolios that its optimiser gives at each fold.
An optimiser that gives one portfolio has one member. An optimiser that gives many portfolios, such as a frontier, holds one weight vector for each member. The folds of a path and the paths of a population come from one optimiser, so the first fold gives the count.
Arguments
pred,ppred: The prediction result.
Validation
- A population holds at least one path. Otherwise the function raises an
IsEmptyError.
Returns
n::Int: The number of members.
Related