Package org.drip.pricer.option
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.
- 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
-
Field Summary
Fields Modifier and Type Field Description static int
PAYOFF_TRANSFORM_SCHEME_AMST_2007
Payoff Transformation Type - The Albrecher, Mayer, Schoutens, and Tistaert Schemestatic 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 setdouble
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 Inputsjava.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 RunMethods inherited from class org.drip.pricer.option.FokkerPlanckGenerator
greeks, greeks, impliedBlackScholesVolatility, impliedVolatilityFromPrice, impliedVolatilityFromPrice, payoff, payoff
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_1993Payoff 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_2007Payoff Transformation Type - The Albrecher, Mayer, Schoutens, and Tistaert Scheme- See Also:
- Constant Field Values
-
-
Constructor Details
-
HestonStochasticVolatilityAlgorithm
public HestonStochasticVolatilityAlgorithm(HestonOptionPricerParams fphp) throws java.lang.ExceptionHestonStochasticVolatilityAlgorithm 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
- StrikedbTimeToExpiry
- TTEdblRiskFreeRate
- Risk Free RatedblSpot
- SpotdblInitialVolatility
- Initial VolatilitybLeft
- 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.ExceptionDescription copied from class:FokkerPlanckGenerator
Compute the Expected Payoff of the Option from the Inputs- Specified by:
payoff
in classFokkerPlanckGenerator
- 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 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 classFokkerPlanckGenerator
- 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
-