Class ForwardIborInterpolatedRateComputationFn
- java.lang.Object
-
- com.opengamma.strata.pricer.impl.rate.ForwardIborInterpolatedRateComputationFn
-
- All Implemented Interfaces:
RateComputationFn<IborInterpolatedRateComputation>
public class ForwardIborInterpolatedRateComputationFn extends Object implements RateComputationFn<IborInterpolatedRateComputation>
Rate computation implementation for rate based on the weighted average of the fixing on a single date of two Ibor indices.The rate computation queries the rates from the
RatesProvider
and interpolates them. There is no convexity adjustment computed in this implementation.
-
-
Field Summary
Fields Modifier and Type Field Description static ForwardIborInterpolatedRateComputationFn
DEFAULT
Default instance.
-
Constructor Summary
Constructors Constructor Description ForwardIborInterpolatedRateComputationFn()
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
explainRate(IborInterpolatedRateComputation computation, LocalDate startDate, LocalDate endDate, RatesProvider provider, ExplainMapBuilder builder)
Explains the calculation of the applicable rate.double
rate(IborInterpolatedRateComputation computation, LocalDate startDate, LocalDate endDate, RatesProvider provider)
Determines the applicable rate for the computation.PointSensitivityBuilder
rateSensitivity(IborInterpolatedRateComputation computation, LocalDate startDate, LocalDate endDate, RatesProvider provider)
Determines the point sensitivity for the rate computation.
-
-
-
Field Detail
-
DEFAULT
public static final ForwardIborInterpolatedRateComputationFn DEFAULT
Default instance.
-
-
Method Detail
-
rate
public double rate(IborInterpolatedRateComputation computation, LocalDate startDate, LocalDate endDate, RatesProvider provider)
Description copied from interface:RateComputationFn
Determines the applicable rate for the computation.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.
- Specified by:
rate
in interfaceRateComputationFn<IborInterpolatedRateComputation>
- Parameters:
computation
- the computation definitionstartDate
- the start date of the accrual periodendDate
- the end date of the accrual periodprovider
- the rates provider- Returns:
- the applicable rate
-
rateSensitivity
public PointSensitivityBuilder rateSensitivity(IborInterpolatedRateComputation computation, LocalDate startDate, LocalDate endDate, RatesProvider provider)
Description copied from interface:RateComputationFn
Determines the point sensitivity for the rate computation.This returns a sensitivity instance referring to the curves used to determine each forward rate.
- Specified by:
rateSensitivity
in interfaceRateComputationFn<IborInterpolatedRateComputation>
- Parameters:
computation
- the computation definitionstartDate
- the start date of the accrual periodendDate
- the end date of the accrual periodprovider
- the rates provider- Returns:
- the point sensitivity
-
explainRate
public double explainRate(IborInterpolatedRateComputation computation, LocalDate startDate, LocalDate endDate, RatesProvider provider, ExplainMapBuilder builder)
Description copied from interface:RateComputationFn
Explains the calculation of the applicable rate.This adds information to the
ExplainMapBuilder
to aid understanding of the computation. The actual rate is also returned.- Specified by:
explainRate
in interfaceRateComputationFn<IborInterpolatedRateComputation>
- Parameters:
computation
- the computation definitionstartDate
- the start date of the accrual periodendDate
- the end date of the accrual periodprovider
- the rates providerbuilder
- the builder to populate- Returns:
- the applicable rate
-
-