• java.lang.Object
• Direct Known Subclasses:
BlackIborCapFloorTradePricer, NormalIborCapFloorTradePricer, SabrIborCapFloorTradePricer

public class VolatilityIborCapFloorTradePricer
extends java.lang.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
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.
protected DiscountingPaymentPricer getPaymentPricer()
Gets the payment pricer.
MultiCurrencyAmount presentValue​(ResolvedIborCapFloorTrade trade, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value 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.
• Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• Field Detail

• DEFAULT

public static final VolatilityIborCapFloorTradePricer DEFAULT
Default implementation.
• Constructor Detail

public VolatilityIborCapFloorTradePricer​(VolatilityIborCapFloorProductPricer productPricer,
DiscountingPaymentPricer paymentPricer)
Creates an instance.
Parameters:
productPricer - the pricer for ResolvedIborCapFloor
paymentPricer - the pricer for Payment
• 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 trade
ratesProvider - the rates provider
volatilities - the volatilities
Returns:
the present value
• 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 trade
ratesProvider - the rates provider
volatilities - 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 trade
ratesProvider - the rates provider
volatilities - 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 trade
ratesProvider - the rates provider
volatilities - 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 trade
ratesProvider - the rates provider
volatilities - the volatilities
Returns:
the current cash