public class DiscountingFxNdfTradePricer extends Object
This provides the ability to price an ResolvedFxNdfTrade
.
The product is priced using forward curves for the currency pair.
Modifier and Type | Field and Description |
---|---|
static DiscountingFxNdfTradePricer |
DEFAULT
Default implementation.
|
Constructor and Description |
---|
DiscountingFxNdfTradePricer(DiscountingFxNdfProductPricer productPricer)
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
MultiCurrencyAmount |
currencyExposure(ResolvedFxNdfTrade trade,
RatesProvider provider)
Calculates the currency exposure by discounting each payment in its own currency.
|
CurrencyAmount |
currentCash(ResolvedFxNdfTrade trade,
RatesProvider provider)
Calculates the current cash of the trade.
|
FxRate |
forwardFxRate(ResolvedFxNdfTrade trade,
RatesProvider provider)
Calculates the forward exchange rate.
|
CurrencyAmount |
presentValue(ResolvedFxNdfTrade trade,
RatesProvider provider)
Calculates the present value of the trade.
|
PointSensitivities |
presentValueSensitivity(ResolvedFxNdfTrade trade,
RatesProvider provider)
Calculates the present value curve sensitivity of the trade.
|
public static final DiscountingFxNdfTradePricer DEFAULT
public DiscountingFxNdfTradePricer(DiscountingFxNdfProductPricer productPricer)
productPricer
- the pricer for ResolvedFxNdf
public CurrencyAmount presentValue(ResolvedFxNdfTrade trade, RatesProvider provider)
The present value of the trade is the value on the valuation date. The present value is returned in the settlement currency.
trade
- the tradeprovider
- the rates providerpublic PointSensitivities presentValueSensitivity(ResolvedFxNdfTrade trade, RatesProvider provider)
The present value sensitivity of the trade is the sensitivity of the present value to the underlying curves.
trade
- the tradeprovider
- the rates providerpublic MultiCurrencyAmount currencyExposure(ResolvedFxNdfTrade trade, RatesProvider provider)
trade
- the tradeprovider
- the rates providerpublic CurrencyAmount currentCash(ResolvedFxNdfTrade trade, RatesProvider provider)
trade
- the tradeprovider
- the rates providerpublic FxRate forwardFxRate(ResolvedFxNdfTrade trade, RatesProvider provider)
trade
- the tradeprovider
- the rates providerCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.