numeraire.aggregate_assigned_portfolios#

numeraire.aggregate_assigned_portfolios(assignments: SortAssignments, returns: DataFrame, *, weights: DataFrame | None = None, direction: int = 1) SortResult[source]#

Aggregate frozen memberships into returns and the extreme-bin spread.

returns and weights are aligned to assignments.bins by labels. counts always records formation membership, including an assigned asset whose realized return is missing. Equal-weighted returns use the finite realized returns in a bin. Value-weighted returns use only names having both a finite return and a strictly positive finite weight; missing, zero, or negative weights are excluded, and a bin with no usable weight remains NaN rather than silently falling back to equal weighting.