Class HullWhiteIborFutureTradePricer
- java.lang.Object
-
- com.opengamma.strata.pricer.index.HullWhiteIborFutureTradePricer
-
public class HullWhiteIborFutureTradePricer extends Object
Pricer for for Ibor future trades.This function provides the ability to price a
IborFutureTrade
based on Hull-White one-factor model with piecewise constant volatility.Reference: Henrard M., Eurodollar Futures and Options: Convexity Adjustment in HJM One-Factor Model. March 2005. Available at http://ssrn.com/abstract=682343
Price
The price of an Ibor future is based on the interest rate of the underlying index. It is defined as(100 - percentRate)
.Strata uses decimal prices for Ibor futures in the trade model, pricers and market data. The decimal price is based on the decimal rate equivalent to the percentage. For example, a price of 99.32 implies an interest rate of 0.68% which is represented in Strata by 0.9932.
-
-
Field Summary
Fields Modifier and Type Field Description static HullWhiteIborFutureTradePricer
DEFAULT
Default implementation.
-
Constructor Summary
Constructors Constructor Description HullWhiteIborFutureTradePricer(HullWhiteIborFutureProductPricer productPricer)
Creates an instance.
-
Method Summary
-
-
-
Field Detail
-
DEFAULT
public static final HullWhiteIborFutureTradePricer DEFAULT
Default implementation.
-
-
Constructor Detail
-
HullWhiteIborFutureTradePricer
public HullWhiteIborFutureTradePricer(HullWhiteIborFutureProductPricer productPricer)
Creates an instance.- Parameters:
productPricer
- the pricer forIborFuture
-
-
Method Detail
-
price
public double price(ResolvedIborFutureTrade trade, RatesProvider ratesProvider, HullWhiteOneFactorPiecewiseConstantParametersProvider hwProvider)
Calculates the price of the Ibor future trade.The price of the trade is the price on the valuation date. The price is calculated using the Hull-White model.
- Parameters:
trade
- the traderatesProvider
- the rates providerhwProvider
- the Hull-White model parameter provider- Returns:
- the price of the trade, in decimal form
-
priceSensitivityRates
public PointSensitivities priceSensitivityRates(ResolvedIborFutureTrade trade, RatesProvider ratesProvider, HullWhiteOneFactorPiecewiseConstantParametersProvider hwProvider)
Calculates the price sensitivity of the Ibor future product.The price sensitivity of the product is the sensitivity of the price to the underlying curves.
- Parameters:
trade
- the traderatesProvider
- the rates providerhwProvider
- the Hull-White model parameter provider- Returns:
- the price curve sensitivity of the product
-
presentValue
public CurrencyAmount presentValue(ResolvedIborFutureTrade trade, RatesProvider ratesProvider, HullWhiteOneFactorPiecewiseConstantParametersProvider hwProvider, double lastSettlementPrice)
Calculates the present value of the Ibor future trade.The present value of the product is the value on the valuation date. The current price is calculated using the Hull-White model.
This method calculates based on the difference between the model price and the last settlement price, or the trade price if traded on the valuation date.
- Parameters:
trade
- the traderatesProvider
- the rates providerhwProvider
- the Hull-White model parameter providerlastSettlementPrice
- the last settlement price used for margining, in decimal form- Returns:
- the present value
-
presentValueSensitivityRates
public PointSensitivities presentValueSensitivityRates(ResolvedIborFutureTrade trade, RatesProvider ratesProvider, HullWhiteOneFactorPiecewiseConstantParametersProvider hwProvider)
Calculates the present value sensitivity of the Ibor future trade.The present value sensitivity of the trade is the sensitivity of the present value to the underlying curves.
- Parameters:
trade
- the traderatesProvider
- the rates providerhwProvider
- the Hull-White model parameter provider- Returns:
- the present value curve sensitivity of the trade
-
presentValueSensitivityModelParamsHullWhite
public DoubleArray presentValueSensitivityModelParamsHullWhite(ResolvedIborFutureTrade trade, RatesProvider ratesProvider, HullWhiteOneFactorPiecewiseConstantParametersProvider hwProvider)
Calculates the present value sensitivity to piecewise constant volatility parameters of the Hull-White model.- Parameters:
trade
- the trade to priceratesProvider
- the rates providerhwProvider
- the Hull-White model parameter provider- Returns:
- the present value parameter sensitivity of the trade
-
parSpread
public double parSpread(ResolvedIborFutureTrade trade, RatesProvider ratesProvider, HullWhiteOneFactorPiecewiseConstantParametersProvider hwProvider, double lastSettlementPrice)
Calculates the par spread of the Ibor future trade.The par spread is defined in the following way. When the reference price (or market quote) is increased by the par spread, the present value of the trade is zero. The current price is calculated using the Hull-White model.
This method calculates based on the difference between the model price and the last settlement price, or the trade price if traded on the valuation date.
- Parameters:
trade
- the traderatesProvider
- the rates providerhwProvider
- the Hull-White model parameter providerlastSettlementPrice
- the last settlement price used for margining, in decimal form- Returns:
- the par spread.
-
parSpreadSensitivityRates
public PointSensitivities parSpreadSensitivityRates(ResolvedIborFutureTrade trade, RatesProvider ratesProvider, HullWhiteOneFactorPiecewiseConstantParametersProvider hwProvider)
Calculates the par spread sensitivity of the Ibor future trade.The par spread sensitivity of the trade is the sensitivity of the par spread to the underlying curves.
- Parameters:
trade
- the traderatesProvider
- the rates providerhwProvider
- the Hull-White model parameter provider- Returns:
- the par spread curve sensitivity of the trade
-
currencyExposure
public MultiCurrencyAmount currencyExposure(ResolvedIborFutureTrade trade, RatesProvider provider, HullWhiteOneFactorPiecewiseConstantParametersProvider hwProvider, double lastSettlementPrice)
Calculates the currency exposure of the Ibor future trade.Since the Ibor future is based on a single currency, the trade is exposed to only this currency.
This method calculates based on the difference between the model price and the last settlement price, or the trade price if traded on the valuation date.
- Parameters:
trade
- the tradeprovider
- the rates providerhwProvider
- the Hull-White model parameter providerlastSettlementPrice
- the last settlement price used for margining, in decimal form- Returns:
- the currency exposure of the trade
-
-