public class ForwardInflationInterpolatedRateComputationFn extends Object implements RateComputationFn<InflationInterpolatedRateComputation>
The rate computed by this instance is based on four observations of the index,
two relative to the accrual start date and two relative to the accrual end date.
The start index is the weighted average of the index values associated with the first two reference dates,
and the end index is derived from the index values on the last two reference dates.
Then the pay-off for a unit notional is (IndexEnd / IndexStart - 1).
| Modifier and Type | Field and Description |
|---|---|
static ForwardInflationInterpolatedRateComputationFn |
DEFAULT
Default instance.
|
| Constructor and Description |
|---|
ForwardInflationInterpolatedRateComputationFn()
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
double |
explainRate(InflationInterpolatedRateComputation computation,
LocalDate startDate,
LocalDate endDate,
RatesProvider provider,
ExplainMapBuilder builder)
Explains the calculation of the applicable rate.
|
double |
rate(InflationInterpolatedRateComputation computation,
LocalDate startDate,
LocalDate endDate,
RatesProvider provider)
Determines the applicable rate for the computation.
|
PointSensitivityBuilder |
rateSensitivity(InflationInterpolatedRateComputation computation,
LocalDate startDate,
LocalDate endDate,
RatesProvider provider)
Determines the point sensitivity for the rate computation.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitstandardpublic static final ForwardInflationInterpolatedRateComputationFn DEFAULT
public ForwardInflationInterpolatedRateComputationFn()
public double rate(InflationInterpolatedRateComputation computation, LocalDate startDate, LocalDate endDate, RatesProvider provider)
RateComputationFn
Each type of rate has specific rules, encapsulated in RateComputation.
The start date and end date refer to the accrual period. In many cases, this information is not necessary, however it does enable some implementations that would not otherwise be possible.
rate in interface RateComputationFn<InflationInterpolatedRateComputation>computation - the computation definitionstartDate - the start date of the accrual periodendDate - the end date of the accrual periodprovider - the rates providerpublic PointSensitivityBuilder rateSensitivity(InflationInterpolatedRateComputation computation, LocalDate startDate, LocalDate endDate, RatesProvider provider)
RateComputationFnThis returns a sensitivity instance referring to the curves used to determine each forward rate.
rateSensitivity in interface RateComputationFn<InflationInterpolatedRateComputation>computation - the computation definitionstartDate - the start date of the accrual periodendDate - the end date of the accrual periodprovider - the rates providerpublic double explainRate(InflationInterpolatedRateComputation computation, LocalDate startDate, LocalDate endDate, RatesProvider provider, ExplainMapBuilder builder)
RateComputationFn
This adds information to the ExplainMapBuilder to aid understanding of the computation.
The actual rate is also returned.
explainRate in interface RateComputationFn<InflationInterpolatedRateComputation>computation - the computation definitionstartDate - the start date of the accrual periodendDate - the end date of the accrual periodprovider - the rates providerbuilder - the builder to populateCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.