Net delta aggregation and rebalance sizing for delta-neutral portfolios.
Callers supply position maps with exchange-reported deltas (e.g. Deribit SPM
delta_total for options). This module does not price options or compute Greeks.
API Functions
| Function | Arity | Description | Param Kinds |
|---|---|---|---|
rebalance_to_neutral | 1 | Compute the hedge leg needed to flatten net delta within a tolerance. | params: value |
net_delta | 1 | Aggregate signed delta exposure across spot, perp, and option positions. | positions: value |
Summary
Functions
Sum signed delta exposure across positions.
Return the hedge adjustment to bring net delta to ~0 within tolerance.
Types
@type position_kind() :: :spot | :perp | :option
@type position_side() :: :long | :short
Functions
Sum signed delta exposure across positions.
Option positions must include exchange-supplied :delta (not computed here).
Spot and perp positions use :delta when present; otherwise derive signed
exposure from :size or :notional and :side (default :long).
@spec rebalance_to_neutral(rebalance_params() | [position()]) :: rebalance_result()
Return the hedge adjustment to bring net delta to ~0 within tolerance.
When already within tolerance, :side is :none and :size is zero.
:signed_hedge is sized for DeltaCalc.Hedging.suggest_hedge_distribution/1.