public class DiscountingKnownAmountPaymentPeriodPricer extends Object implements SwapPaymentPeriodPricer<KnownAmountSwapPaymentPeriod>
This pricer performs discounting of the known amount.
| Modifier and Type | Field and Description |
|---|---|
static DiscountingKnownAmountPaymentPeriodPricer |
DEFAULT
Default implementation.
|
| Constructor and Description |
|---|
DiscountingKnownAmountPaymentPeriodPricer(DiscountingPaymentPricer paymentPricer)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
double |
accruedInterest(KnownAmountSwapPaymentPeriod period,
RatesProvider provider)
Calculates the accrued interest since the last payment.
|
MultiCurrencyAmount |
currencyExposure(KnownAmountSwapPaymentPeriod period,
RatesProvider provider)
Calculates the currency exposure of a single payment period.
|
double |
currentCash(KnownAmountSwapPaymentPeriod period,
RatesProvider provider)
Calculates the current cash of a single payment period.
|
void |
explainPresentValue(KnownAmountSwapPaymentPeriod period,
RatesProvider provider,
ExplainMapBuilder builder)
Explains the present value of a single payment period.
|
double |
forecastValue(KnownAmountSwapPaymentPeriod period,
RatesProvider provider)
Calculates the forecast value of a single payment period.
|
PointSensitivityBuilder |
forecastValueSensitivity(KnownAmountSwapPaymentPeriod period,
RatesProvider provider)
Calculates the forecast value sensitivity of a single payment period.
|
double |
presentValue(KnownAmountSwapPaymentPeriod period,
RatesProvider provider)
Calculates the present value of a single payment period.
|
PointSensitivityBuilder |
presentValueSensitivity(KnownAmountSwapPaymentPeriod period,
RatesProvider provider)
Calculates the present value sensitivity of a single payment period.
|
double |
pvbp(KnownAmountSwapPaymentPeriod period,
RatesProvider provider)
Calculates the present value of a basis point of a period.
|
PointSensitivityBuilder |
pvbpSensitivity(KnownAmountSwapPaymentPeriod period,
RatesProvider provider)
Calculates the present value of a basis point sensitivity of a single payment period.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitstandardpublic static final DiscountingKnownAmountPaymentPeriodPricer DEFAULT
public DiscountingKnownAmountPaymentPeriodPricer(DiscountingPaymentPricer paymentPricer)
paymentPricer - the payment pricerpublic double presentValue(KnownAmountSwapPaymentPeriod period, RatesProvider provider)
SwapPaymentPeriodPricerThe 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.
presentValue in interface SwapPaymentPeriodPricer<KnownAmountSwapPaymentPeriod>period - the periodprovider - the rates providerpublic double forecastValue(KnownAmountSwapPaymentPeriod period, RatesProvider provider)
SwapPaymentPeriodPricerThe 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.
forecastValue in interface SwapPaymentPeriodPricer<KnownAmountSwapPaymentPeriod>period - the periodprovider - the rates providerpublic double accruedInterest(KnownAmountSwapPaymentPeriod period, RatesProvider provider)
SwapPaymentPeriodPricerThis 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.
accruedInterest in interface SwapPaymentPeriodPricer<KnownAmountSwapPaymentPeriod>period - the periodprovider - the rates providerpublic double pvbp(KnownAmountSwapPaymentPeriod period, RatesProvider provider)
SwapPaymentPeriodPricerThis 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.
pvbp in interface SwapPaymentPeriodPricer<KnownAmountSwapPaymentPeriod>period - the periodprovider - the rates providerpublic PointSensitivityBuilder presentValueSensitivity(KnownAmountSwapPaymentPeriod period, RatesProvider provider)
SwapPaymentPeriodPricerThe present value sensitivity of the period is the sensitivity of the present value to the underlying curves.
presentValueSensitivity in interface SwapPaymentPeriodPricer<KnownAmountSwapPaymentPeriod>period - the periodprovider - the rates providerpublic PointSensitivityBuilder forecastValueSensitivity(KnownAmountSwapPaymentPeriod period, RatesProvider provider)
SwapPaymentPeriodPricerThe forecast value sensitivity of the period is the sensitivity of the forecast value to the underlying curves.
forecastValueSensitivity in interface SwapPaymentPeriodPricer<KnownAmountSwapPaymentPeriod>period - the periodprovider - the rates providerpublic PointSensitivityBuilder pvbpSensitivity(KnownAmountSwapPaymentPeriod period, RatesProvider provider)
SwapPaymentPeriodPricerThis calculate the sensitivity of the present value of a basis point (pvbp) quantity to the underlying curves.
pvbpSensitivity in interface SwapPaymentPeriodPricer<KnownAmountSwapPaymentPeriod>period - the periodprovider - the rates providerpublic void explainPresentValue(KnownAmountSwapPaymentPeriod period, RatesProvider provider, ExplainMapBuilder builder)
SwapPaymentPeriodPricer
This adds information to the ExplainMapBuilder to aid understanding of the calculation.
explainPresentValue in interface SwapPaymentPeriodPricer<KnownAmountSwapPaymentPeriod>period - the periodprovider - the rates providerbuilder - the builder to populatepublic MultiCurrencyAmount currencyExposure(KnownAmountSwapPaymentPeriod period, RatesProvider provider)
SwapPaymentPeriodPricercurrencyExposure in interface SwapPaymentPeriodPricer<KnownAmountSwapPaymentPeriod>period - the periodprovider - the rates providerpublic double currentCash(KnownAmountSwapPaymentPeriod period, RatesProvider provider)
SwapPaymentPeriodPricercurrentCash in interface SwapPaymentPeriodPricer<KnownAmountSwapPaymentPeriod>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.