Network Estimator: private API

PortfolioOptimisers.AbstractNetworkEstimatorType
abstract type AbstractNetworkEstimator <: AbstractPhylogenyEstimator

Abstract 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.
source
PortfolioOptimisers.NwE_ClEType
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 resultSemiDefinitePhylogeny 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

source

References

[5]
D. Cajas. Advanced Portfolio Optimization: A Cutting-edge Quantitative Approach (Springer Nature Switzerland, 2025).