Package com.opengamma.strata.pricer.fx
Class DiscountingFxNdfTradePricer
- java.lang.Object
-
- com.opengamma.strata.pricer.fx.DiscountingFxNdfTradePricer
-
public class DiscountingFxNdfTradePricer extends Object
Pricer for FX non-deliverable forward (NDF) trades.This provides the ability to price an
ResolvedFxNdfTrade
. The product is priced using forward curves for the currency pair.
-
-
Field Summary
Fields Modifier and Type Field Description static DiscountingFxNdfTradePricer
DEFAULT
Default implementation.
-
Constructor Summary
Constructors Constructor Description DiscountingFxNdfTradePricer(DiscountingFxNdfProductPricer productPricer)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Field Detail
-
DEFAULT
public static final DiscountingFxNdfTradePricer DEFAULT
Default implementation.
-
-
Constructor Detail
-
DiscountingFxNdfTradePricer
public DiscountingFxNdfTradePricer(DiscountingFxNdfProductPricer productPricer)
Creates an instance.- Parameters:
productPricer
- the pricer forResolvedFxNdf
-
-
Method Detail
-
presentValue
public CurrencyAmount presentValue(ResolvedFxNdfTrade trade, RatesProvider provider)
Calculates the present value of the trade.The present value of the trade is the value on the valuation date. The present value is returned in the settlement currency.
- Parameters:
trade
- the tradeprovider
- the rates provider- Returns:
- the present value of the trade in the settlement currency
-
presentValueSensitivity
public PointSensitivities presentValueSensitivity(ResolvedFxNdfTrade trade, RatesProvider provider)
Calculates the present value curve sensitivity of the trade.The present value sensitivity of the trade is the sensitivity of the present value to the underlying curves.
- Parameters:
trade
- the tradeprovider
- the rates provider- Returns:
- the point sensitivity of the present value
-
currencyExposure
public MultiCurrencyAmount currencyExposure(ResolvedFxNdfTrade trade, RatesProvider provider)
Calculates the currency exposure by discounting each payment in its own currency.- Parameters:
trade
- the tradeprovider
- the rates provider- Returns:
- the currency exposure
-
currentCash
public CurrencyAmount currentCash(ResolvedFxNdfTrade trade, RatesProvider provider)
Calculates the current cash of the trade.- Parameters:
trade
- the tradeprovider
- the rates provider- Returns:
- the current cash of the trade in the settlement currency
-
forwardFxRate
public FxRate forwardFxRate(ResolvedFxNdfTrade trade, RatesProvider provider)
Calculates the forward exchange rate.- Parameters:
trade
- the tradeprovider
- the rates provider- Returns:
- the forward rate
-
-