Class VolatilityIborCapFloorLegPricer
- java.lang.Object
-
- com.opengamma.strata.pricer.capfloor.VolatilityIborCapFloorLegPricer
-
- Direct Known Subclasses:
BlackIborCapFloorLegPricer
,NormalIborCapFloorLegPricer
,SabrIborCapFloorLegPricer
public class VolatilityIborCapFloorLegPricer extends Object
Pricer for cap/floor legs based on volatilities.This function provides the ability to price
ResolvedIborCapFloorLeg
. One must applyexpand()
in order to priceIborCapFloorLeg
.The pricing methodologies are defined in individual implementations of the volatilities,
IborCapletFloorletVolatilities
.
-
-
Field Summary
Fields Modifier and Type Field Description static VolatilityIborCapFloorLegPricer
DEFAULT
Default implementation.
-
Constructor Summary
Constructors Constructor Description VolatilityIborCapFloorLegPricer(VolatilityIborCapletFloorletPeriodPricer periodPricer)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CurrencyAmount
currentCash(ResolvedIborCapFloorLeg capFloorLeg, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the current cash of the Ibor cap/floor leg.IborCapletFloorletPeriodAmounts
forwardRates(ResolvedIborCapFloorLeg capFloorLeg, RatesProvider ratesProvider)
Calculates the forward rates for each caplet/floorlet of the Ibor cap/floor leg.VolatilityIborCapletFloorletPeriodPricer
getPeriodPricer()
Obtains the underlying period pricer.IborCapletFloorletPeriodAmounts
impliedVolatilities(ResolvedIborCapFloorLeg capFloorLeg, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the implied volatilities for each caplet/floorlet of the Ibor cap/floor leg.CurrencyAmount
presentValue(ResolvedIborCapFloorLeg capFloorLeg, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value of the Ibor cap/floor leg.IborCapletFloorletPeriodCurrencyAmounts
presentValueCapletFloorletPeriods(ResolvedIborCapFloorLeg capFloorLeg, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value for each caplet/floorlet of the Ibor cap/floor leg.CurrencyAmount
presentValueDelta(ResolvedIborCapFloorLeg capFloorLeg, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value delta of the Ibor cap/floor leg.CurrencyAmount
presentValueGamma(ResolvedIborCapFloorLeg capFloorLeg, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value gamma of the Ibor cap/floor leg.PointSensitivityBuilder
presentValueSensitivityModelParamsVolatility(ResolvedIborCapFloorLeg capFloorLeg, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value volatility sensitivity of the Ibor cap/floor leg.PointSensitivityBuilder
presentValueSensitivityRates(ResolvedIborCapFloorLeg capFloorLeg, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value rates sensitivity of the Ibor cap/floor leg.CurrencyAmount
presentValueTheta(ResolvedIborCapFloorLeg capFloorLeg, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value theta of the Ibor cap/floor leg.protected void
validate(RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
-
-
-
Field Detail
-
DEFAULT
public static final VolatilityIborCapFloorLegPricer DEFAULT
Default implementation.
-
-
Constructor Detail
-
VolatilityIborCapFloorLegPricer
public VolatilityIborCapFloorLegPricer(VolatilityIborCapletFloorletPeriodPricer periodPricer)
Creates an instance.- Parameters:
periodPricer
- the pricer forIborCapletFloorletPeriod
.
-
-
Method Detail
-
getPeriodPricer
public VolatilityIborCapletFloorletPeriodPricer getPeriodPricer()
Obtains the underlying period pricer.- Returns:
- the period pricer
-
presentValue
public CurrencyAmount presentValue(ResolvedIborCapFloorLeg capFloorLeg, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value of the Ibor cap/floor leg.The present value of the leg is the value on the valuation date. The result is returned using the payment currency of the leg.
- Parameters:
capFloorLeg
- the Ibor cap/floor legratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the present value
-
presentValueCapletFloorletPeriods
public IborCapletFloorletPeriodCurrencyAmounts presentValueCapletFloorletPeriods(ResolvedIborCapFloorLeg capFloorLeg, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value for each caplet/floorlet of the Ibor cap/floor leg.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.
- Parameters:
capFloorLeg
- the Ibor cap/floor legratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the present values
-
presentValueDelta
public CurrencyAmount presentValueDelta(ResolvedIborCapFloorLeg capFloorLeg, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value delta of the Ibor cap/floor leg.The present value delta of the leg is the sensitivity value on the valuation date. The result is returned using the payment currency of the leg.
- Parameters:
capFloorLeg
- the Ibor cap/floor legratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the present value delta
-
presentValueGamma
public CurrencyAmount presentValueGamma(ResolvedIborCapFloorLeg capFloorLeg, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value gamma of the Ibor cap/floor leg.The present value gamma of the leg is the sensitivity value on the valuation date. The result is returned using the payment currency of the leg.
- Parameters:
capFloorLeg
- the Ibor cap/floor legratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the present value gamma
-
presentValueTheta
public CurrencyAmount presentValueTheta(ResolvedIborCapFloorLeg capFloorLeg, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value theta of the Ibor cap/floor leg.The present value theta of the leg is the sensitivity value on the valuation date. The result is returned using the payment currency of the leg.
- Parameters:
capFloorLeg
- the Ibor cap/floor legratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the present value theta
-
presentValueSensitivityRates
public PointSensitivityBuilder presentValueSensitivityRates(ResolvedIborCapFloorLeg capFloorLeg, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value rates sensitivity of the Ibor cap/floor leg.The present value rates sensitivity of the leg is the sensitivity of the present value to the underlying curves.
- Parameters:
capFloorLeg
- the Ibor cap/floor legratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the present value curve sensitivity
-
presentValueSensitivityModelParamsVolatility
public PointSensitivityBuilder presentValueSensitivityModelParamsVolatility(ResolvedIborCapFloorLeg capFloorLeg, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value volatility sensitivity of the Ibor cap/floor leg.The present value volatility sensitivity of the leg is the sensitivity of the present value to the volatility values.
- Parameters:
capFloorLeg
- the Ibor cap/floor legratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the present value volatility sensitivity
-
currentCash
public CurrencyAmount currentCash(ResolvedIborCapFloorLeg capFloorLeg, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the current cash of the Ibor cap/floor leg.- Parameters:
capFloorLeg
- the Ibor cap/floor legratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the current cash
-
forwardRates
public IborCapletFloorletPeriodAmounts forwardRates(ResolvedIborCapFloorLeg capFloorLeg, RatesProvider ratesProvider)
Calculates the forward rates for each caplet/floorlet of the Ibor cap/floor leg.- Parameters:
capFloorLeg
- the Ibor cap/floor legratesProvider
- the rates provider- Returns:
- the forward rates
-
impliedVolatilities
public IborCapletFloorletPeriodAmounts impliedVolatilities(ResolvedIborCapFloorLeg capFloorLeg, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the implied volatilities for each caplet/floorlet of the Ibor cap/floor leg.- Parameters:
capFloorLeg
- the Ibor cap/floor legratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the implied volatilities
-
validate
protected void validate(RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
-
-