Class VolatilityIborCapFloorProductPricer
- java.lang.Object
-
- com.opengamma.strata.pricer.capfloor.VolatilityIborCapFloorProductPricer
-
- Direct Known Subclasses:
BlackIborCapFloorProductPricer
,NormalIborCapFloorProductPricer
,SabrIborCapFloorProductPricer
public class VolatilityIborCapFloorProductPricer extends Object
Pricer for cap/floor products based on volatilities.This function provides the ability to price
ResolvedIborCapFloor
.The pricing methodologies are defined in individual implementations of the volatilities,
IborCapletFloorletVolatilities
.
-
-
Field Summary
Fields Modifier and Type Field Description static VolatilityIborCapFloorProductPricer
DEFAULT
Default implementation.
-
Constructor Summary
Constructors Constructor Description VolatilityIborCapFloorProductPricer(VolatilityIborCapFloorLegPricer capFloorLegPricer, DiscountingSwapLegPricer payLegPricer)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiCurrencyAmount
currencyExposure(ResolvedIborCapFloor capFloor, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the currency exposure of the Ibor cap/floor product.MultiCurrencyAmount
currentCash(ResolvedIborCapFloor capFloor, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the current cash of the Ibor cap/floor product.IborCapletFloorletPeriodAmounts
forwardRates(ResolvedIborCapFloor capFloor, RatesProvider ratesProvider)
Calculates the forward rates for each caplet/floorlet of the Ibor cap/floor.protected DiscountingSwapLegPricer
getPayLegPricer()
Gets the pay leg pricer.IborCapletFloorletPeriodAmounts
impliedVolatilities(ResolvedIborCapFloor capFloor, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the implied volatilities for each caplet/floorlet of the Ibor cap/floor.MultiCurrencyAmount
presentValue(ResolvedIborCapFloor capFloor, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value of the Ibor cap/floor product.IborCapletFloorletPeriodCurrencyAmounts
presentValueCapletFloorletPeriods(ResolvedIborCapFloor capFloor, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value for each caplet/floorlet of the Ibor cap/floor product.MultiCurrencyAmount
presentValueDelta(ResolvedIborCapFloor capFloor, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value delta of the Ibor cap/floor product.MultiCurrencyAmount
presentValueGamma(ResolvedIborCapFloor capFloor, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value gamma of the Ibor cap/floor product.PointSensitivityBuilder
presentValueSensitivityModelParamsVolatility(ResolvedIborCapFloor capFloor, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value volatility sensitivity of the Ibor cap/floor product.PointSensitivityBuilder
presentValueSensitivityRates(ResolvedIborCapFloor capFloor, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value rates sensitivity of the Ibor cap/floor product.MultiCurrencyAmount
presentValueTheta(ResolvedIborCapFloor capFloor, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value theta of the Ibor cap/floor product.
-
-
-
Field Detail
-
DEFAULT
public static final VolatilityIborCapFloorProductPricer DEFAULT
Default implementation.
-
-
Constructor Detail
-
VolatilityIborCapFloorProductPricer
public VolatilityIborCapFloorProductPricer(VolatilityIborCapFloorLegPricer capFloorLegPricer, DiscountingSwapLegPricer payLegPricer)
Creates an instance.- Parameters:
capFloorLegPricer
- the pricer forIborCapFloorLeg
payLegPricer
- the pricer forSwapLeg
-
-
Method Detail
-
getPayLegPricer
protected DiscountingSwapLegPricer getPayLegPricer()
Gets the pay leg pricer.- Returns:
- the pay leg pricer
-
presentValue
public MultiCurrencyAmount presentValue(ResolvedIborCapFloor capFloor, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value of the Ibor cap/floor product.The present value of the product is the value on the valuation date.
The cap/floor leg and pay leg are typically in the same currency, thus the present value gamma is expressed as a single currency amount in most cases.
- Parameters:
capFloor
- the Ibor cap/floor productratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the present value
-
presentValueCapletFloorletPeriods
public IborCapletFloorletPeriodCurrencyAmounts presentValueCapletFloorletPeriods(ResolvedIborCapFloor capFloor, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value for each caplet/floorlet of the Ibor cap/floor product.The present value of each caplet/floorlet is the value on the valuation date. The result is returned using the payment currency of the leg.
The present value will not be calculated for the pay leg if the product has one.
- Parameters:
capFloor
- the Ibor cap/floor productratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the present values
-
presentValueDelta
public MultiCurrencyAmount presentValueDelta(ResolvedIborCapFloor capFloor, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value delta of the Ibor cap/floor product.The present value of the product is the sensitivity value on the valuation date.
The cap/floor leg and pay leg are typically in the same currency, thus the present value gamma is expressed as a single currency amount in most cases.
- Parameters:
capFloor
- the Ibor cap/floor productratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the present value delta
-
presentValueGamma
public MultiCurrencyAmount presentValueGamma(ResolvedIborCapFloor capFloor, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value gamma of the Ibor cap/floor product.The present value of the product is the sensitivity value on the valuation date.
The cap/floor leg and pay leg are typically in the same currency, thus the present value gamma is expressed as a single currency amount in most cases.
- Parameters:
capFloor
- the Ibor cap/floor productratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the present value gamma
-
presentValueTheta
public MultiCurrencyAmount presentValueTheta(ResolvedIborCapFloor capFloor, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value theta of the Ibor cap/floor product.The present value of the product is the sensitivity value on the valuation date.
The cap/floor leg and pay leg are typically in the same currency, thus the present value gamma is expressed as a single currency amount in most cases.
- Parameters:
capFloor
- the Ibor cap/floor productratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the present value theta
-
presentValueSensitivityRates
public PointSensitivityBuilder presentValueSensitivityRates(ResolvedIborCapFloor capFloor, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value rates sensitivity of the Ibor cap/floor product.The present value rates sensitivity of the product is the sensitivity of the present value to the underlying curves.
- Parameters:
capFloor
- the Ibor cap/floor productratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the present value sensitivity
-
presentValueSensitivityModelParamsVolatility
public PointSensitivityBuilder presentValueSensitivityModelParamsVolatility(ResolvedIborCapFloor capFloor, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value volatility sensitivity of the Ibor cap/floor product.The present value volatility sensitivity of the product is the sensitivity of the present value to the volatility values.
- Parameters:
capFloor
- the Ibor cap/floor productratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the present value sensitivity
-
currencyExposure
public MultiCurrencyAmount currencyExposure(ResolvedIborCapFloor capFloor, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the currency exposure of the Ibor cap/floor product.- Parameters:
capFloor
- the Ibor cap/floor productratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the currency exposure
-
currentCash
public MultiCurrencyAmount currentCash(ResolvedIborCapFloor capFloor, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the current cash of the Ibor cap/floor product.- Parameters:
capFloor
- the Ibor cap/floor productratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the current cash
-
forwardRates
public IborCapletFloorletPeriodAmounts forwardRates(ResolvedIborCapFloor capFloor, RatesProvider ratesProvider)
Calculates the forward rates for each caplet/floorlet of the Ibor cap/floor.- Parameters:
capFloor
- the Ibor cap/floorratesProvider
- the rates provider- Returns:
- the forward rates
-
impliedVolatilities
public IborCapletFloorletPeriodAmounts impliedVolatilities(ResolvedIborCapFloor capFloor, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the implied volatilities for each caplet/floorlet of the Ibor cap/floor.- Parameters:
capFloor
- the Ibor cap/floorratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the implied volatilities
-
-