Class DiscountingNotionalExchangePricer
- java.lang.Object
-
- com.opengamma.strata.pricer.impl.swap.DiscountingNotionalExchangePricer
-
- All Implemented Interfaces:
SwapPaymentEventPricer<NotionalExchange>
public class DiscountingNotionalExchangePricer extends Object implements SwapPaymentEventPricer<NotionalExchange>
Pricer implementation for the exchange of notionals.The notional exchange is priced by discounting the value of the exchange.
-
-
Field Summary
Fields Modifier and Type Field Description static DiscountingNotionalExchangePricer
DEFAULT
Default implementation.
-
Constructor Summary
Constructors Constructor Description DiscountingNotionalExchangePricer(DiscountingPaymentPricer paymentPricer)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiCurrencyAmount
currencyExposure(NotionalExchange event, RatesProvider provider)
Calculates the currency exposure of a single payment event.double
currentCash(NotionalExchange event, RatesProvider provider)
Calculates the current cash of a single payment event.void
explainPresentValue(NotionalExchange event, RatesProvider provider, ExplainMapBuilder builder)
Explains the present value of a single payment event.double
forecastValue(NotionalExchange event, RatesProvider provider)
Calculates the forecast value of a single payment event.PointSensitivityBuilder
forecastValueSensitivity(NotionalExchange event, RatesProvider provider)
Calculates the forecast value sensitivity of a single payment event.double
presentValue(NotionalExchange event, RatesProvider provider)
Calculates the present value of a single payment event.PointSensitivityBuilder
presentValueSensitivity(NotionalExchange event, RatesProvider provider)
Calculates the present value sensitivity of a single payment event.
-
-
-
Field Detail
-
DEFAULT
public static final DiscountingNotionalExchangePricer DEFAULT
Default implementation.
-
-
Constructor Detail
-
DiscountingNotionalExchangePricer
public DiscountingNotionalExchangePricer(DiscountingPaymentPricer paymentPricer)
Creates an instance.- Parameters:
paymentPricer
- the pricer forPayment
-
-
Method Detail
-
presentValue
public double presentValue(NotionalExchange 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<NotionalExchange>
- Parameters:
event
- the eventprovider
- the rates provider- Returns:
- the present value of the event
-
presentValueSensitivity
public PointSensitivityBuilder presentValueSensitivity(NotionalExchange 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<NotionalExchange>
- Parameters:
event
- the eventprovider
- the rates provider- Returns:
- the present value curve sensitivity of the event
-
forecastValue
public double forecastValue(NotionalExchange 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<NotionalExchange>
- Parameters:
event
- the eventprovider
- the rates provider- Returns:
- the forecast value of the event
-
forecastValueSensitivity
public PointSensitivityBuilder forecastValueSensitivity(NotionalExchange 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<NotionalExchange>
- Parameters:
event
- the eventprovider
- the rates provider- Returns:
- the forecast value curve sensitivity of the event
-
explainPresentValue
public void explainPresentValue(NotionalExchange 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<NotionalExchange>
- Parameters:
event
- the eventprovider
- the rates providerbuilder
- the builder to populate
-
currencyExposure
public MultiCurrencyAmount currencyExposure(NotionalExchange event, RatesProvider provider)
Description copied from interface:SwapPaymentEventPricer
Calculates the currency exposure of a single payment event.- Specified by:
currencyExposure
in interfaceSwapPaymentEventPricer<NotionalExchange>
- Parameters:
event
- the eventprovider
- the rates provider- Returns:
- the currency exposure
-
currentCash
public double currentCash(NotionalExchange event, RatesProvider provider)
Description copied from interface:SwapPaymentEventPricer
Calculates the current cash of a single payment event.- Specified by:
currentCash
in interfaceSwapPaymentEventPricer<NotionalExchange>
- Parameters:
event
- the eventprovider
- the rates provider- Returns:
- the current cash
-
-