Threshold Constraints: private API
PortfolioOptimisers.BtE_Bt — Type
const BtE_Bt = Union{<:Threshold, <:ThresholdEstimator}Alias for a threshold constraint result or estimator.
Matches either a Threshold result or a ThresholdEstimator. Used internally for dispatch in threshold constraint generation.
The group exists because a caller writes a threshold in either form and an optimiser field must take both: a resolved Threshold needs no universe, and a ThresholdEstimator resolves against one. threshold_constraints is the seam that maps the second onto the first, so a field typed on this alias accepts either and reaches a Threshold in one call. It admits neither nothing nor a vector; VecOptBtE_Bt and BtE_Bt_VecOptBtE_Bt widen it in those two directions.
Related
ThresholdThresholdEstimatorthreshold_constraintsRkbE_Rkb: the risk budget family's counterpart, which has no vector arm.
PortfolioOptimisers.VecOptBtE_Bt — Type
const VecOptBtE_Bt = AbstractVector{<:Option{<:BtE_Bt}}Alias for a vector of optional threshold estimators or results.
Represents a collection of optional BtE_Bt elements (threshold estimators or results, or nothing).
The group exists because the threshold's routing targets are positional lists. :slt, :sst, :sglt and :sgst are in the set of targets that accumulate, and entry i of such a list belongs to scenario or group block i, paired with scard or sgcarde. A block with no threshold is written as nothing rather than dropped, because dropping it would move every later block by one. That is why the element type is optional and why threshold_constraints carries a method for this alias, while RkbE_Rkb needs neither.
Related
BtE_BtBtE_Bt_VecOptBtE_Btthreshold_constraints: the method that broadcasts over this alias and returns aVecOptBt.
PortfolioOptimisers.BtE_Bt_VecOptBtE_Bt — Type
const BtE_Bt_VecOptBtE_Bt = Union{<:BtE_Bt, <:VecOptBtE_Bt}Alias for a single or vector of optional threshold estimators or results.
Matches either a single BtE_Bt or a vector of optional ones.
The group exists because one optimiser field takes both shapes. The plain targets :lt and :st hold one threshold over the whole universe, and the scenario targets :slt, :sst, :sglt and :sgst hold one per block, so a field typed on this alias accepts either mandate without a second field. It is the type an optimiser keyword is written against, and threshold_constraints has a method for each of its two arms.
Related
PortfolioOptimisers.VecOptBt — Type
const VecOptBt = AbstractVector{<:Option{<:Threshold}}Alias for a vector of optional threshold results.
Represents a collection of optional Threshold elements.
The group exists to name the resolved half of VecOptBtE_Bt. It is what threshold_constraints's broadcast method returns, and what the mixed-integer builders read: they index the list by block and expect a resolved value or nothing at each entry, never an estimator. Separating the two lets a builder's signature refuse an unresolved list rather than resolve one late.
Related
ThresholdBt_VecOptBtVecOptBtE_Bt: the unresolved counterpart thatthreshold_constraintsmaps onto this one.
PortfolioOptimisers.Bt_VecOptBt — Type
const Bt_VecOptBt = Union{<:Threshold, <:VecOptBt}Alias for a single threshold result or a vector of optional threshold results.
Matches either a single Threshold or a vector of optional Threshold objects.
The group exists as the resolved counterpart of BtE_Bt_VecOptBtE_Bt. A mixed-integer builder takes one threshold over the whole universe or one per scenario block, and this alias is the pair of shapes it accepts after resolution. It admits no estimator, which is what makes a builder's signature state that resolution has already happened.
Related
ThresholdVecOptBtBtE_Bt_VecOptBtE_Bt: the unresolved counterpart.