public final class FixedRateCalculation extends Object implements RateCalculation, org.joda.beans.ImmutableBean, Serializable
This defines the data necessary to calculate the amount payable on the leg. The amount is based on a fixed rate, which can vary over the lifetime of the leg.
| Modifier and Type | Class and Description |
|---|---|
static class |
FixedRateCalculation.Builder
The bean-builder for
FixedRateCalculation. |
static class |
FixedRateCalculation.Meta
The meta-bean for
FixedRateCalculation. |
| Modifier and Type | Method and Description |
|---|---|
static FixedRateCalculation.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
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.
|
boolean |
equals(Object obj) |
DayCount |
getDayCount()
Gets the day count convention.
|
Optional<FixedRateStubCalculation> |
getFinalStub()
Gets the final stub, optional.
|
Optional<FutureValueNotional> |
getFutureValueNotional()
Gets the future value notional.
|
Optional<FixedRateStubCalculation> |
getInitialStub()
Gets the initial stub, optional.
|
ValueSchedule |
getRate()
Gets the interest rate to be paid.
|
SwapLegType |
getType()
Gets the type of the leg, such as Fixed or Ibor.
|
int |
hashCode() |
static FixedRateCalculation.Meta |
meta()
The meta-bean for
FixedRateCalculation. |
FixedRateCalculation.Meta |
metaBean() |
static FixedRateCalculation |
of(double rate,
DayCount dayCount)
Obtains a rate calculation for the specified day count and rate.
|
FixedRateCalculation.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
public static FixedRateCalculation of(double rate, DayCount dayCount)
The rate specified here does not vary during the life of the swap. If this method provides insufficient control, use the builder.
rate - the ratedayCount - the day countpublic SwapLegType getType()
RateCalculationThis provides a high level categorization of the swap leg.
getType in interface RateCalculationpublic void collectCurrencies(ImmutableSet.Builder<Currency> builder)
RateCalculationThis collects the complete set of currencies for the calculation, not just the payment currencies.
collectCurrencies in interface RateCalculationbuilder - the builder to populatepublic void collectIndices(ImmutableSet.Builder<Index> builder)
RateCalculationA 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.
collectIndices in interface RateCalculationbuilder - the builder to usepublic ImmutableList<RateAccrualPeriod> createAccrualPeriods(Schedule accrualSchedule, Schedule paymentSchedule, ReferenceData refData)
RateCalculation
The specified accrual schedule defines the period dates to be created.
One instance of RateAccrualPeriod must be created for each period in the schedule.
createAccrualPeriods in interface RateCalculationaccrualSchedule - the accrual schedulepaymentSchedule - the payment schedulerefData - the reference data to use when resolvingpublic static FixedRateCalculation.Meta meta()
FixedRateCalculation.public static FixedRateCalculation.Builder builder()
public FixedRateCalculation.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic DayCount getDayCount()
This is used to convert schedule period dates to a numerical value.
getDayCount in interface RateCalculationpublic ValueSchedule getRate()
This defines the rate as an initial amount and a list of adjustments. The rate is only permitted to change at accrual period boundaries.
public Optional<FixedRateStubCalculation> getInitialStub()
The initial stub of a swap may have a different rate from the regular accrual periods.
This property allows the stub rate to be specified, either as a known amount or a rate.
If this property is not present, then the rate derived from the rate property applies during the stub.
If this property is present and there is no initial stub, it is ignored.
public Optional<FixedRateStubCalculation> getFinalStub()
The final stub of a swap may have a different rate from the regular accrual periods.
This property allows the stub rate to be specified, either as a known amount or a rate.
If this property is not present, then the rate derived from the rate property applies during the stub.
If this property is present and there is no initial stub, it is ignored.
public Optional<FutureValueNotional> getFutureValueNotional()
This property is used when the fixed leg of a swap has a future value notional. This is typically used for Brazilian swaps.
public FixedRateCalculation.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.