## Interface SwapPaymentEventPricer<T extends SwapPaymentEvent>

• Type Parameters:
T - the type of event
All Known Implementing Classes:
DiscountingFxResetNotionalExchangePricer, DiscountingNotionalExchangePricer, DispatchingSwapPaymentEventPricer

public interface SwapPaymentEventPricer<T extends SwapPaymentEvent>
Pricer for payment events.

This function provides the ability to price a SwapPaymentEvent.

Implementations must be immutable and thread-safe functions.

• ### Method Summary

All Methods
Modifier and Type Method Description
MultiCurrencyAmount currencyExposure​(T event, RatesProvider provider)
Calculates the currency exposure of a single payment event.
double currentCash​(T event, RatesProvider provider)
Calculates the current cash of a single payment event.
void explainPresentValue​(T event, RatesProvider provider, ExplainMapBuilder builder)
Explains the present value of a single payment event.
double forecastValue​(T event, RatesProvider provider)
Calculates the forecast value of a single payment event.
PointSensitivityBuilder forecastValueSensitivity​(T event, RatesProvider provider)
Calculates the forecast value sensitivity of a single payment event.
double presentValue​(T event, RatesProvider provider)
Calculates the present value of a single payment event.
PointSensitivityBuilder presentValueSensitivity​(T event, RatesProvider provider)
Calculates the present value sensitivity of a single payment event.
static SwapPaymentEventPricer<SwapPaymentEvent> standard()
Returns the standard instance of the function.
• ### Method Detail

• #### standard

static SwapPaymentEventPricer<SwapPaymentEvent> standard()
Returns the standard instance of the function.

Use this method to avoid a direct dependency on the implementation.

Returns:
the payment event pricer
• #### presentValue

double presentValue​(T event,
RatesProvider provider)
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.

Parameters:
event - the event
provider - the rates provider
Returns:
the present value of the event
• #### presentValueSensitivity

PointSensitivityBuilder presentValueSensitivity​(T event,
RatesProvider provider)
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.

Parameters:
event - the event
provider - the rates provider
Returns:
the present value curve sensitivity of the event
• #### forecastValue

double forecastValue​(T event,
RatesProvider provider)
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.

Parameters:
event - the event
provider - the rates provider
Returns:
the forecast value of the event
• #### forecastValueSensitivity

PointSensitivityBuilder forecastValueSensitivity​(T event,
RatesProvider provider)
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.

Parameters:
event - the event
provider - the rates provider
Returns:
the forecast value curve sensitivity of the event
• #### explainPresentValue

void explainPresentValue​(T event,
RatesProvider provider,
ExplainMapBuilder builder)
Explains the present value of a single payment event.

This adds information to the ExplainMapBuilder to aid understanding of the calculation.

Parameters:
event - the event
provider - the rates provider
builder - the builder to populate
• #### currencyExposure

MultiCurrencyAmount currencyExposure​(T event,
RatesProvider provider)
Calculates the currency exposure of a single payment event.
Parameters:
event - the event
provider - the rates provider
Returns:
the currency exposure
• #### currentCash

double currentCash​(T event,
RatesProvider provider)
Calculates the current cash of a single payment event.
Parameters:
event - the event
provider - the rates provider
Returns:
the current cash