public class ForwardOvernightCompoundedRateComputationFn extends Object implements RateComputationFn<OvernightCompoundedRateComputation>
Rates that are already fixed are retrieved from the time series of the RatesProvider
.
Rates that are in the future and not in the cut-off period are computed as unique forward rate in the full future period.
Rates that are in the cut-off period (already fixed or forward) are compounded.
Modifier and Type | Field and Description |
---|---|
static ForwardOvernightCompoundedRateComputationFn |
DEFAULT
Default implementation.
|
Constructor and Description |
---|
ForwardOvernightCompoundedRateComputationFn()
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
double |
explainRate(OvernightCompoundedRateComputation computation,
LocalDate startDate,
LocalDate endDate,
RatesProvider provider,
ExplainMapBuilder builder)
Explains the calculation of the applicable rate.
|
double |
rate(OvernightCompoundedRateComputation computation,
LocalDate startDate,
LocalDate endDate,
RatesProvider provider)
Determines the applicable rate for the computation.
|
PointSensitivityBuilder |
rateSensitivity(OvernightCompoundedRateComputation 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, wait
standard
public static final ForwardOvernightCompoundedRateComputationFn DEFAULT
public ForwardOvernightCompoundedRateComputationFn()
public double rate(OvernightCompoundedRateComputation 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<OvernightCompoundedRateComputation>
computation
- the computation definitionstartDate
- the start date of the accrual periodendDate
- the end date of the accrual periodprovider
- the rates providerpublic PointSensitivityBuilder rateSensitivity(OvernightCompoundedRateComputation computation, LocalDate startDate, LocalDate endDate, RatesProvider provider)
RateComputationFn
This returns a sensitivity instance referring to the curves used to determine each forward rate.
rateSensitivity
in interface RateComputationFn<OvernightCompoundedRateComputation>
computation
- the computation definitionstartDate
- the start date of the accrual periodendDate
- the end date of the accrual periodprovider
- the rates providerpublic double explainRate(OvernightCompoundedRateComputation 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<OvernightCompoundedRateComputation>
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.