Class SsviSurface

java.lang.Object
com.quantfinlib.pricing.SsviSurface
All Implemented Interfaces:
TotalVarianceSurface

public final class SsviSurface extends Object implements TotalVarianceSurface
Surface SVI (Gatheral and Jacquier 2014, "Arbitrage-free SVI volatility surfaces", Quantitative Finance 14(1), definition 4.1):
  w(k, θ_t) = θ_t / 2 · ( 1 + ρ φ(θ_t) k + √((φ(θ_t) k + ρ)² + 1 − ρ²) )

with θ_t the ATM total variance at expiry t and the power-law φ(θ) = η / (θ^γ (1 + θ)^{1−γ}) (their equation 4.5).

No-arbitrage. Theorem 4.1: the surface is free of calendar arbitrage iff θ_t is non-decreasing in t and 0 ≤ ∂_θ(θφ) ≤ φ(1+√(1−ρ²))/ρ². For the power law ∂_θ(θφ) = η(1−γ)θ^{−γ}(1+θ)^{γ−2}, which satisfies both bounds for γ ∈ [0, 1]. Theorem 4.2: the surface is free of butterfly arbitrage if θφ(1+|ρ|) < 4 and θφ²(1+|ρ|) ≤ 4 for all θ. With γ ∈ [0, 1/2] one has θφ < η and θφ² ≤ η², so the condition η(1+|ρ|) ≤ 2 (their remark 4.4) gives both. The constructor enforces γ ∈ [0, 1/2] and η(1+|ρ|) ≤ 2, so every instance is free of static arbitrage for any non-decreasing θ_t.

Interpolation in time is linear in θ between pillar expiries (so calendar-arbitrage-free by theorem 4.1), proportional to t before the first pillar (θ_0 = 0) and extended with the last segment's slope after the last pillar. Log-moneyness is against F(t) = S e^{(r−q)t}.

η = 0 gives a flat smile w = θ_t: with θ_t = σ²t that is the Black-Scholes surface. Immutable.

  • Constructor Summary

    Constructors
    Constructor
    Description
    SsviSurface(double rho, double eta, double gamma, double[] expiries, double[] thetas, double spot, double rate, double carry)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    calibrate(double spot, double rate, double carry, double[] expiries, double[][] strikes, double[][] vols, double[][] weights)
    Calibrates ρ, η and γ to implied vol quotes, by Levenberg-Marquardt on weighted total-variance residuals in a reparametrisation that enforces the constructor's no-arbitrage bounds. θ at each expiry is the market ATM total variance: linear interpolation of quoted total variance in log-moneyness at k = 0 (nearest quote if k = 0 is not bracketed), then made non-decreasing by a running maximum.
    double
    Continuous carry yield (dividend yield, or foreign rate for FX).
    double
    eta()
     
    double
    expiry(int i)
     
    int
     
    double
     
    double
    phi(double theta)
    Power-law φ(θ) = η / (θ^γ (1+θ)^{1−γ}).
    double
    Continuously compounded risk-free rate.
    double
    rho()
     
    slice(double t)
    The raw SVI slice equal to this surface at expiry t (Gatheral-Jacquier 2014, section 4): a = θ(1−ρ²)/2, b = θφ/2, m = −ρ/φ, σ = √(1−ρ²)/φ.
    double
    Spot price.
    double
    theta(int i)
    ATM total variance at pillar i.
    double
    thetaAt(double t)
    ATM total variance θ_t at any t > 0, interpolated as described in the class note.
    double
    totalVariance(double t, double k)
    Total implied variance at expiry t (years, > 0) and log-moneyness k.

    Methods inherited from class Object

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

    • SsviSurface

      public SsviSurface(double rho, double eta, double gamma, double[] expiries, double[] thetas, double spot, double rate, double carry)
      Parameters:
      rho - correlation-like skew parameter, |ρ| < 1
      eta - power-law level η ≥ 0 with η(1+|ρ|) ≤ 2
      gamma - power-law exponent in [0, 1/2]
      expiries - strictly ascending pillar expiries in years
      thetas - ATM total variance at each pillar, positive and non-decreasing
  • Method Details

    • rho

      public double rho()
    • eta

      public double eta()
    • gamma

      public double gamma()
    • spot

      public double spot()
      Description copied from interface: TotalVarianceSurface
      Spot price.
      Specified by:
      spot in interface TotalVarianceSurface
    • rate

      public double rate()
      Description copied from interface: TotalVarianceSurface
      Continuously compounded risk-free rate.
      Specified by:
      rate in interface TotalVarianceSurface
    • carry

      public double carry()
      Description copied from interface: TotalVarianceSurface
      Continuous carry yield (dividend yield, or foreign rate for FX).
      Specified by:
      carry in interface TotalVarianceSurface
    • expiryLength

      public int expiryLength()
    • expiry

      public double expiry(int i)
    • theta

      public double theta(int i)
      ATM total variance at pillar i.
    • thetaAt

      public double thetaAt(double t)
      ATM total variance θ_t at any t > 0, interpolated as described in the class note.
    • phi

      public double phi(double theta)
      Power-law φ(θ) = η / (θ^γ (1+θ)^{1−γ}).
    • totalVariance

      public double totalVariance(double t, double k)
      Description copied from interface: TotalVarianceSurface
      Total implied variance at expiry t (years, > 0) and log-moneyness k.
      Specified by:
      totalVariance in interface TotalVarianceSurface
    • slice

      public SviSlice slice(double t)
      The raw SVI slice equal to this surface at expiry t (Gatheral-Jacquier 2014, section 4): a = θ(1−ρ²)/2, b = θφ/2, m = −ρ/φ, σ = √(1−ρ²)/φ.
      Throws:
      IllegalStateException - when η = 0 (flat smile, no finite SVI σ)
    • calibrate

      public static SsviSurface calibrate(double spot, double rate, double carry, double[] expiries, double[][] strikes, double[][] vols, double[][] weights)
      Calibrates ρ, η and γ to implied vol quotes, by Levenberg-Marquardt on weighted total-variance residuals in a reparametrisation that enforces the constructor's no-arbitrage bounds. θ at each expiry is the market ATM total variance: linear interpolation of quoted total variance in log-moneyness at k = 0 (nearest quote if k = 0 is not bracketed), then made non-decreasing by a running maximum.
      Parameters:
      expiries - strictly ascending expiries
      strikes - strikes per expiry (each at least 2, ascending)
      vols - Black-Scholes implied vols matching strikes
      weights - residual weights matching strikes, or null for equal