Turnover: private API
PortfolioOptimisers.TnE_Tn — Type
const TnE_Tn = Union{Turnover, TurnoverEstimator}One turnover constraint, before or after the resolution of its names. Both types have the fields w, val and fixed, and factory, port_opt_view and needs_previous_weights read these fields on either type. The two types differ only in val. A Turnover holds one bound per asset, and a TurnoverEstimator can hold the bounds by name.
Related
TurnoverTurnoverEstimatorturnover_constraints: resolves aTurnoverEstimatorto aTurnover.FeesEstimator: holds one of these in itstnfield.
PortfolioOptimisers.VecTnE_Tn — Type
const VecTnE_Tn = AbstractVector{<:TnE_Tn}Vector of TnE_Tn. The vector methods of this file dispatch on it, because a model can hold more than one turnover constraint. A vector can hold both types. So the methods that build a new vector pass it through concrete_typed_array_if_abstract, which narrows its element type from an abstract type to a Union of the two types.
Related
PortfolioOptimisers.VecTn — Type
const VecTn = AbstractVector{<:Turnover}Vector of Turnover, with no TurnoverEstimator. It is the subset of VecTnE_Tn after the resolution of the names. The vector method of turnover_constraints returns it, so a method that dispatches on it reads val as one value per asset.
Related
PortfolioOptimisers.Tn_VecTn — Type
const Tn_VecTn = Union{Turnover, VecTn}One resolved turnover constraint, or a vector of them. ResolvedJuMPOptimiser holds this type after the resolution of the names, and set_turnover_constraints! reads it. A method that dispatches on it never receives a TurnoverEstimator.
Related
TurnoverVecTnTnE_Tn_VecTnE_Tn: the unresolved counterpart, which the optimiser accepts from the caller.set_turnover_constraints!
PortfolioOptimisers.TnE_Tn_VecTnE_Tn — Type
const TnE_Tn_VecTnE_Tn = Union{TnE_Tn, VecTnE_Tn}One turnover constraint or estimator, or a vector of them. It is the widest turnover alias. The tn keyword of JuMPOptimiser and of ProgrammeAllocationSet accepts it, because a caller can give either type, and one entry or a vector. turnover_constraints resolves each case of it to a Tn_VecTn.
Related
TnE_TnVecTnE_TnTurnoverTurnoverEstimatorTn_VecTn: what this narrows to once the names are resolved.turnover_constraints