public interface RateCalculation
An interest rate swap leg is defined by RateCalculationSwapLeg
.
The rate to be paid is defined by the implementations of this interface.
Implementations must be immutable and thread-safe beans.
Modifier and Type | Method and Description |
---|---|
void |
collectCurrencies(ImmutableSet.Builder<Currency> builder)
Collects all the currencies referred to by this calculation.
|
void |
collectIndices(ImmutableSet.Builder<Index> builder)
Collects all the indices referred to by this calculation.
|
ImmutableList<RateAccrualPeriod> |
createAccrualPeriods(Schedule accrualSchedule,
Schedule paymentSchedule,
ReferenceData refData)
Creates accrual periods based on the specified schedule.
|
DayCount |
getDayCount()
Gets the day count convention.
|
SwapLegType |
getType()
Gets the type of the leg, such as Fixed or Ibor.
|
SwapLegType getType()
This provides a high level categorization of the swap leg.
DayCount getDayCount()
This is used to convert schedule period dates to a numerical value.
void collectCurrencies(ImmutableSet.Builder<Currency> builder)
This collects the complete set of currencies for the calculation, not just the payment currencies.
builder
- the builder to populatevoid collectIndices(ImmutableSet.Builder<Index> builder)
A calculation will typically refer to at least one index, such as 'GBP-LIBOR-3M'. Each index that is referred to must be added to the specified builder.
builder
- the builder to useImmutableList<RateAccrualPeriod> createAccrualPeriods(Schedule accrualSchedule, Schedule paymentSchedule, ReferenceData refData)
The specified accrual schedule defines the period dates to be created.
One instance of RateAccrualPeriod
must be created for each period in the schedule.
accrualSchedule
- the accrual schedulepaymentSchedule
- the payment schedulerefData
- the reference data to use when resolvingReferenceDataNotFoundException
- if an identifier cannot be resolved in the reference dataRuntimeException
- if the calculation is invalidCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.