Class DeltaHedger

java.lang.Object
com.quantfinlib.hedging.DeltaHedger

public final class DeltaHedger extends Object
Dynamic delta hedging simulator: sell an option, then replicate it by trading the underlying along a price path, rebalancing whenever the delta drifts outside a band. Quantifies the trade-off every option desk lives with — tighter bands mean smaller replication error but more transaction costs.

The final P&L is the hedging error: zero in the Black-Scholes limit of continuous, costless rebalancing at the true volatility; in practice it spreads with rebalancing interval, transaction costs, and the gap between implied and realized volatility.

  • Method Details

    • simulateShortOption

      public static DeltaHedger.HedgeReport simulateShortOption(BlackScholes.OptionType type, double strike, double expiryYears, double rate, double carry, double hedgeVol, double[] path, double dtYears, DeltaHedger.Config config)
      Simulates a short option delta-hedged along the given path.
      Parameters:
      expiryYears - option expiry; should equal (path.length-1) * dtYears
      hedgeVol - volatility used for pricing and hedging (implied vol)
      path - underlying prices; path[0] at inception, path[n-1] at expiry
      dtYears - time between path points (e.g. 1/252 for daily)