public class DiscountingFxSingleProductPricer extends Object
This provides the ability to price an ResolvedFxSingle.
| Modifier and Type | Field and Description |
|---|---|
static DiscountingFxSingleProductPricer |
DEFAULT
Default implementation.
|
| Constructor and Description |
|---|
DiscountingFxSingleProductPricer(DiscountingPaymentPricer paymentPricer)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
MultiCurrencyAmount |
currencyExposure(ResolvedFxSingle product,
RatesProvider provider)
Calculates the currency exposure by discounting each payment in its own currency.
|
MultiCurrencyAmount |
currentCash(ResolvedFxSingle fx,
LocalDate valuationDate)
Calculates the current cash.
|
FxRate |
forwardFxRate(ResolvedFxSingle fx,
RatesProvider provider)
Calculates the forward exchange rate.
|
PointSensitivityBuilder |
forwardFxRatePointSensitivity(ResolvedFxSingle fx,
RatesProvider provider)
Calculates the forward exchange rate point sensitivity.
|
double |
forwardFxRateSpotSensitivity(ResolvedFxSingle fx,
RatesProvider provider)
Calculates the sensitivity of the forward exchange rate to the spot rate.
|
double |
parSpread(ResolvedFxSingle fx,
RatesProvider provider)
Calculates the par spread.
|
MultiCurrencyAmount |
presentValue(ResolvedFxSingle fx,
RatesProvider provider)
Calculates the present value of the FX product by discounting each payment in its own currency.
|
PointSensitivities |
presentValueSensitivity(ResolvedFxSingle fx,
RatesProvider provider)
Calculates the present value curve sensitivity of the FX product.
|
public static final DiscountingFxSingleProductPricer DEFAULT
public DiscountingFxSingleProductPricer(DiscountingPaymentPricer paymentPricer)
paymentPricer - the pricer for Paymentpublic MultiCurrencyAmount presentValue(ResolvedFxSingle fx, RatesProvider provider)
fx - the productprovider - the rates providerpublic PointSensitivities presentValueSensitivity(ResolvedFxSingle fx, RatesProvider provider)
The present value sensitivity of the product is the sensitivity of the present value to the underlying curves.
fx - the productprovider - the rates providerpublic double parSpread(ResolvedFxSingle fx, RatesProvider provider)
This is the spread that should be added to the FX points to have a zero value.
fx - the productprovider - the rates providerpublic MultiCurrencyAmount currencyExposure(ResolvedFxSingle product, RatesProvider provider)
product - the productprovider - the rates providerpublic MultiCurrencyAmount currentCash(ResolvedFxSingle fx, LocalDate valuationDate)
fx - the productvaluationDate - the valuation datepublic FxRate forwardFxRate(ResolvedFxSingle fx, RatesProvider provider)
fx - the productprovider - the rates providerpublic PointSensitivityBuilder forwardFxRatePointSensitivity(ResolvedFxSingle fx, RatesProvider provider)
The returned value is based on the direction of the FX product.
fx - the productprovider - the rates providerpublic double forwardFxRateSpotSensitivity(ResolvedFxSingle fx, RatesProvider provider)
The returned value is based on the direction of the FX product.
fx - the productprovider - the rates providerCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.