Class HestonModel

java.lang.Object
net.finmath.functions.HestonModel

public class HestonModel extends Object
This class implements some functions as static class methods related to the Heston model. The calculation is performed by means of the FFT algorithm of Carr Madan applied to the gradient of the characteristic funtion. The model is \[ dS(t) = r^{\text{c}}(t) S(t) dt + \sqrt{V(t)} S(t) dW_{1}(t), \quad S(0) = S_{0}, \] \[ dV(t) = \kappa ( \theta - V(t) ) dt + \xi \sqrt{V(t)} dW_{2}(t), \quad V(0) = \sigma^2, \] \[ dW_{1} dW_{2} = \rho dt \] \[ dN(t) = r^{\text{d}}(t) N(t) dt, \quad N(0) = N_{0}, \] where \( W \) is a Brownian motion. The free parameters of this model are:
\( S_{0} \)
spot - initial value of S
\( r^{\text{c}} \)
the risk free rate
\( \sigma \)
the initial volatility level
\( r^{\text{d}} \)
the discount rate
\( \xi \)
the volatility of volatility
\( \theta \)
the mean reversion level of the stochastic volatility
\( \kappa \)
the mean reversion speed of the stochastic volatility
\( \rho \)
the correlation of the Brownian drivers
Author:
Alessandro Gnoatto
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    hestonOptionDelta​(double initialStockValue, double riskFreeRate, double dividendYield, double sigma, double theta, double kappa, double xi, double rho, double optionMaturity, double optionStrike)
    Calculates the delta of a call option under a Heston model.
    static double
    hestonOptionGamma​(double initialStockValue, double riskFreeRate, double dividendYield, double sigma, double theta, double kappa, double xi, double rho, double optionMaturity, double optionStrike)
    Calculates the gamma of a call option under a Heston model
    static double
    hestonOptionRho​(double initialStockValue, double riskFreeRate, double dividendYield, double sigma, double theta, double kappa, double xi, double rho, double optionMaturity, double optionStrike)
    Calculates the rho of a call option under a Heston model
    static double
    hestonOptionTheta​(double initialStockValue, double riskFreeRate, double dividendYield, double sigma, double theta, double kappa, double xi, double rho, double optionMaturity, double optionStrike)
    Calculates the theta of a call option under a Heston model
    static double
    hestonOptionVanna​(double initialStockValue, double riskFreeRate, double dividendYield, double sigma, double theta, double kappa, double xi, double rho, double optionMaturity, double optionStrike)
    Calculates the vanna of a call option under a Heston model
    static double
    hestonOptionVega1​(double initialStockValue, double riskFreeRate, double dividendYield, double sigma, double theta, double kappa, double xi, double rho, double optionMaturity, double optionStrike)
    Calculates the vega1 of a call option under a Heston model
    static double
    hestonOptionVolga​(double initialStockValue, double riskFreeRate, double dividendYield, double sigma, double theta, double kappa, double xi, double rho, double optionMaturity, double optionStrike)
    Calculates the volga of a call option under a Heston model

    Methods inherited from class java.lang.Object

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

    • HestonModel

      public HestonModel()
  • Method Details

    • hestonOptionDelta

      public static double hestonOptionDelta(double initialStockValue, double riskFreeRate, double dividendYield, double sigma, double theta, double kappa, double xi, double rho, double optionMaturity, double optionStrike)
      Calculates the delta of a call option under a Heston model.
      Parameters:
      initialStockValue - Initital value of the stock.
      riskFreeRate - The risk free rate.
      dividendYield - The dividend yield.
      sigma - the square root of the initial instantaneous variance (\( V_0 = sigma^2 \))
      theta - the long run mean of the volatility.
      kappa - the speed of mean reversion.
      xi - the volatility of variance.
      rho - correlation between the two Brownian motions
      optionMaturity - the maturity of the option
      optionStrike - the strike of the option.
      Returns:
      The delta of the option.
    • hestonOptionGamma

      public static double hestonOptionGamma(double initialStockValue, double riskFreeRate, double dividendYield, double sigma, double theta, double kappa, double xi, double rho, double optionMaturity, double optionStrike)
      Calculates the gamma of a call option under a Heston model
      Parameters:
      initialStockValue - Initital value of the stock.
      riskFreeRate - The risk free rate.
      dividendYield - The dividend yield.
      sigma - the square root of the initial instantaneous variance (\( V_0 = sigma^2 \))
      theta - the long run mean of the volatility.
      kappa - the speed of mean reversion.
      xi - the volatility of variance.
      rho - correlation between the two Brownian motions
      optionMaturity - the maturity of the option
      optionStrike - the strike of the option.
      Returns:
      The gamma of the option
    • hestonOptionTheta

      public static double hestonOptionTheta(double initialStockValue, double riskFreeRate, double dividendYield, double sigma, double theta, double kappa, double xi, double rho, double optionMaturity, double optionStrike)
      Calculates the theta of a call option under a Heston model
      Parameters:
      initialStockValue - Initital value of the stock.
      riskFreeRate - The risk free rate.
      dividendYield - The dividend yield.
      sigma - the square root of the initial instantaneous variance (\( V_0 = sigma^2 \))
      theta - the long run mean of the volatility.
      kappa - the speed of mean reversion.
      xi - the volatility of variance.
      rho - correlation between the two Brownian motions
      optionMaturity - the maturity of the option
      optionStrike - the strike of the option.
      Returns:
      The theta of the option
    • hestonOptionRho

      public static double hestonOptionRho(double initialStockValue, double riskFreeRate, double dividendYield, double sigma, double theta, double kappa, double xi, double rho, double optionMaturity, double optionStrike)
      Calculates the rho of a call option under a Heston model
      Parameters:
      initialStockValue - Initital value of the stock.
      riskFreeRate - The risk free rate.
      dividendYield - The dividend yield.
      sigma - the square root of the initial instantaneous variance (\( V_0 = sigma^2 \))
      theta - the long run mean of the volatility.
      kappa - the speed of mean reversion.
      xi - the volatility of variance.
      rho - correlation between the two Brownian motions
      optionMaturity - the maturity of the option
      optionStrike - the strike of the option.
      Returns:
      The rho of the option
    • hestonOptionVega1

      public static double hestonOptionVega1(double initialStockValue, double riskFreeRate, double dividendYield, double sigma, double theta, double kappa, double xi, double rho, double optionMaturity, double optionStrike)
      Calculates the vega1 of a call option under a Heston model
      Parameters:
      initialStockValue - Initital value of the stock.
      riskFreeRate - The risk free rate.
      dividendYield - The dividend yield.
      sigma - the square root of the initial instantaneous variance (\( V_0 = sigma^2 \))
      theta - the long run mean of the volatility.
      kappa - the speed of mean reversion.
      xi - the volatility of variance.
      rho - correlation between the two Brownian motions
      optionMaturity - the maturity of the option
      optionStrike - the strike of the option.
      Returns:
      The vega1 of the option
    • hestonOptionVanna

      public static double hestonOptionVanna(double initialStockValue, double riskFreeRate, double dividendYield, double sigma, double theta, double kappa, double xi, double rho, double optionMaturity, double optionStrike)
      Calculates the vanna of a call option under a Heston model
      Parameters:
      initialStockValue - Initital value of the stock.
      riskFreeRate - The risk free rate.
      dividendYield - The dividend yield.
      sigma - the square root of the initial instantaneous variance (\( V_0 = sigma^2 \))
      theta - the long run mean of the volatility.
      kappa - the speed of mean reversion.
      xi - the volatility of variance.
      rho - correlation between the two Brownian motions
      optionMaturity - the maturity of the option
      optionStrike - the strike of the option.
      Returns:
      The vanna of the option
    • hestonOptionVolga

      public static double hestonOptionVolga(double initialStockValue, double riskFreeRate, double dividendYield, double sigma, double theta, double kappa, double xi, double rho, double optionMaturity, double optionStrike)
      Calculates the volga of a call option under a Heston model
      Parameters:
      initialStockValue - Initital value of the stock.
      riskFreeRate - The risk free rate.
      dividendYield - The dividend yield.
      sigma - the square root of the initial instantaneous variance (\( V_0 = sigma^2 \))
      theta - the long run mean of the volatility.
      kappa - the speed of mean reversion.
      xi - the volatility of variance.
      rho - correlation between the two Brownian motions
      optionMaturity - the maturity of the option
      optionStrike - the strike of the option.
      Returns:
      The volga of the option