Package org.drip.pricer.option
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.
- Module = Product Core Module
- Library = Fixed Income Analytics
- Project = Custom Pricing Algorithms and the Derivative Fokker Planck Trajectory Generators
- Package = Deterministic/Stochastic Volatility Settings/Greeks
- 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 setGreeks
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 setGreeks
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 setdouble
impliedBlackScholesVolatility(double dblStrike, double dblTimeToExpiry, double dblRiskFreeRate, double dblUnderlier, boolean bIsPut, boolean bIsForward, double dblPrice)
Imply the Effective Black-Scholes Volatility From the Option Pricedouble
impliedVolatilityFromPrice(double dblStrike, double dblTimeToExpiry, double dblRiskFreeRate, double dblUnderlier, boolean bIsPut, boolean bIsForward, double dblPrice)
Imply the Effective Volatility From the Option Pricedouble
impliedVolatilityFromPrice(int iSpotDate, int iExpiryDate, double dblStrike, MergedDiscountForwardCurve dcFunding, double dblUnderlier, boolean bIsPut, boolean bIsForward, double dblPrice)
Imply the Effective Volatility From the Option Priceabstract 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 Inputsdouble
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 Inputsdouble
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 InputsMethods 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.ExceptionCompute the Expected Payoff of the Option from the Inputs- Parameters:
dblStrike
- Option StrikedblTimeToExpiry
- Option Time To ExpirydblRiskFreeRate
- Option Risk Free RatedblUnderlier
- Option Underlier ValuebIsPut
- TRUE - The Option is a PutbIsForward
- TRUE - The Underlier represents the Forward, FALSE - it represents SpotdblInitialVolatility
- Option Initial Volatility ValuebAsPrice
- 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 StrikedblTimeToExpiry
- Option Time To ExpirydblRiskFreeRate
- Option Risk Free RatedblUnderlier
- Option Underlier ValuebIsPut
- TRUE - The Option is a PutbIsForward
- TRUE - The Underlier represents the Forward, FALSE - it represents SpotdblInitialVolatility
- 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.ExceptionCompute the Expected Payoff of the Option from the Inputs- Parameters:
iSpotDate
- Spot DateiExpiryDate
- Expiry DatedblStrike
- Option StrikedcFunding
- The Funding CurvedblUnderlier
- Option Underlier ValuebIsPut
- TRUE - The Option is a PutbIsForward
- TRUE - The Underlier represents the Forward, FALSE - it represents SpotdblInitialVolatility
- Option Initial Volatility ValuebAsPrice
- 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.ExceptionCompute the Expected Payoff of the Option from the Inputs- Parameters:
iSpotDate
- Spot DateiExpiryDate
- Expiry DatedblStrike
- Option StrikedcFunding
- The Funding CurvedblUnderlier
- Option Underlier ValuebIsPut
- TRUE - The Option is a PutbIsForward
- TRUE - The Underlier represents the Forward, FALSE - it represents SpotfuncVolatilityR1ToR1
- The R^1 To R^1 Volatility Term StructurebAsPrice
- 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 DateiExpiryDate
- Expiry DatedblStrike
- Option StrikedcFunding
- The Funding CurvedblUnderlier
- Option Underlier ValuebIsPut
- TRUE - The Option is a PutbIsForward
- TRUE - The Underlier represents the Forward, FALSE - it represents SpotdblIntegratedSurfaceVariance
- 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 DateiExpiryDate
- Expiry DatedblStrike
- Option StrikedcFunding
- The Funding CurvedblUnderlier
- Option Underlier ValuebIsPut
- TRUE - The Option is a PutbIsForward
- TRUE - The Underlier represents the Forward, FALSE - it represents SpotfuncVolatilityR1ToR1
- 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.ExceptionImply the Effective Volatility From the Option Price- Parameters:
dblStrike
- StrikedblTimeToExpiry
- Time To ExpirydblRiskFreeRate
- Risk Free RatedblUnderlier
- The UnderlierbIsPut
- TRUE - The Option is a PutbIsForward
- TRUE - The Underlier represents the Forward, FALSE - it represents SpotdblPrice
- 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.ExceptionImply the Effective Volatility From the Option Price- Parameters:
iSpotDate
- Spot DateiExpiryDate
- Expiry DatedblStrike
- Option StrikedcFunding
- The Funding CurvedblUnderlier
- Option Underlier ValuebIsPut
- TRUE - The Option is a PutbIsForward
- TRUE - The Underlier represents the Forward, FALSE - it represents SpotdblPrice
- 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.ExceptionImply the Effective Black-Scholes Volatility From the Option Price- Parameters:
dblStrike
- StrikedblTimeToExpiry
- Time To ExpirydblRiskFreeRate
- Risk Free RatedblUnderlier
- The UnderlierbIsPut
- TRUE - The Option is a PutbIsForward
- TRUE - The Underlier represents the Forward, FALSE - it represents SpotdblPrice
- The Price- Returns:
- The Implied Black Scholes Effective Volatility
- Throws:
java.lang.Exception
- Thrown if the Black Scholes Effective Volatility cannot be implied
-