Class VolatilityIborCapletFloorletPeriodPricer
- java.lang.Object
-
- com.opengamma.strata.pricer.capfloor.VolatilityIborCapletFloorletPeriodPricer
-
- Direct Known Subclasses:
BlackIborCapletFloorletPeriodPricer
,NormalIborCapletFloorletPeriodPricer
,SabrIborCapletFloorletPeriodPricer
public class VolatilityIborCapletFloorletPeriodPricer extends Object
Pricer for caplet/floorlet based on volatilities.The pricing methodologies are defined in individual implementations of the volatilities,
IborCapletFloorletVolatilities
.The value of the caplet/floorlet after expiry is a fixed payoff amount. The value is zero if valuation date is after payment date of the caplet/floorlet.
The consistency between
RatesProvider
andIborCapletFloorletVolatilities
is not checked in this class, but validated only once inVolatilityIborCapFloorLegPricer
.
-
-
Field Summary
Fields Modifier and Type Field Description static VolatilityIborCapletFloorletPeriodPricer
DEFAULT
Default implementation.
-
Constructor Summary
Constructors Constructor Description VolatilityIborCapletFloorletPeriodPricer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
forwardRate(IborCapletFloorletPeriod period, RatesProvider ratesProvider)
Computes the forward rate for the Ibor caplet/floorlet.double
impliedVolatility(IborCapletFloorletPeriod period, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Computes the implied volatility of the Ibor caplet/floorlet.CurrencyAmount
presentValue(IborCapletFloorletPeriod period, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value of the Ibor caplet/floorlet period.CurrencyAmount
presentValueDelta(IborCapletFloorletPeriod period, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value delta of the Ibor caplet/floorlet period.CurrencyAmount
presentValueGamma(IborCapletFloorletPeriod period, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value gamma of the Ibor caplet/floorlet period.PointSensitivityBuilder
presentValueSensitivityModelParamsVolatility(IborCapletFloorletPeriod period, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value volatility sensitivity of the Ibor caplet/floorlet.PointSensitivityBuilder
presentValueSensitivityRates(IborCapletFloorletPeriod period, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value rates sensitivity of the Ibor caplet/floorlet.CurrencyAmount
presentValueTheta(IborCapletFloorletPeriod period, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value theta of the Ibor caplet/floorlet period.protected void
validate(IborCapletFloorletVolatilities volatilities)
Validate the volatilities provider.
-
-
-
Field Detail
-
DEFAULT
public static final VolatilityIborCapletFloorletPeriodPricer DEFAULT
Default implementation.
-
-
Method Detail
-
presentValue
public CurrencyAmount presentValue(IborCapletFloorletPeriod period, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value of the Ibor caplet/floorlet period.The result is expressed using the currency of the period.
- Parameters:
period
- the Ibor caplet/floorlet periodratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the present value
-
impliedVolatility
public double impliedVolatility(IborCapletFloorletPeriod period, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Computes the implied volatility of the Ibor caplet/floorlet.- Parameters:
period
- the Ibor caplet/floorlet periodratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the implied volatility
-
forwardRate
public double forwardRate(IborCapletFloorletPeriod period, RatesProvider ratesProvider)
Computes the forward rate for the Ibor caplet/floorlet.- Parameters:
period
- the Ibor caplet/floorlet periodratesProvider
- the rates provider- Returns:
- the forward rate
-
presentValueDelta
public CurrencyAmount presentValueDelta(IborCapletFloorletPeriod period, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value delta of the Ibor caplet/floorlet period.The present value delta is given by the first derivative of the present value with respect to forward.
- Parameters:
period
- the Ibor caplet/floorlet periodratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the present value delta
-
presentValueGamma
public CurrencyAmount presentValueGamma(IborCapletFloorletPeriod period, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value gamma of the Ibor caplet/floorlet period.The present value gamma is given by the second derivative of the present value with respect to forward.
- Parameters:
period
- the Ibor caplet/floorlet periodratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the present value gamma
-
presentValueTheta
public CurrencyAmount presentValueTheta(IborCapletFloorletPeriod period, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value theta of the Ibor caplet/floorlet period.The present value theta is given by the minus of the present value sensitivity to the
timeToExpiry
parameter of the model.- Parameters:
period
- the Ibor caplet/floorlet periodratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the present value theta
-
presentValueSensitivityRates
public PointSensitivityBuilder presentValueSensitivityRates(IborCapletFloorletPeriod period, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value rates sensitivity of the Ibor caplet/floorlet.The present value rates sensitivity of the caplet/floorlet is the sensitivity of the present value to the underlying curves.
- Parameters:
period
- the Ibor caplet/floorlet periodratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the present value curve sensitivity
-
presentValueSensitivityModelParamsVolatility
public PointSensitivityBuilder presentValueSensitivityModelParamsVolatility(IborCapletFloorletPeriod period, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value volatility sensitivity of the Ibor caplet/floorlet.The present value volatility sensitivity of the caplet/floorlet is the sensitivity of the present value to the implied volatility.
The sensitivity to the implied volatility is also called vega.
- Parameters:
period
- the Ibor caplet/floorlet periodratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the point sensitivity to the volatility
-
validate
protected void validate(IborCapletFloorletVolatilities volatilities)
Validate the volatilities provider.This validate method should be overridden such that a correct implementation of
IborCapletFloorletVolatilities
is used for pricing.- Parameters:
volatilities
- the volatilities
-
-