Class FokkerPlanckGenerator

java.lang.Object
org.drip.pricer.option.FokkerPlanckGenerator
All Implemented Interfaces:
GenericPricer
Direct Known Subclasses:
BlackNormalAlgorithm, BlackScholesAlgorithm, HestonStochasticVolatilityAlgorithm

public abstract class FokkerPlanckGenerator
extends java.lang.Object
implements GenericPricer
FokkerPlanckGenerator holds the base functionality that the performs the PDF evolution oriented Option Pricing.



Author:
Lakshmi Krishnamurthy
  • Constructor Summary

    Constructors
    Constructor Description
    FokkerPlanckGenerator()  
  • Method Summary

    Modifier and Type Method Description
    abstract 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
    Greeks greeks​(int iSpotDate, int iExpiryDate, double dblStrike, MergedDiscountForwardCurve dcFunding, double dblUnderlier, boolean bIsPut, boolean bIsForward, double dblIntegratedSurfaceVariance)
    Carry out a Sensitivity Run and generate the Pricing related measure set
    Greeks greeks​(int iSpotDate, int iExpiryDate, double dblStrike, MergedDiscountForwardCurve dcFunding, double dblUnderlier, boolean bIsPut, boolean bIsForward, R1ToR1 funcVolatilityR1ToR1)
    Carry out a Sensitivity Run and generate the Pricing related measure set
    double impliedBlackScholesVolatility​(double dblStrike, double dblTimeToExpiry, double dblRiskFreeRate, double dblUnderlier, boolean bIsPut, boolean bIsForward, double dblPrice)
    Imply the Effective Black-Scholes Volatility From the Option Price
    double impliedVolatilityFromPrice​(double dblStrike, double dblTimeToExpiry, double dblRiskFreeRate, double dblUnderlier, boolean bIsPut, boolean bIsForward, double dblPrice)
    Imply the Effective Volatility From the Option Price
    double impliedVolatilityFromPrice​(int iSpotDate, int iExpiryDate, double dblStrike, MergedDiscountForwardCurve dcFunding, double dblUnderlier, boolean bIsPut, boolean bIsForward, double dblPrice)
    Imply the Effective Volatility From the Option Price
    abstract 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
    double payoff​(int iSpotDate, int iExpiryDate, double dblStrike, MergedDiscountForwardCurve dcFunding, double dblUnderlier, boolean bIsPut, boolean bIsForward, double dblInitialVolatility, boolean bAsPrice)
    Compute the Expected Payoff of the Option from the Inputs
    double payoff​(int iSpotDate, int iExpiryDate, double dblStrike, MergedDiscountForwardCurve dcFunding, double dblUnderlier, boolean bIsPut, boolean bIsForward, R1ToR1 funcVolatilityR1ToR1, boolean bAsPrice)
    Compute the Expected Payoff of the Option from the Inputs

    Methods inherited from class java.lang.Object

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

    • FokkerPlanckGenerator

      public FokkerPlanckGenerator()
  • Method Details

    • payoff

      public abstract double payoff​(double dblStrike, double dblTimeToExpiry, double dblRiskFreeRate, double dblUnderlier, boolean bIsPut, boolean bIsForward, double dblInitialVolatility, boolean bAsPrice) throws java.lang.Exception
      Compute the Expected Payoff of the Option from the Inputs
      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 abstract 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
      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
    • payoff

      public double payoff​(int iSpotDate, int iExpiryDate, double dblStrike, MergedDiscountForwardCurve dcFunding, double dblUnderlier, boolean bIsPut, boolean bIsForward, double dblInitialVolatility, boolean bAsPrice) throws java.lang.Exception
      Compute the Expected Payoff of the Option from the Inputs
      Parameters:
      iSpotDate - Spot Date
      iExpiryDate - Expiry Date
      dblStrike - Option Strike
      dcFunding - The Funding Curve
      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
    • payoff

      public double payoff​(int iSpotDate, int iExpiryDate, double dblStrike, MergedDiscountForwardCurve dcFunding, double dblUnderlier, boolean bIsPut, boolean bIsForward, R1ToR1 funcVolatilityR1ToR1, boolean bAsPrice) throws java.lang.Exception
      Compute the Expected Payoff of the Option from the Inputs
      Parameters:
      iSpotDate - Spot Date
      iExpiryDate - Expiry Date
      dblStrike - Option Strike
      dcFunding - The Funding Curve
      dblUnderlier - Option Underlier Value
      bIsPut - TRUE - The Option is a Put
      bIsForward - TRUE - The Underlier represents the Forward, FALSE - it represents Spot
      funcVolatilityR1ToR1 - The R^1 To R^1 Volatility Term Structure
      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​(int iSpotDate, int iExpiryDate, double dblStrike, MergedDiscountForwardCurve dcFunding, double dblUnderlier, boolean bIsPut, boolean bIsForward, double dblIntegratedSurfaceVariance)
      Carry out a Sensitivity Run and generate the Pricing related measure set
      Parameters:
      iSpotDate - Spot Date
      iExpiryDate - Expiry Date
      dblStrike - Option Strike
      dcFunding - The Funding Curve
      dblUnderlier - Option Underlier Value
      bIsPut - TRUE - The Option is a Put
      bIsForward - TRUE - The Underlier represents the Forward, FALSE - it represents Spot
      dblIntegratedSurfaceVariance - The Integrated Surface Variance
      Returns:
      The Greeks Output generated from the Sensitivities Run
    • greeks

      public Greeks greeks​(int iSpotDate, int iExpiryDate, double dblStrike, MergedDiscountForwardCurve dcFunding, double dblUnderlier, boolean bIsPut, boolean bIsForward, R1ToR1 funcVolatilityR1ToR1)
      Carry out a Sensitivity Run and generate the Pricing related measure set
      Parameters:
      iSpotDate - Spot Date
      iExpiryDate - Expiry Date
      dblStrike - Option Strike
      dcFunding - The Funding Curve
      dblUnderlier - Option Underlier Value
      bIsPut - TRUE - The Option is a Put
      bIsForward - TRUE - The Underlier represents the Forward, FALSE - it represents Spot
      funcVolatilityR1ToR1 - The R^1 To R^1 Volatility Term Structure
      Returns:
      The Greeks Output generated from the Sensitivities Run
    • impliedVolatilityFromPrice

      public double impliedVolatilityFromPrice​(double dblStrike, double dblTimeToExpiry, double dblRiskFreeRate, double dblUnderlier, boolean bIsPut, boolean bIsForward, double dblPrice) throws java.lang.Exception
      Imply the Effective Volatility From the Option Price
      Parameters:
      dblStrike - Strike
      dblTimeToExpiry - Time To Expiry
      dblRiskFreeRate - Risk Free Rate
      dblUnderlier - The Underlier
      bIsPut - TRUE - The Option is a Put
      bIsForward - TRUE - The Underlier represents the Forward, FALSE - it represents Spot
      dblPrice - The Price
      Returns:
      The Implied Effective Volatility
      Throws:
      java.lang.Exception - Thrown if the Effective Volatility cannot be implied
    • impliedVolatilityFromPrice

      public double impliedVolatilityFromPrice​(int iSpotDate, int iExpiryDate, double dblStrike, MergedDiscountForwardCurve dcFunding, double dblUnderlier, boolean bIsPut, boolean bIsForward, double dblPrice) throws java.lang.Exception
      Imply the Effective Volatility From the Option Price
      Parameters:
      iSpotDate - Spot Date
      iExpiryDate - Expiry Date
      dblStrike - Option Strike
      dcFunding - The Funding Curve
      dblUnderlier - Option Underlier Value
      bIsPut - TRUE - The Option is a Put
      bIsForward - TRUE - The Underlier represents the Forward, FALSE - it represents Spot
      dblPrice - The Price
      Returns:
      The Implied Effective Volatility
      Throws:
      java.lang.Exception - Thrown if the Effective Volatility cannot be implied
    • impliedBlackScholesVolatility

      public double impliedBlackScholesVolatility​(double dblStrike, double dblTimeToExpiry, double dblRiskFreeRate, double dblUnderlier, boolean bIsPut, boolean bIsForward, double dblPrice) throws java.lang.Exception
      Imply the Effective Black-Scholes Volatility From the Option Price
      Parameters:
      dblStrike - Strike
      dblTimeToExpiry - Time To Expiry
      dblRiskFreeRate - Risk Free Rate
      dblUnderlier - The Underlier
      bIsPut - TRUE - The Option is a Put
      bIsForward - TRUE - The Underlier represents the Forward, FALSE - it represents Spot
      dblPrice - The Price
      Returns:
      The Implied Black Scholes Effective Volatility
      Throws:
      java.lang.Exception - Thrown if the Black Scholes Effective Volatility cannot be implied