Class DiscountingDsfTradePricer
 java.lang.Object

 com.opengamma.strata.pricer.dsf.DiscountingDsfTradePricer

public class DiscountingDsfTradePricer extends Object
Pricer implementation for Deliverable Swap Futures (DSFs).This function provides the ability to price a
ResolvedDsfTrade
.Price
The price of a DSF is based on the present value (NPV) of the underlying swap on the delivery date. For example, a price of 100.182 represents a present value of $100,182.00, if the notional is $100,000. This price can also be viewed as a percentage present value (100 + percentPv)
, or 0.182% in this example.Strata uses decimal prices for DSFs in the trade model, pricers and market data. The decimal price is based on the decimal multiplier equivalent to the implied percentage. Thus the market price of 100.182 is represented in Strata by 1.00182.


Field Summary
Fields Modifier and Type Field Description static DiscountingDsfTradePricer
DEFAULT
Default implementation.

Constructor Summary
Constructors Constructor Description DiscountingDsfTradePricer(DiscountingDsfProductPricer productPricer)
Creates an instance.

Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiCurrencyAmount
currencyExposure(ResolvedDsfTrade trade, RatesProvider ratesProvider, double lastSettlementPrice)
Calculates the currency exposure of the deliverable swap futures trade.CurrencyAmount
presentValue(ResolvedDsfTrade trade, RatesProvider ratesProvider, double lastSettlementPrice)
Calculates the present value of the deliverable swap futures trade.PointSensitivities
presentValueSensitivity(ResolvedDsfTrade trade, RatesProvider ratesProvider)
Calculates the present value sensitivity of the deliverable swap futures trade.double
price(ResolvedDsfTrade trade, RatesProvider ratesProvider)
Calculates the price of the underlying deliverable swap futures product.PointSensitivities
priceSensitivity(ResolvedDsfTrade trade, RatesProvider ratesProvider)
Calculates the price sensitivity of the deliverable swap futures product.



Field Detail

DEFAULT
public static final DiscountingDsfTradePricer DEFAULT
Default implementation.


Constructor Detail

DiscountingDsfTradePricer
public DiscountingDsfTradePricer(DiscountingDsfProductPricer productPricer)
Creates an instance. Parameters:
productPricer
 the pricer forDsf


Method Detail

price
public double price(ResolvedDsfTrade trade, RatesProvider ratesProvider)
Calculates the price of the underlying deliverable swap futures product.The price of the trade is the price on the valuation date.
 Parameters:
trade
 the traderatesProvider
 the rates provider Returns:
 the price of the trade, in decimal form

priceSensitivity
public PointSensitivities priceSensitivity(ResolvedDsfTrade trade, RatesProvider ratesProvider)
Calculates the price sensitivity of the deliverable swap futures product.The price sensitivity of the product is the sensitivity of the price to the underlying curves.
 Parameters:
trade
 the traderatesProvider
 the rates provider Returns:
 the price curve sensitivity of the trade

presentValue
public CurrencyAmount presentValue(ResolvedDsfTrade trade, RatesProvider ratesProvider, double lastSettlementPrice)
Calculates the present value of the deliverable swap futures trade.The present value of the product is the value on the valuation date. The current price is calculated using the discounting 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 providerlastSettlementPrice
 the last settlement price used for margining, in decimal form Returns:
 the present value

presentValueSensitivity
public PointSensitivities presentValueSensitivity(ResolvedDsfTrade trade, RatesProvider ratesProvider)
Calculates the present value sensitivity of the deliverable swap futures 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 provider Returns:
 the present value curve sensitivity of the trade

currencyExposure
public MultiCurrencyAmount currencyExposure(ResolvedDsfTrade trade, RatesProvider ratesProvider, double lastSettlementPrice)
Calculates the currency exposure of the deliverable swap futures trade.Since the deliverable swap futures is based on a single currency, the trade is exposed to only this currency. The current price is calculated using the discounting 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 providerlastSettlementPrice
 the last settlement price used for margining, in decimal form Returns:
 the currency exposure of the trade

