public class DiscountingDsfTradePricer extends Object
This function provides the ability to price a ResolvedDsfTrade.
(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.
| Modifier and Type | Field and Description |
|---|---|
static DiscountingDsfTradePricer |
DEFAULT
Default implementation.
|
| Constructor and Description |
|---|
DiscountingDsfTradePricer(DiscountingDsfProductPricer productPricer)
Creates an instance.
|
| Modifier and Type | Method and 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.
|
public static final DiscountingDsfTradePricer DEFAULT
public DiscountingDsfTradePricer(DiscountingDsfProductPricer productPricer)
productPricer - the pricer for Dsfpublic double price(ResolvedDsfTrade trade, RatesProvider ratesProvider)
The price of the trade is the price on the valuation date.
trade - the traderatesProvider - the rates providerpublic PointSensitivities priceSensitivity(ResolvedDsfTrade trade, RatesProvider ratesProvider)
The price sensitivity of the product is the sensitivity of the price to the underlying curves.
trade - the traderatesProvider - the rates providerpublic CurrencyAmount presentValue(ResolvedDsfTrade trade, RatesProvider ratesProvider, double lastSettlementPrice)
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.
trade - the traderatesProvider - the rates providerlastSettlementPrice - the last settlement price used for margining, in decimal formpublic PointSensitivities presentValueSensitivity(ResolvedDsfTrade trade, RatesProvider ratesProvider)
The present value sensitivity of the trade is the sensitivity of the present value to the underlying curves.
trade - the traderatesProvider - the rates providerpublic MultiCurrencyAmount currencyExposure(ResolvedDsfTrade trade, RatesProvider ratesProvider, double lastSettlementPrice)
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.
trade - the traderatesProvider - the rates providerlastSettlementPrice - the last settlement price used for margining, in decimal formCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.