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 DiscountingNotionalExchangePricerDEFAULTDefault 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 MultiCurrencyAmountcurrencyExposure(NotionalExchange event, RatesProvider provider)Calculates the currency exposure of a single payment event.doublecurrentCash(NotionalExchange event, RatesProvider provider)Calculates the current cash of a single payment event.voidexplainPresentValue(NotionalExchange event, RatesProvider provider, ExplainMapBuilder builder)Explains the present value of a single payment event.doubleforecastValue(NotionalExchange event, RatesProvider provider)Calculates the forecast value of a single payment event.PointSensitivityBuilderforecastValueSensitivity(NotionalExchange event, RatesProvider provider)Calculates the forecast value sensitivity of a single payment event.doublepresentValue(NotionalExchange event, RatesProvider provider)Calculates the present value of a single payment event.PointSensitivityBuilderpresentValueSensitivity(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:SwapPaymentEventPricerCalculates 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:
presentValuein 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:SwapPaymentEventPricerCalculates 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:
presentValueSensitivityin 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:SwapPaymentEventPricerCalculates 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:
forecastValuein 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:SwapPaymentEventPricerCalculates 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:
forecastValueSensitivityin 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:SwapPaymentEventPricerExplains the present value of a single payment event.This adds information to the
ExplainMapBuilderto aid understanding of the calculation.- Specified by:
explainPresentValuein 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:SwapPaymentEventPricerCalculates the currency exposure of a single payment event.- Specified by:
currencyExposurein 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:SwapPaymentEventPricerCalculates the current cash of a single payment event.- Specified by:
currentCashin interfaceSwapPaymentEventPricer<NotionalExchange>- Parameters:
event- the eventprovider- the rates provider- Returns:
- the current cash
-
-