T - the type of periodpublic interface SwapPaymentPeriodPricer<T extends SwapPaymentPeriod>
This function provides the ability to price a SwapPaymentPeriod.
Implementations must be immutable and thread-safe functions.
| Modifier and Type | Method and Description |
|---|---|
double |
accruedInterest(T period,
RatesProvider provider)
Calculates the accrued interest since the last payment.
|
MultiCurrencyAmount |
currencyExposure(T period,
RatesProvider provider)
Calculates the currency exposure of a single payment period.
|
double |
currentCash(T period,
RatesProvider provider)
Calculates the current cash of a single payment period.
|
void |
explainPresentValue(T period,
RatesProvider provider,
ExplainMapBuilder builder)
Explains the present value of a single payment period.
|
double |
forecastValue(T period,
RatesProvider provider)
Calculates the forecast value of a single payment period.
|
PointSensitivityBuilder |
forecastValueSensitivity(T period,
RatesProvider provider)
Calculates the forecast value sensitivity of a single payment period.
|
double |
presentValue(T period,
RatesProvider provider)
Calculates the present value of a single payment period.
|
PointSensitivityBuilder |
presentValueSensitivity(T period,
RatesProvider provider)
Calculates the present value sensitivity of a single payment period.
|
double |
pvbp(T period,
RatesProvider provider)
Calculates the present value of a basis point of a period.
|
PointSensitivityBuilder |
pvbpSensitivity(T period,
RatesProvider provider)
Calculates the present value of a basis point sensitivity of a single payment period.
|
static SwapPaymentPeriodPricer<SwapPaymentPeriod> |
standard()
Returns the standard instance of the function.
|
static SwapPaymentPeriodPricer<SwapPaymentPeriod> standard()
Use this method to avoid a direct dependency on the implementation.
double presentValue(T period, RatesProvider provider)
The amount is expressed in the currency of the period. This returns the value of the period with discounting.
The payment date of the period should not be in the past. The result of this method for payment dates in the past is undefined.
period - the periodprovider - the rates providerPointSensitivityBuilder presentValueSensitivity(T period, RatesProvider provider)
The present value sensitivity of the period is the sensitivity of the present value to the underlying curves.
period - the periodprovider - the rates providerdouble forecastValue(T period, RatesProvider provider)
The amount is expressed in the currency of the period. This returns the value of the period without discounting.
The payment date of the period should not be in the past. The result of this method for payment dates in the past is undefined.
period - the periodprovider - the rates providerPointSensitivityBuilder forecastValueSensitivity(T period, RatesProvider provider)
The forecast value sensitivity of the period is the sensitivity of the forecast value to the underlying curves.
period - the periodprovider - the rates providerdouble pvbp(T period, RatesProvider provider)
This calculate the amount by which, to the first order, the period present value changes for a change of the rate defining the payment period. For known amount payments for which there is rate, the value is 0. In absence of compounding on the period, this measure is equivalent to the traditional PVBP.
period - the periodprovider - the rates providerPointSensitivityBuilder pvbpSensitivity(T period, RatesProvider provider)
This calculate the sensitivity of the present value of a basis point (pvbp) quantity to the underlying curves.
period - the periodprovider - the rates providerdouble accruedInterest(T period, RatesProvider provider)
This calculates the interest that has accrued between the start of the period and the valuation date. Discounting is not applied. The amount is expressed in the currency of the period. It is intended that this method is called only with the period where the valuation date is after the start date and before or equal to the end date.
period - the periodprovider - the rates providervoid explainPresentValue(T period, RatesProvider provider, ExplainMapBuilder builder)
This adds information to the ExplainMapBuilder to aid understanding of the calculation.
period - the periodprovider - the rates providerbuilder - the builder to populateMultiCurrencyAmount currencyExposure(T period, RatesProvider provider)
period - the periodprovider - the rates providerdouble currentCash(T period, RatesProvider provider)
period - the periodprovider - the rates providerCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.