Class WhalleyWilmott
java.lang.Object
com.quantfinlib.hedging.WhalleyWilmott
Whalley-Wilmott optimal hedge bands — the answer to the question
every band hedger otherwise guesses: how wide should the no-trade
band around delta be? Hedging continuously is bankruptcy by
transaction costs; hedging never is a naked option. The asymptotic
optimum (Whalley & Wilmott 1997, small proportional costs) puts the
half-width at
band = ( (3/2) · e^{−r(T−t)} · k · S · Γ² / λ )^{1/3}
(Whalley and Wilmott 1997, Mathematical Finance 7(3) 307-324; the
discount factor appears because costs paid today are compared with a
terminal-wealth utility). Units: k is a fraction of traded
notional, S and Γ are per share, and λ is the
exponential-utility risk aversion in 1/currency (utility
−e^{−λ·W}), so λ·S is dimensionless. A λ of 1 means a one
currency unit change in wealth is already material; for a book measured
in dollars a realistic λ is of order 1/(capital at risk), e.g. 1e-6.
— wider when trading is expensive (k, the proportional cost) and
when gamma churns the delta (Γ²), narrower when you are more risk
averse (λ). The cube root is the interesting part: costs must move
by 8x to move the band by 2x, which is why band width is remarkably
stable across venues.
The policy is as important as the width: when the hedge drifts outside the band, trade back to the nearest edge, not to the center — hedging to delta itself throws away the band's whole point (you would pay the spread again on the next tick's drift). Zero gamma degenerates cleanly: zero band, always hedge exactly to delta.
Pairs with the band executors: trading.AutoHedger and
crb.CrbAutoHedger take a band as configuration — this class
is where that number should come from. Asymptotic result: for very
large costs or tiny risk aversion the expansion degrades (stated,
not hidden). Static, deterministic, research lane.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordThe rebalancing decision: trade (to the nearest edge) or hold. -
Method Summary
Modifier and TypeMethodDescriptionstatic doublebandHalfWidth(double spot, double gamma, double costRate, double riskAversion) The optimal no-trade half-width around delta with zero discounting (r·(T−t) = 0); seebandHalfWidth(double, double, double, double, double, double).static doublebandHalfWidth(double spot, double gamma, double costRate, double riskAversion, double rate, double timeToExpiry) The optimal no-trade half-width around delta, in shares.static WhalleyWilmott.Actionrebalance(double currentHedge, double delta, double bandHalfWidth) The hedge-to-the-edge policy: hold inside the band, trade to the nearest edge outside it.
-
Method Details
-
bandHalfWidth
public static double bandHalfWidth(double spot, double gamma, double costRate, double riskAversion) The optimal no-trade half-width around delta with zero discounting (r·(T−t) = 0); seebandHalfWidth(double, double, double, double, double, double). -
bandHalfWidth
public static double bandHalfWidth(double spot, double gamma, double costRate, double riskAversion, double rate, double timeToExpiry) The optimal no-trade half-width around delta, in shares.- Parameters:
spot- underlying price, > 0gamma- book gamma per share (signed; only |Γ| matters), finitecostRate- proportional transaction cost k (e.g. 0.0005 = 5 bps), > 0riskAversion- λ > 0 in 1/currency (bigger = tighter hedging)rate- continuously compounded rate r, finitetimeToExpiry- T − t in years, ≥ 0
-
rebalance
public static WhalleyWilmott.Action rebalance(double currentHedge, double delta, double bandHalfWidth) The hedge-to-the-edge policy: hold inside the band, trade to the nearest edge outside it.- Parameters:
currentHedge- the position currently held against the bookdelta- the book's current delta (the band's center)bandHalfWidth- frombandHalfWidth(double, double, double, double), ≥ 0
-