Class VolatilityIborCapFloorTradePricer
- java.lang.Object
-
- com.opengamma.strata.pricer.capfloor.VolatilityIborCapFloorTradePricer
-
- Direct Known Subclasses:
BlackIborCapFloorTradePricer
,NormalIborCapFloorTradePricer
,SabrIborCapFloorTradePricer
public class VolatilityIborCapFloorTradePricer extends Object
Pricer for cap/floor trades based on volatilities.This function provides the ability to price
IborCapFloorTrade
. The pricing methodologies are defined in individual implementations of the volatilities,IborCapletFloorletVolatilities
.Greeks of the underlying product are computed in the product pricer,
VolatilityIborCapFloorProductPricer
.
-
-
Field Summary
Fields Modifier and Type Field Description static VolatilityIborCapFloorTradePricer
DEFAULT
Default implementation.
-
Constructor Summary
Constructors Constructor Description VolatilityIborCapFloorTradePricer(VolatilityIborCapFloorProductPricer productPricer, DiscountingPaymentPricer paymentPricer)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiCurrencyAmount
currencyExposure(ResolvedIborCapFloorTrade trade, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the currency exposure of the Ibor cap/floor trade.MultiCurrencyAmount
currentCash(ResolvedIborCapFloorTrade trade, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the current cash of the Ibor cap/floor trade.IborCapletFloorletPeriodAmounts
forwardRates(ResolvedIborCapFloorTrade trade, RatesProvider ratesProvider)
Calculates the forward rates for each caplet/floorlet of the Ibor cap/floor trade.protected DiscountingPaymentPricer
getPaymentPricer()
Gets the payment pricer.IborCapletFloorletPeriodAmounts
impliedVolatilities(ResolvedIborCapFloorTrade trade, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the implied volatilities for each caplet/floorlet of the Ibor cap/floor trade.MultiCurrencyAmount
presentValue(ResolvedIborCapFloorTrade trade, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value of the Ibor cap/floor trade.IborCapletFloorletPeriodCurrencyAmounts
presentValueCapletFloorletPeriods(ResolvedIborCapFloorTrade trade, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value for each caplet/floorlet of the Ibor cap/floor trade.PointSensitivityBuilder
presentValueSensitivityModelParamsVolatility(ResolvedIborCapFloorTrade trade, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value volatility sensitivity of the Ibor cap/floor product.PointSensitivities
presentValueSensitivityRates(ResolvedIborCapFloorTrade trade, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value rates sensitivity of the Ibor cap/floor trade.
-
-
-
Field Detail
-
DEFAULT
public static final VolatilityIborCapFloorTradePricer DEFAULT
Default implementation.
-
-
Constructor Detail
-
VolatilityIborCapFloorTradePricer
public VolatilityIborCapFloorTradePricer(VolatilityIborCapFloorProductPricer productPricer, DiscountingPaymentPricer paymentPricer)
Creates an instance.- Parameters:
productPricer
- the pricer forResolvedIborCapFloor
paymentPricer
- the pricer forPayment
-
-
Method Detail
-
getPaymentPricer
protected DiscountingPaymentPricer getPaymentPricer()
Gets the payment pricer.- Returns:
- the payment pricer
-
presentValue
public MultiCurrencyAmount presentValue(ResolvedIborCapFloorTrade trade, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value of the Ibor cap/floor trade.The present value of the trade 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:
trade
- the Ibor cap/floor traderatesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the present value
-
presentValueCapletFloorletPeriods
public IborCapletFloorletPeriodCurrencyAmounts presentValueCapletFloorletPeriods(ResolvedIborCapFloorTrade trade, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value for each caplet/floorlet of the Ibor cap/floor trade.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 trade premium or for the pay leg if the cap/floor product has one.
- Parameters:
trade
- the Ibor cap/floor legratesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the present values
-
presentValueSensitivityRates
public PointSensitivities presentValueSensitivityRates(ResolvedIborCapFloorTrade trade, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value rates sensitivity of the Ibor cap/floor trade.The present value rates sensitivity of the trade is the sensitivity of the present value to the underlying curves.
- Parameters:
trade
- the Ibor cap/floor traderatesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the present value sensitivity
-
presentValueSensitivityModelParamsVolatility
public PointSensitivityBuilder presentValueSensitivityModelParamsVolatility(ResolvedIborCapFloorTrade trade, 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:
trade
- the Ibor cap/floor traderatesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the present value sensitivity
-
currencyExposure
public MultiCurrencyAmount currencyExposure(ResolvedIborCapFloorTrade trade, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the currency exposure of the Ibor cap/floor trade.- Parameters:
trade
- the Ibor cap/floor traderatesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the currency exposure
-
currentCash
public MultiCurrencyAmount currentCash(ResolvedIborCapFloorTrade trade, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the current cash of the Ibor cap/floor trade.- Parameters:
trade
- the Ibor cap/floor traderatesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the current cash
-
forwardRates
public IborCapletFloorletPeriodAmounts forwardRates(ResolvedIborCapFloorTrade trade, RatesProvider ratesProvider)
Calculates the forward rates for each caplet/floorlet of the Ibor cap/floor trade.- Parameters:
trade
- the Ibor cap/floor traderatesProvider
- the rates provider- Returns:
- the forward rates
-
impliedVolatilities
public IborCapletFloorletPeriodAmounts impliedVolatilities(ResolvedIborCapFloorTrade trade, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the implied volatilities for each caplet/floorlet of the Ibor cap/floor trade.- Parameters:
trade
- the Ibor cap/floor traderatesProvider
- the rates providervolatilities
- the volatilities- Returns:
- the implied volatilities
-
-