public class DispatchingSwapPaymentEventPricer extends Object implements SwapPaymentEventPricer<SwapPaymentEvent>
Dispatches the request to the correct implementation.
| Modifier and Type | Field and Description |
|---|---|
static DispatchingSwapPaymentEventPricer |
DEFAULT
Default implementation.
|
| Constructor and Description |
|---|
DispatchingSwapPaymentEventPricer(SwapPaymentEventPricer<NotionalExchange> notionalExchangePricer,
SwapPaymentEventPricer<FxResetNotionalExchange> fxResetNotionalExchangePricer)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
MultiCurrencyAmount |
currencyExposure(SwapPaymentEvent paymentEvent,
RatesProvider provider)
Calculates the currency exposure of a single payment event.
|
double |
currentCash(SwapPaymentEvent paymentEvent,
RatesProvider provider)
Calculates the current cash of a single payment event.
|
void |
explainPresentValue(SwapPaymentEvent paymentEvent,
RatesProvider provider,
ExplainMapBuilder builder)
Explains the present value of a single payment event.
|
double |
forecastValue(SwapPaymentEvent paymentEvent,
RatesProvider provider)
Calculates the forecast value of a single payment event.
|
PointSensitivityBuilder |
forecastValueSensitivity(SwapPaymentEvent paymentEvent,
RatesProvider provider)
Calculates the forecast value sensitivity of a single payment event.
|
double |
presentValue(SwapPaymentEvent paymentEvent,
RatesProvider provider)
Calculates the present value of a single payment event.
|
PointSensitivityBuilder |
presentValueSensitivity(SwapPaymentEvent paymentEvent,
RatesProvider provider)
Calculates the present value sensitivity of a single payment event.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitstandardpublic static final DispatchingSwapPaymentEventPricer DEFAULT
public DispatchingSwapPaymentEventPricer(SwapPaymentEventPricer<NotionalExchange> notionalExchangePricer, SwapPaymentEventPricer<FxResetNotionalExchange> fxResetNotionalExchangePricer)
notionalExchangePricer - the pricer for NotionalExchangefxResetNotionalExchangePricer - the pricer for FxResetNotionalExchangepublic double presentValue(SwapPaymentEvent paymentEvent, RatesProvider provider)
SwapPaymentEventPricerThe 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.
presentValue in interface SwapPaymentEventPricer<SwapPaymentEvent>paymentEvent - the eventprovider - the rates providerpublic PointSensitivityBuilder presentValueSensitivity(SwapPaymentEvent paymentEvent, RatesProvider provider)
SwapPaymentEventPricerThe present value sensitivity of the event is the sensitivity of the present value to the underlying curves.
presentValueSensitivity in interface SwapPaymentEventPricer<SwapPaymentEvent>paymentEvent - the eventprovider - the rates providerpublic double forecastValue(SwapPaymentEvent paymentEvent, RatesProvider provider)
SwapPaymentEventPricerThe 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.
forecastValue in interface SwapPaymentEventPricer<SwapPaymentEvent>paymentEvent - the eventprovider - the rates providerpublic PointSensitivityBuilder forecastValueSensitivity(SwapPaymentEvent paymentEvent, RatesProvider provider)
SwapPaymentEventPricerThe forecast value sensitivity of the event is the sensitivity of the forecast value to the underlying curves.
forecastValueSensitivity in interface SwapPaymentEventPricer<SwapPaymentEvent>paymentEvent - the eventprovider - the rates providerpublic void explainPresentValue(SwapPaymentEvent paymentEvent, RatesProvider provider, ExplainMapBuilder builder)
SwapPaymentEventPricer
This adds information to the ExplainMapBuilder to aid understanding of the calculation.
explainPresentValue in interface SwapPaymentEventPricer<SwapPaymentEvent>paymentEvent - the eventprovider - the rates providerbuilder - the builder to populatepublic MultiCurrencyAmount currencyExposure(SwapPaymentEvent paymentEvent, RatesProvider provider)
SwapPaymentEventPricercurrencyExposure in interface SwapPaymentEventPricer<SwapPaymentEvent>paymentEvent - the eventprovider - the rates providerpublic double currentCash(SwapPaymentEvent paymentEvent, RatesProvider provider)
SwapPaymentEventPricercurrentCash in interface SwapPaymentEventPricer<SwapPaymentEvent>paymentEvent - the eventprovider - the rates providerCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.