public class DiscountingCapitalIndexedBondPaymentPeriodPricer extends Object
This pricer performs discounting of CapitalIndexedBondPaymentPeriod.
| Modifier and Type | Field and Description |
|---|---|
static DiscountingCapitalIndexedBondPaymentPeriodPricer |
DEFAULT
Default implementation.
|
| Constructor and Description |
|---|
DiscountingCapitalIndexedBondPaymentPeriodPricer(RateComputationFn<RateComputation> rateComputationFn)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
explainPresentValue(CapitalIndexedBondPaymentPeriod period,
RatesProvider ratesProvider,
IssuerCurveDiscountFactors issuerDiscountFactors,
ExplainMapBuilder builder)
Explains the present value of a single payment period.
|
void |
explainPresentValueWithZSpread(CapitalIndexedBondPaymentPeriod period,
RatesProvider ratesProvider,
IssuerCurveDiscountFactors issuerDiscountFactors,
ExplainMapBuilder builder,
double zSpread,
CompoundedRateType compoundedRateType,
int periodsPerYear)
Explains the present value of a single payment period with z-spread.
|
double |
forecastValue(CapitalIndexedBondPaymentPeriod period,
RatesProvider ratesProvider)
Calculates the forecast value of a single payment period.
|
PointSensitivityBuilder |
forecastValueSensitivity(CapitalIndexedBondPaymentPeriod period,
RatesProvider ratesProvider)
Calculates the forecast value sensitivity of a single payment period.
|
RateComputationFn<RateComputation> |
getRateComputationFn()
Obtains the rate computation function.
|
double |
presentValue(CapitalIndexedBondPaymentPeriod period,
RatesProvider ratesProvider,
IssuerCurveDiscountFactors issuerDiscountFactors)
Calculates the present value of a single payment period.
|
PointSensitivityBuilder |
presentValueSensitivity(CapitalIndexedBondPaymentPeriod period,
RatesProvider ratesProvider,
IssuerCurveDiscountFactors issuerDiscountFactors)
Calculates the present value sensitivity of a single payment period.
|
PointSensitivityBuilder |
presentValueSensitivityWithZSpread(CapitalIndexedBondPaymentPeriod period,
RatesProvider ratesProvider,
IssuerCurveDiscountFactors issuerDiscountFactors,
double zSpread,
CompoundedRateType compoundedRateType,
int periodsPerYear)
Calculates the present value sensitivity of a single payment period with z-spread.
|
double |
presentValueWithZSpread(CapitalIndexedBondPaymentPeriod period,
RatesProvider ratesProvider,
IssuerCurveDiscountFactors issuerDiscountFactors,
double zSpread,
CompoundedRateType compoundedRateType,
int periodsPerYear)
Calculates the present value of a single payment period with z-spread.
|
public static final DiscountingCapitalIndexedBondPaymentPeriodPricer DEFAULT
public DiscountingCapitalIndexedBondPaymentPeriodPricer(RateComputationFn<RateComputation> rateComputationFn)
rateComputationFn - the rate computation functionpublic RateComputationFn<RateComputation> getRateComputationFn()
public double presentValue(CapitalIndexedBondPaymentPeriod period, RatesProvider ratesProvider, IssuerCurveDiscountFactors issuerDiscountFactors)
This returns the value of the period with discounting. If the payment date of the period is in the past, zero is returned.
period - the period to priceratesProvider - the rates provider, used to determine price index valuesissuerDiscountFactors - the discount factor providerpublic double presentValueWithZSpread(CapitalIndexedBondPaymentPeriod period, RatesProvider ratesProvider, IssuerCurveDiscountFactors issuerDiscountFactors, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
This returns the value of the period with discounting. If the payment date of the period is in the past, zero is returned.
period - the period to priceratesProvider - the rates provider, used to determine price index valuesissuerDiscountFactors - the discount factor providerzSpread - the z-spreadcompoundedRateType - the compounded rate typeperiodsPerYear - the number of periods per yearpublic double forecastValue(CapitalIndexedBondPaymentPeriod period, RatesProvider ratesProvider)
period - the period to priceratesProvider - the rates provider, used to determine price index valuespublic PointSensitivityBuilder presentValueSensitivity(CapitalIndexedBondPaymentPeriod period, RatesProvider ratesProvider, IssuerCurveDiscountFactors issuerDiscountFactors)
The present value sensitivity of the period is the sensitivity of the present value to the underlying curves.
period - the period to priceratesProvider - the rates provider, used to determine price index valuesissuerDiscountFactors - the discount factor providerpublic PointSensitivityBuilder presentValueSensitivityWithZSpread(CapitalIndexedBondPaymentPeriod period, RatesProvider ratesProvider, IssuerCurveDiscountFactors issuerDiscountFactors, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
The present value sensitivity of the period is the sensitivity of the present value to the underlying curves.
period - the period to priceratesProvider - the rates provider, used to determine price index valuesissuerDiscountFactors - the discount factor providerzSpread - the z-spreadcompoundedRateType - the compounded rate typeperiodsPerYear - the number of periods per yearpublic PointSensitivityBuilder forecastValueSensitivity(CapitalIndexedBondPaymentPeriod period, RatesProvider ratesProvider)
The forecast value sensitivity of the period is the sensitivity of the present value to the underlying curves.
period - the period to priceratesProvider - the rates provider, used to determine price index valuespublic void explainPresentValue(CapitalIndexedBondPaymentPeriod period, RatesProvider ratesProvider, IssuerCurveDiscountFactors issuerDiscountFactors, ExplainMapBuilder builder)
This adds information to the ExplainMapBuilder to aid understanding of the calculation.
period - the period to priceratesProvider - the rates provider, used to determine price index valuesissuerDiscountFactors - the discount factor providerbuilder - the builder to populatepublic void explainPresentValueWithZSpread(CapitalIndexedBondPaymentPeriod period, RatesProvider ratesProvider, IssuerCurveDiscountFactors issuerDiscountFactors, ExplainMapBuilder builder, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
This adds information to the ExplainMapBuilder to aid understanding of the calculation.
period - the period to priceratesProvider - the rates provider, used to determine price index valuesissuerDiscountFactors - the discount factor providerzSpread - the z-spreadcompoundedRateType - the compounded rate typeperiodsPerYear - the number of periods per yearbuilder - the builder to populateCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.