Network Estimator: private API
PortfolioOptimisers.AbstractNetworkEstimator — Type
abstract type AbstractNetworkEstimator <: AbstractPhylogenyEstimatorAbstract supertype for all network estimator types.
All concrete and/or abstract types implementing network-based estimation algorithms should be subtypes of AbstractNetworkEstimator.
Related
References
- [5] D. Cajas. Advanced Portfolio Optimization: A Cutting-edge Quantitative Approach (Springer Nature Switzerland, 2025). Section 13.1.
PortfolioOptimisers.NwE_Pl_ClE_Cl — Type
const NwE_Pl_ClE_Cl = Union{<:AbstractNetworkEstimator, <:PhylogenyResult, <:ClE_Cl}Alias for a network estimator, phylogeny result, or clustering estimator/result.
Used internally for dispatch in phylogeny and network estimation workflows that accept any of these forms.
Related
PortfolioOptimisers.NwE_ClE — Type
const NwE_ClE = Union{<:AbstractNetworkEstimator, <:AbstractClustersEstimator}Alias for a phylogeny source: a network estimator or a clustering estimator, and nothing precomputed.
This is the bound of the pl slot on SemiDefinitePhylogenyEstimator and IntegerPhylogenyEstimator, and the exclusion is the point. A constraint estimator answers "how do I build this constraint for whatever universe I am given"; a precomputed PhylogenyResult or Clusters in that slot answers a different question — "here is the answer for the universe I was built on" — and the two are only interchangeable while the universe never changes.
They stopped being interchangeable the moment a meta-optimiser handed a subproblem a subset of the assets. phylogeny_matrix returns a precomputed result unchanged, so the estimator emitted a full-universe constraint matrix for a three-asset subproblem, and every guard aimed at precomputed constraints missed it because the object presented as an estimator. The exclusion therefore lives in the type: the shape is not constructible, so there is no runtime check to write, to forget, or to route around. The only runtime guard left on this path is assert_external_optimiser, which now has just one remaining case to catch — a precomputed constraint result.
Precomputed structure has a home already: build the constraint once and pass the result — SemiDefinitePhylogeny or IntegerPhylogeny, whose A field takes a PhylogenyResult or a bare matrix — which is exactly what phylogeny_constraints(est, X) returns. Nothing is lost, and the guards that exist for results then apply.
Related
PortfolioOptimisers.NwE_ClE_Cl — Type
const NwE_ClE_Cl = Union{<:AbstractNetworkEstimator, <:ClE_Cl}Alias for a network estimator or clustering estimator/result.
Used for dispatch in phylogeny workflows that accept either a network estimator or a clustering estimator/result.
Related
References
- [5]
- D. Cajas. Advanced Portfolio Optimization: A Cutting-edge Quantitative Approach (Springer Nature Switzerland, 2025).