Class RatePaymentPeriod
- java.lang.Object
- 
- com.opengamma.strata.product.swap.RatePaymentPeriod
 
- 
- All Implemented Interfaces:
- NotionalPaymentPeriod,- SwapPaymentPeriod,- Serializable,- org.joda.beans.Bean,- org.joda.beans.ImmutableBean
 
 public final class RatePaymentPeriod extends Object implements NotionalPaymentPeriod, org.joda.beans.ImmutableBean, Serializable A period over which a rate of interest is paid.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. - See Also:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classRatePaymentPeriod.BuilderThe bean-builder forRatePaymentPeriod.static classRatePaymentPeriod.MetaThe meta-bean forRatePaymentPeriod.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RatePaymentPeriodadjustPaymentDate(TemporalAdjuster adjuster)Adjusts the payment date using the rules of the specified adjuster.static RatePaymentPeriod.Builderbuilder()Returns a builder used to create an instance of the bean.voidcollectIndices(ImmutableSet.Builder<Index> builder)Collects all the indices referred to by this period.booleanequals(Object obj)ImmutableList<RateAccrualPeriod>getAccrualPeriods()Gets the accrual periods that combine to form the payment period.CompoundingMethodgetCompoundingMethod()Gets the compounding method to use when there is more than one accrual period, default is 'None'.CurrencygetCurrency()Gets the primary currency of the payment period.DayCountgetDayCount()Gets the day count convention.LocalDategetEndDate()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.doublegetNotional()Gets the notional amount, positive if receiving, negative if paying.CurrencyAmountgetNotionalAmount()Gets the notional amount, positive if receiving, negative if paying.LocalDategetPaymentDate()Gets the date that payment occurs.LocalDategetStartDate()Gets the accrual start date of the period.inthashCode()booleanisCompoundingApplicable()Checks whether compounding applies.static RatePaymentPeriod.Metameta()The meta-bean forRatePaymentPeriod.RatePaymentPeriod.MetametaBean()RatePaymentPeriod.BuildertoBuilder()Returns a builder that allows this bean to be mutated.StringtoString()
 
- 
- 
- 
Method Detail- 
getStartDatepublic LocalDate getStartDate() Gets the accrual start date of the period.This is the first accrual date in the period. This date has typically been adjusted to be a valid business day. - Specified by:
- getStartDatein interface- SwapPaymentPeriod
- Returns:
- the start date of the period
 
 - 
getEndDatepublic LocalDate getEndDate() Gets the accrual end date of the period.This is the last accrual date in the period. This date has typically been adjusted to be a valid business day. - Specified by:
- getEndDatein interface- SwapPaymentPeriod
- Returns:
- the end date of the period
 
 - 
getNotionalAmountpublic CurrencyAmount getNotionalAmount() Gets the notional amount, positive if receiving, negative if paying.This is the notional amount applicable during the period. The currency of the notional is specified by currencyunless there is thefxResetproperty is present.- Specified by:
- getNotionalAmountin interface- NotionalPaymentPeriod
- Returns:
- the notional as a CurrencyAmount
 
 - 
getFxResetObservationpublic Optional<FxIndexObservation> getFxResetObservation() Description copied from interface:NotionalPaymentPeriodGets the FX reset observation, optional.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. The currency of the period and the currency of the notional must differ, and the currency pair must be that of the observation. - Specified by:
- getFxResetObservationin interface- NotionalPaymentPeriod
- Returns:
- the optional FX reset observation
 
 - 
isCompoundingApplicablepublic boolean isCompoundingApplicable() Checks whether compounding applies.Compounding applies if there is more than one accrual period and the compounding method is not 'None'. - Returns:
- true if compounding applies
 
 - 
adjustPaymentDatepublic RatePaymentPeriod adjustPaymentDate(TemporalAdjuster adjuster) Description copied from interface:SwapPaymentPeriodAdjusts the payment date using the rules of the specified adjuster.The adjuster is typically an instance of BusinessDayAdjustment. Implementations must return a new instance unless they are immutable and no change occurs.- Specified by:
- adjustPaymentDatein interface- SwapPaymentPeriod
- Parameters:
- adjuster- the adjuster to apply to the payment date
- Returns:
- the adjusted payment event
 
 - 
collectIndicespublic void collectIndices(ImmutableSet.Builder<Index> builder) Description copied from interface:SwapPaymentPeriodCollects all the indices referred to by this period.A 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. - Specified by:
- collectIndicesin interface- SwapPaymentPeriod
- Parameters:
- builder- the builder to use
 
 - 
metapublic static RatePaymentPeriod.Meta meta() The meta-bean forRatePaymentPeriod.- Returns:
- the meta-bean, not null
 
 - 
builderpublic static RatePaymentPeriod.Builder builder() Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
 
 - 
metaBeanpublic RatePaymentPeriod.Meta metaBean() - Specified by:
- metaBeanin interface- org.joda.beans.Bean
 
 - 
getPaymentDatepublic LocalDate getPaymentDate() Gets the date that payment occurs.The date that payment is made for the accrual periods. If the schedule adjusts for business days, then this is the adjusted date. - Specified by:
- getPaymentDatein interface- SwapPaymentPeriod
- Returns:
- the value of the property, not null
 
 - 
getAccrualPeriodspublic ImmutableList<RateAccrualPeriod> getAccrualPeriods() Gets the accrual periods that combine to form the payment period.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. - Returns:
- the value of the property, not empty
 
 - 
getDayCountpublic DayCount getDayCount() Gets the day count convention.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. - Returns:
- the value of the property, not null
 
 - 
getCurrencypublic Currency getCurrency() Gets the primary currency of the payment period.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 fxResetproperty.- Specified by:
- getCurrencyin interface- SwapPaymentPeriod
- Returns:
- the value of the property, not null
 
 - 
getFxResetpublic Optional<FxReset> getFxReset() Gets the FX reset definition, optional.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. - Returns:
- the optional value of the property, not null
 
 - 
getNotionalpublic double getNotional() Gets the notional amount, positive if receiving, negative if paying.The notional amount applicable during the period. The currency of the notional is specified by currencyunless there is thefxResetproperty is present.- Returns:
- the value of the property
 
 - 
getCompoundingMethodpublic CompoundingMethod getCompoundingMethod() Gets the compounding method to use when there is more than one accrual period, default is 'None'.Compounding is used when combining accrual periods. - Returns:
- the value of the property, not null
 
 - 
toBuilderpublic RatePaymentPeriod.Builder toBuilder() Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
 
 
- 
 
-