Class DiscountingFxResetNotionalExchangePricer
- java.lang.Object
-
- com.opengamma.strata.pricer.impl.swap.DiscountingFxResetNotionalExchangePricer
-
- All Implemented Interfaces:
SwapPaymentEventPricer<FxResetNotionalExchange>
public class DiscountingFxResetNotionalExchangePricer extends Object implements SwapPaymentEventPricer<FxResetNotionalExchange>
Pricer implementation for the exchange of FX reset notionals.The FX reset notional exchange is priced by discounting the value of the exchange. The value of the exchange is calculated by performing an FX conversion on the amount.
-
-
Field Summary
Fields Modifier and Type Field Description static DiscountingFxResetNotionalExchangePricer
DEFAULT
Default implementation.
-
Constructor Summary
Constructors Constructor Description DiscountingFxResetNotionalExchangePricer()
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiCurrencyAmount
currencyExposure(FxResetNotionalExchange event, RatesProvider provider)
Calculates the currency exposure of a single payment event.double
currentCash(FxResetNotionalExchange event, RatesProvider provider)
Calculates the current cash of a single payment event.void
explainPresentValue(FxResetNotionalExchange event, RatesProvider provider, ExplainMapBuilder builder)
Explains the present value of a single payment event.double
forecastValue(FxResetNotionalExchange event, RatesProvider provider)
Calculates the forecast value of a single payment event.PointSensitivityBuilder
forecastValueSensitivity(FxResetNotionalExchange event, RatesProvider provider)
Calculates the forecast value sensitivity of a single payment event.double
presentValue(FxResetNotionalExchange event, RatesProvider provider)
Calculates the present value of a single payment event.PointSensitivityBuilder
presentValueSensitivity(FxResetNotionalExchange event, RatesProvider provider)
Calculates the present value sensitivity of a single payment event.
-
-
-
Field Detail
-
DEFAULT
public static final DiscountingFxResetNotionalExchangePricer DEFAULT
Default implementation.
-
-
Method Detail
-
presentValue
public double presentValue(FxResetNotionalExchange event, RatesProvider provider)
Description copied from interface:SwapPaymentEventPricer
Calculates the present value of a single payment event.The amount is expressed in the currency of the event. This returns the value of the event with discounting.
The payment date of the event should not be in the past. The result of this method for payment dates in the past is undefined.
- Specified by:
presentValue
in interfaceSwapPaymentEventPricer<FxResetNotionalExchange>
- Parameters:
event
- the eventprovider
- the rates provider- Returns:
- the present value of the event
-
presentValueSensitivity
public PointSensitivityBuilder presentValueSensitivity(FxResetNotionalExchange event, RatesProvider provider)
Description copied from interface:SwapPaymentEventPricer
Calculates the present value sensitivity of a single payment event.The present value sensitivity of the event is the sensitivity of the present value to the underlying curves.
- Specified by:
presentValueSensitivity
in interfaceSwapPaymentEventPricer<FxResetNotionalExchange>
- Parameters:
event
- the eventprovider
- the rates provider- Returns:
- the present value curve sensitivity of the event
-
forecastValue
public double forecastValue(FxResetNotionalExchange event, RatesProvider provider)
Description copied from interface:SwapPaymentEventPricer
Calculates the forecast value of a single payment event.The amount is expressed in the currency of the event. This returns the value of the event without discounting.
The payment date of the event should not be in the past. The result of this method for payment dates in the past is undefined.
- Specified by:
forecastValue
in interfaceSwapPaymentEventPricer<FxResetNotionalExchange>
- Parameters:
event
- the eventprovider
- the rates provider- Returns:
- the forecast value of the event
-
forecastValueSensitivity
public PointSensitivityBuilder forecastValueSensitivity(FxResetNotionalExchange event, RatesProvider provider)
Description copied from interface:SwapPaymentEventPricer
Calculates the forecast value sensitivity of a single payment event.The forecast value sensitivity of the event is the sensitivity of the forecast value to the underlying curves.
- Specified by:
forecastValueSensitivity
in interfaceSwapPaymentEventPricer<FxResetNotionalExchange>
- Parameters:
event
- the eventprovider
- the rates provider- Returns:
- the forecast value curve sensitivity of the event
-
explainPresentValue
public void explainPresentValue(FxResetNotionalExchange event, RatesProvider provider, ExplainMapBuilder builder)
Description copied from interface:SwapPaymentEventPricer
Explains the present value of a single payment event.This adds information to the
ExplainMapBuilder
to aid understanding of the calculation.- Specified by:
explainPresentValue
in interfaceSwapPaymentEventPricer<FxResetNotionalExchange>
- Parameters:
event
- the eventprovider
- the rates providerbuilder
- the builder to populate
-
currencyExposure
public MultiCurrencyAmount currencyExposure(FxResetNotionalExchange event, RatesProvider provider)
Description copied from interface:SwapPaymentEventPricer
Calculates the currency exposure of a single payment event.- Specified by:
currencyExposure
in interfaceSwapPaymentEventPricer<FxResetNotionalExchange>
- Parameters:
event
- the eventprovider
- the rates provider- Returns:
- the currency exposure
-
currentCash
public double currentCash(FxResetNotionalExchange event, RatesProvider provider)
Description copied from interface:SwapPaymentEventPricer
Calculates the current cash of a single payment event.- Specified by:
currentCash
in interfaceSwapPaymentEventPricer<FxResetNotionalExchange>
- Parameters:
event
- the eventprovider
- the rates provider- Returns:
- the current cash
-
-