public class DiscountingFxSingleTradePricer extends Object
This provides the ability to price an ResolvedFxSingleTrade
.
Modifier and Type | Field and Description |
---|---|
static DiscountingFxSingleTradePricer |
DEFAULT
Default implementation.
|
Constructor and Description |
---|
DiscountingFxSingleTradePricer(DiscountingFxSingleProductPricer productPricer)
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
MultiCurrencyAmount |
currencyExposure(ResolvedFxSingleTrade trade,
RatesProvider provider)
Calculates the currency exposure by discounting each payment in its own currency.
|
MultiCurrencyAmount |
currentCash(ResolvedFxSingleTrade trade,
RatesProvider provider)
Calculates the current cash of the trade.
|
FxRate |
forwardFxRate(ResolvedFxSingleTrade trade,
RatesProvider provider)
Calculates the forward exchange rate.
|
PointSensitivities |
forwardFxRatePointSensitivity(ResolvedFxSingleTrade trade,
RatesProvider provider)
Calculates the forward exchange rate point sensitivity.
|
double |
forwardFxRateSpotSensitivity(ResolvedFxSingleTrade trade,
RatesProvider provider)
Calculates the sensitivity of the forward exchange rate to the spot rate.
|
double |
parSpread(ResolvedFxSingleTrade trade,
RatesProvider provider)
Calculates the par spread.
|
MultiCurrencyAmount |
presentValue(ResolvedFxSingleTrade trade,
RatesProvider provider)
Calculates the present value of the trade.
|
PointSensitivities |
presentValueSensitivity(ResolvedFxSingleTrade trade,
RatesProvider provider)
Calculates the present value curve sensitivity of the trade.
|
public static final DiscountingFxSingleTradePricer DEFAULT
public DiscountingFxSingleTradePricer(DiscountingFxSingleProductPricer productPricer)
productPricer
- the pricer for ResolvedFxSingle
public MultiCurrencyAmount presentValue(ResolvedFxSingleTrade 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(ResolvedFxSingleTrade 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 double parSpread(ResolvedFxSingleTrade trade, RatesProvider provider)
This is the spread that should be added to the FX points to have a zero value.
trade
- the tradeprovider
- the rates providerpublic MultiCurrencyAmount currencyExposure(ResolvedFxSingleTrade trade, RatesProvider provider)
trade
- the tradeprovider
- the rates providerpublic MultiCurrencyAmount currentCash(ResolvedFxSingleTrade trade, RatesProvider provider)
trade
- the tradeprovider
- the rates providerpublic FxRate forwardFxRate(ResolvedFxSingleTrade trade, RatesProvider provider)
trade
- the tradeprovider
- the rates providerpublic PointSensitivities forwardFxRatePointSensitivity(ResolvedFxSingleTrade trade, RatesProvider provider)
The returned value is based on the direction of the FX product.
trade
- the tradeprovider
- the rates providerpublic double forwardFxRateSpotSensitivity(ResolvedFxSingleTrade trade, RatesProvider provider)
The returned value is based on the direction of the FX product.
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.