Skip to content

feat: methodology refinements (cap target/trigger split, float-factor rounding)#6

Merged
jayeshy14 merged 1 commit into
mainfrom
feat/methodology-refinements
Jun 17, 2026
Merged

feat: methodology refinements (cap target/trigger split, float-factor rounding)#6
jayeshy14 merged 1 commit into
mainfrom
feat/methodology-refinements

Conversation

@jayeshy14

Copy link
Copy Markdown
Owner

What

Two pure-computation refinements from the TradFi research (spec Sections 5.3 and 8.2).

Cap target/trigger split (MarketCapMethodology)

  • Renamed capWad to capTargetWad, the level getWeights caps to, and added capTriggerWad (default 30%, validated at or above the target; equal is allowed, which disables hysteresis).
  • WeightMath.applyCap is unchanged, with its proven invariants intact.
  • The trigger deliberately lives at the rebalance layer, not inside applyCap. The verified Nasdaq-100 behavior caps the target weight to the target (20%/40%) and uses the higher number (24%/48%) only as the actual-weight threshold that decides when to rebalance. So the methodology exposes capTriggerWad for the Stage 3 rebalancer to consume as the off-cycle rebalance condition. The spec's Section 5.3 wording, which had said to amend applyCap, is corrected.

Float-factor rounding (SupplyOracle)

  • _roundFactorWad applies CRSP's Effective Float Factor tiers (nearest 5% above 10% float, nearest 1% between 1 and 10%, nearest 0.1% below 1%) to the agreed median at commit time.
  • A float wiggle within a tier produces the same committed factor and therefore no weight movement; a nonzero factor never rounds to zero.

Scope reconciliation

The rank-by-full-market-cap, weight-by-float split is already satisfied by the multi-index decision: membership is admin-curated and the supply oracle never touches membership. The full-market-cap ranking only matters for an optional top-N reconstitution mode, which the reconstitution module will own. Packeting and the asymmetric buffer are reconstitution features, and the rule-based emergency reweight is a rebalancer feature, so all three are deferred to the stages that own them rather than built in the wrong place here.

Testing

Adds cap-defaults, trigger-validation, and float-rounding tests (in-tier no-op versus tier-crossing move, plus a fuzz invariant that the committed factor is always tier-aligned and nonzero), and updates two oracle tests where the 0.92 median now correctly snaps to the 0.90 tier. 86 tests pass.

… rounding)

Two pure-computation refinements from the TradFi research.

Cap target/trigger split (MarketCapMethodology):
- Rename capWad to capTargetWad (the level getWeights caps to) and add
  capTriggerWad (default 30%, validated at or above the target; equal disables
  hysteresis). WeightMath.applyCap is unchanged and keeps its proven invariants.
- The trigger deliberately lives at the rebalance layer, not inside applyCap:
  Nasdaq caps the target weight to the target and uses the higher number only
  as the actual-weight threshold that decides when to rebalance. The
  methodology exposes capTriggerWad for the Stage 3 rebalancer to consume.

Float-factor rounding (SupplyOracle):
- _roundFactorWad applies CRSP Effective Float Factor tiers (nearest 5% above
  10%, 1% between 1 and 10%, 0.1% below 1%) to the agreed median at commit, so
  a float wiggle within a tier produces the same committed factor and no weight
  movement. A nonzero factor never rounds to zero.

Rank-by-full-mcap/weight-by-float is already satisfied by the multi-index
decision (membership is admin-curated; the supply oracle never touches
membership). Packeting, the asymmetric buffer, and the rule-based emergency
reweight belong to the reconstitution and rebalancer stages and are deferred
to them.

Adds cap-defaults, trigger-validation, and float-rounding tests; updates two
oracle tests where the 0.92 median now snaps to the 0.90 tier. 86 tests pass.
@jayeshy14 jayeshy14 merged commit 59fd409 into main Jun 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant