Class VannaVolga

java.lang.Object
com.quantfinlib.pricing.VannaVolga

public final class VannaVolga extends Object
Vanna-volga pricing: the FX desk's standard smile-consistent adjustment built from exactly three market pillars (in practice the 25Δ put, ATM and 25Δ call that fx.FxVolSurface solves from broker RR/BF quotes).

The idea: hedge the flat-vol Black-Scholes price's vega, vanna and volga with a portfolio of the three pillars; the market cost of that hedge is the smile adjustment. The classic log-strike weight form used here makes the construction exact at the pillars — pricing a pillar strike returns the pillar's own market vol — and interpolates smoothly between and beyond them:

   price(K) = BS(K; σ_atm) + Σᵢ wᵢ(K) · [BS(Kᵢ; σᵢ) − BS(Kᵢ; σ_atm)]
   w₁(K) = vega(K)/vega(K₁) · ln(K₂/K)·ln(K₃/K) / (ln(K₂/K₁)·ln(K₃/K₁))
 

(cyclic for w₂, w₃). impliedVol(double, double) inverts the adjusted price back through Black-Scholes, giving a full smile from three quotes — the standard method for consistent barrier/touch adjustments and broken-strike marks on FX desks. Conventions match BlackScholes: carry is the continuous yield (foreign rate for FX).

  • Constructor Summary

    Constructors
    Constructor
    Description
    VannaVolga(double[] strikes, double[] vols, double rate, double carry, double timeYears)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    impliedVol(double spot, double strike)
    Smile-consistent implied vol at any strike: the vanna-volga price inverted through Black-Scholes.
    static VannaVolga
    ofPillars(double[] strikes, double[] vols, double rate, double carry, double timeYears)
    Builds directly from a solved fx.FxVolSurface pillar (25Δ set).
    double
    price(BlackScholes.OptionType type, double spot, double strike)
    Smile-consistent price of a vanilla at any strike.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • VannaVolga

      public VannaVolga(double[] strikes, double[] vols, double rate, double carry, double timeYears)
      Parameters:
      strikes - three ascending pillar strikes (25Δput, ATM, 25Δcall)
      vols - their market vols; vols[1] is the ATM anchor
  • Method Details

    • ofPillars

      public static VannaVolga ofPillars(double[] strikes, double[] vols, double rate, double carry, double timeYears)
      Builds directly from a solved fx.FxVolSurface pillar (25Δ set).
    • price

      public double price(BlackScholes.OptionType type, double spot, double strike)
      Smile-consistent price of a vanilla at any strike.
    • impliedVol

      public double impliedVol(double spot, double strike)
      Smile-consistent implied vol at any strike: the vanna-volga price inverted through Black-Scholes. Pillar strikes recover their market vols exactly.