Package org.drip.product.option
Class EuropeanCallPut
java.lang.Object
org.drip.product.option.EuropeanCallPut
public class EuropeanCallPut
extends java.lang.Object
EuropeanCallPut implements a simple European Call/Put Option, and its Black Scholes Price.
- Module = Product Core Module
- Library = Fixed Income Analytics
- Project = Product Components/Baskets for Credit, FRA, FX, Govvie, Rates, and Option AssetClasses
- Package = Options on Fixed Income Components
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
Constructors Constructor Description EuropeanCallPut(JulianDate dtMaturity, double dblStrike)
EuropeanCallPut constructor -
Method Summary
Modifier and Type Method Description java.util.Set<java.lang.String>
getMeasureNames()
Retrieve the Set of the Measure Namesdouble
implyVolatilityFromCallPrice(ValuationParams valParams, double dblUnderlier, boolean bIsForward, MergedDiscountForwardCurve dc, double dblCallPrice)
Imply the Option Volatility given the Call Pricedouble
implyVolatilityFromPutPrice(ValuationParams valParams, double dblUnderlier, boolean bIsForward, MergedDiscountForwardCurve dc, double dblPutPrice)
Imply the Option Volatility given the Put PriceJulianDate
maturity()
Retrieve the Option Maturitydouble
strike()
Retrieve the Option StrikeCaseInsensitiveTreeMap<java.lang.Double>
value(ValuationParams valParams, double dblUnderlier, boolean bIsForward, MergedDiscountForwardCurve dc, R1ToR1 auVolatility, FokkerPlanckGenerator fpg)
Generate the Measure Set for the OptionMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
EuropeanCallPut
EuropeanCallPut constructor- Parameters:
dtMaturity
- Option MaturitydblStrike
- Option Strike- Throws:
java.lang.Exception
- Thrown if Inputs are Invalid
-
-
Method Details
-
maturity
Retrieve the Option Maturity- Returns:
- The Option Maturity
-
strike
public double strike()Retrieve the Option Strike- Returns:
- The Option Strike
-
value
public CaseInsensitiveTreeMap<java.lang.Double> value(ValuationParams valParams, double dblUnderlier, boolean bIsForward, MergedDiscountForwardCurve dc, R1ToR1 auVolatility, FokkerPlanckGenerator fpg)Generate the Measure Set for the Option- Parameters:
valParams
- The Valuation ParametersdblUnderlier
- The UnderlierbIsForward
- TRUE - The Underlier represents the Forward, FALSE - it represents Spotdc
- Discount CurveauVolatility
- The Option Volatility Functionfpg
- The Fokker Planck-based Option Pricer- Returns:
- The Map of the Measures
-
implyVolatilityFromCallPrice
public double implyVolatilityFromCallPrice(ValuationParams valParams, double dblUnderlier, boolean bIsForward, MergedDiscountForwardCurve dc, double dblCallPrice) throws java.lang.ExceptionImply the Option Volatility given the Call Price- Parameters:
valParams
- The Valuation ParametersdblUnderlier
- The UnderlierbIsForward
- TRUE - The Underlier represents the Forward, FALSE - it represents Spotdc
- Discount CurvedblCallPrice
- The Option Call Price- Returns:
- The Option's Implied Volatility
- Throws:
java.lang.Exception
- Thrown if Inputs are Invalid
-
implyVolatilityFromPutPrice
public double implyVolatilityFromPutPrice(ValuationParams valParams, double dblUnderlier, boolean bIsForward, MergedDiscountForwardCurve dc, double dblPutPrice) throws java.lang.ExceptionImply the Option Volatility given the Put Price- Parameters:
valParams
- The Valuation ParametersdblUnderlier
- The UnderlierbIsForward
- TRUE - The Underlier represents the Forward, FALSE - it represents Spotdc
- Discount CurvedblPutPrice
- The Option Put Price- Returns:
- The Option's Implied Volatility
- Throws:
java.lang.Exception
- Thrown if Inputs are Invalid
-
getMeasureNames
public java.util.Set<java.lang.String> getMeasureNames()Retrieve the Set of the Measure Names- Returns:
- The Set of the Measure Names
-