public final class RatePaymentPeriod extends Object implements NotionalPaymentPeriod, org.joda.beans.ImmutableBean, Serializable
A swap leg consists of one or more periods that are the basis of accrual. The payment period is formed from one or more accrual periods which detail the type of interest to be accrued, fixed or floating.
This class specifies the data necessary to calculate the value of the period. Any combination of accrual periods is supported in the data model, however there is no guarantee that exotic combinations will price sensibly.
| Modifier and Type | Class and Description |
|---|---|
static class |
RatePaymentPeriod.Builder
The bean-builder for
RatePaymentPeriod. |
static class |
RatePaymentPeriod.Meta
The meta-bean for
RatePaymentPeriod. |
| Modifier and Type | Method and Description |
|---|---|
RatePaymentPeriod |
adjustPaymentDate(TemporalAdjuster adjuster)
Adjusts the payment date using the rules of the specified adjuster.
|
static RatePaymentPeriod.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
void |
collectIndices(ImmutableSet.Builder<Index> builder)
Collects all the indices referred to by this period.
|
boolean |
equals(Object obj) |
ImmutableList<RateAccrualPeriod> |
getAccrualPeriods()
Gets the accrual periods that combine to form the payment period.
|
CompoundingMethod |
getCompoundingMethod()
Gets the compounding method to use when there is more than one accrual period, default is 'None'.
|
Currency |
getCurrency()
Gets the primary currency of the payment period.
|
DayCount |
getDayCount()
Gets the day count convention.
|
LocalDate |
getEndDate()
Gets the accrual end date of the period.
|
Optional<FxReset> |
getFxReset()
Gets the FX reset definition, optional.
|
Optional<FxIndexObservation> |
getFxResetObservation()
Gets the FX reset observation, optional.
|
double |
getNotional()
Gets the notional amount, positive if receiving, negative if paying.
|
CurrencyAmount |
getNotionalAmount()
Gets the notional amount, positive if receiving, negative if paying.
|
LocalDate |
getPaymentDate()
Gets the date that payment occurs.
|
LocalDate |
getStartDate()
Gets the accrual start date of the period.
|
int |
hashCode() |
boolean |
isCompoundingApplicable()
Checks whether compounding applies.
|
static RatePaymentPeriod.Meta |
meta()
The meta-bean for
RatePaymentPeriod. |
RatePaymentPeriod.Meta |
metaBean() |
RatePaymentPeriod.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
public LocalDate getStartDate()
This is the first accrual date in the period. This date has typically been adjusted to be a valid business day.
getStartDate in interface SwapPaymentPeriodpublic LocalDate getEndDate()
This is the last accrual date in the period. This date has typically been adjusted to be a valid business day.
getEndDate in interface SwapPaymentPeriodpublic CurrencyAmount getNotionalAmount()
This is the notional amount applicable during the period.
The currency of the notional is specified by currency unless there
is the fxReset property is present.
getNotionalAmount in interface NotionalPaymentPeriodCurrencyAmountpublic Optional<FxIndexObservation> getFxResetObservation()
NotionalPaymentPeriodThis property is used when the defined amount of the notional is specified in a currency other than the currency of the swap leg. When this occurs, the notional amount has to be converted using an FX rate to the swap leg currency.
The FX reset definition must be valid. The currency of the period and the currency of the notional must differ, and the currency pair must be that of the observation.
getFxResetObservation in interface NotionalPaymentPeriodpublic boolean isCompoundingApplicable()
Compounding applies if there is more than one accrual period and the compounding method is not 'None'.
public RatePaymentPeriod adjustPaymentDate(TemporalAdjuster adjuster)
SwapPaymentPeriod
The adjuster is typically an instance of BusinessDayAdjustment.
Implementations must return a new instance unless they are immutable and no change occurs.
adjustPaymentDate in interface SwapPaymentPeriodadjuster - the adjuster to apply to the payment datepublic void collectIndices(ImmutableSet.Builder<Index> builder)
SwapPaymentPeriodA period 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 SwapPaymentPeriodbuilder - the builder to usepublic static RatePaymentPeriod.Meta meta()
RatePaymentPeriod.public static RatePaymentPeriod.Builder builder()
public RatePaymentPeriod.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic LocalDate getPaymentDate()
The date that payment is made for the accrual periods. If the schedule adjusts for business days, then this is the adjusted date.
getPaymentDate in interface SwapPaymentPeriodpublic ImmutableList<RateAccrualPeriod> getAccrualPeriods()
Each accrual period includes the applicable dates and details of how to observe the rate. In most cases, there will be one accrual period. If there is more than one accrual period then compounding may apply.
public DayCount getDayCount()
Each accrual period contains a year fraction calculated using this day count. This day count is used when there is a need to perform further calculations.
public Currency getCurrency()
This is the currency of the swap leg and the currency that interest calculation is made in.
The amounts of the notional are usually expressed in terms of this currency,
however they can be converted from amounts in a different currency.
See the optional fxReset property.
getCurrency in interface SwapPaymentPeriodpublic Optional<FxReset> getFxReset()
This property is used when the defined amount of the notional is specified in a currency other than the currency of the swap leg. When this occurs, the notional amount has to be converted using an FX rate to the swap leg currency.
The FX reset definition must be valid. It must have a reference currency that is different to that of this period, and the currency of this period must be one of those defined by the FX reset index.
public double getNotional()
The notional amount applicable during the period.
The currency of the notional is specified by currency unless there
is the fxReset property is present.
public CompoundingMethod getCompoundingMethod()
Compounding is used when combining accrual periods.
public RatePaymentPeriod.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.