Class HestonStochasticVolatilityAlgorithm

java.lang.Object
org.drip.pricer.option.FokkerPlanckGenerator
org.drip.pricer.option.HestonStochasticVolatilityAlgorithm
All Implemented Interfaces:
GenericPricer

public class HestonStochasticVolatilityAlgorithm
extends FokkerPlanckGenerator
HestonStochasticVolatilityAlgorithm implements the Heston 1993 Stochastic Volatility European Call and Put Options Pricer.



Author:
Lakshmi Krishnamurthy
  • Field Summary

    Fields
    Modifier and Type Field Description
    static int PAYOFF_TRANSFORM_SCHEME_AMST_2007
    Payoff Transformation Type - The Albrecher, Mayer, Schoutens, and Tistaert Scheme
    static int PAYOFF_TRANSFORM_SCHEME_HESTON_1993
    Payoff Transformation Type - The Original Heston 1993 Scheme
  • Constructor Summary

    Constructors
    Constructor Description
    HestonStochasticVolatilityAlgorithm​(HestonOptionPricerParams fphp)
    HestonStochasticVolatilityAlgorithm constructor
  • Method Summary

    Modifier and Type Method Description
    Greeks greeks​(double dblStrike, double dblTimeToExpiry, double dblRiskFreeRate, double dblUnderlier, boolean bIsPut, boolean bIsForward, double dblInitialVolatility)
    Carry out a Sensitivity Run and generate the Pricing related measure set
    double payoff​(double dblStrike, double dblTimeToExpiry, double dblRiskFreeRate, double dblUnderlier, boolean bIsPut, boolean bIsForward, double dblInitialVolatility, boolean bAsPrice)
    Compute the Expected Payoff of the Option from the Inputs
    java.util.Map<java.lang.Double,​java.lang.Double> recordPhase​(double dblStrike, double dbTimeToExpiry, double dblRiskFreeRate, double dblSpot, double dblInitialVolatility, boolean bLeft)
    Record the Details of a Single Phase Adjustment Run

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • PAYOFF_TRANSFORM_SCHEME_HESTON_1993

      public static final int PAYOFF_TRANSFORM_SCHEME_HESTON_1993
      Payoff Transformation Type - The Original Heston 1993 Scheme
      See Also:
      Constant Field Values
    • PAYOFF_TRANSFORM_SCHEME_AMST_2007

      public static final int PAYOFF_TRANSFORM_SCHEME_AMST_2007
      Payoff Transformation Type - The Albrecher, Mayer, Schoutens, and Tistaert Scheme
      See Also:
      Constant Field Values
  • Constructor Details

    • HestonStochasticVolatilityAlgorithm

      public HestonStochasticVolatilityAlgorithm​(HestonOptionPricerParams fphp) throws java.lang.Exception
      HestonStochasticVolatilityAlgorithm constructor
      Parameters:
      fphp - The Heston Algorithm Parameters
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
  • Method Details

    • recordPhase

      public java.util.Map<java.lang.Double,​java.lang.Double> recordPhase​(double dblStrike, double dbTimeToExpiry, double dblRiskFreeRate, double dblSpot, double dblInitialVolatility, boolean bLeft)
      Record the Details of a Single Phase Adjustment Run
      Parameters:
      dblStrike - Strike
      dbTimeToExpiry - TTE
      dblRiskFreeRate - Risk Free Rate
      dblSpot - Spot
      dblInitialVolatility - Initial Volatility
      bLeft - TRUE - Phase Correction applied to Left
      Returns:
      Map of the Phase Correction Record
    • payoff

      public double payoff​(double dblStrike, double dblTimeToExpiry, double dblRiskFreeRate, double dblUnderlier, boolean bIsPut, boolean bIsForward, double dblInitialVolatility, boolean bAsPrice) throws java.lang.Exception
      Description copied from class: FokkerPlanckGenerator
      Compute the Expected Payoff of the Option from the Inputs
      Specified by:
      payoff in class FokkerPlanckGenerator
      Parameters:
      dblStrike - Option Strike
      dblTimeToExpiry - Option Time To Expiry
      dblRiskFreeRate - Option Risk Free Rate
      dblUnderlier - Option Underlier Value
      bIsPut - TRUE - The Option is a Put
      bIsForward - TRUE - The Underlier represents the Forward, FALSE - it represents Spot
      dblInitialVolatility - Option Initial Volatility Value
      bAsPrice - TRUE - Return the Discounted Payoff
      Returns:
      The Expected Option Payoff
      Throws:
      java.lang.Exception - Thrown if the Expected Payoff cannot be calculated
    • greeks

      public Greeks greeks​(double dblStrike, double dblTimeToExpiry, double dblRiskFreeRate, double dblUnderlier, boolean bIsPut, boolean bIsForward, double dblInitialVolatility)
      Description copied from class: FokkerPlanckGenerator
      Carry out a Sensitivity Run and generate the Pricing related measure set
      Specified by:
      greeks in class FokkerPlanckGenerator
      Parameters:
      dblStrike - Option Strike
      dblTimeToExpiry - Option Time To Expiry
      dblRiskFreeRate - Option Risk Free Rate
      dblUnderlier - Option Underlier Value
      bIsPut - TRUE - The Option is a Put
      bIsForward - TRUE - The Underlier represents the Forward, FALSE - it represents Spot
      dblInitialVolatility - Option Initial Volatility Value
      Returns:
      The Greeks Sensitivities Output