HodlingIndexPool
- class HodlingIndexPool[source]
Bases:
IndexMarketCapPoolMarket-cap index pool that HODLs reserves between weight updates.
Unlike the base
IndexMarketCapPool, which allows continuous arbitrage-driven rebalancing at every timestep, this variant only permits trades during aweight_interpolation_periodwindow at the start of eachchunk_period. Outside that window the pool’s reserves are frozen (HODLed), so the portfolio drifts with market prices rather than being continuously rebalanced.Reserve calculations use the on-chain QuantAMM arbitrage mechanics (optimal-trade sifter with swap fees), matching what would happen on an actual G3M AMM deployment. The
do_tradesmask passed to the reserve calculator encodes which timesteps fall inside the active rebalancing window.Inherits weight calculation logic (market-cap weighting) from
IndexMarketCapPooland overridescalculate_reserves_with_feesandcalculate_reserves_zero_feesto implement the HODLing behaviour.See also
IndexMarketCapPoolContinuously-rebalanced base class.
TradHodlingIndexPoolOff-chain (CEX) variant with realistic trading costs instead of on-chain AMM mechanics.