Class FixedCouponBondPaymentPeriod
- java.lang.Object
-
- com.opengamma.strata.product.bond.FixedCouponBondPaymentPeriod
-
- All Implemented Interfaces:
BondPaymentPeriod
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class FixedCouponBondPaymentPeriod extends Object implements BondPaymentPeriod, org.joda.beans.ImmutableBean, Serializable
A period over which a fixed coupon is paid.A single payment period within a fixed coupon bond,
ResolvedFixedCouponBond
. The payments of the fixed coupon bond consist periodic coupon payments and nominal payment. This class represents a single payment of the periodic payments.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FixedCouponBondPaymentPeriod.Builder
The bean-builder forFixedCouponBondPaymentPeriod
.static class
FixedCouponBondPaymentPeriod.Meta
The meta-bean forFixedCouponBondPaymentPeriod
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description FixedCouponBondPaymentPeriod
adjustPaymentDate(TemporalAdjuster adjuster)
Adjusts the payment date using the rules of the specified adjuster.static FixedCouponBondPaymentPeriod.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)
Currency
getCurrency()
Gets the primary currency of the payment period.LocalDate
getDetachmentDate()
Gets the detachment date.LocalDate
getEndDate()
Gets the end date of the payment period.double
getFixedRate()
Gets the fixed coupon rate.double
getNotional()
Gets the notional amount, must be positive.LocalDate
getPaymentDate()
Gets the date that the payment is made.LocalDate
getStartDate()
Gets the start date of the payment period.LocalDate
getUnadjustedEndDate()
Gets the unadjusted end date.LocalDate
getUnadjustedStartDate()
Gets the unadjusted start date.double
getYearFraction()
Gets the year fraction that the accrual period represents.boolean
hasExCouponPeriod()
Checks if there is an ex-coupon period.int
hashCode()
static FixedCouponBondPaymentPeriod.Meta
meta()
The meta-bean forFixedCouponBondPaymentPeriod
.FixedCouponBondPaymentPeriod.Meta
metaBean()
FixedCouponBondPaymentPeriod.Builder
toBuilder()
Returns a builder that allows this bean to be mutated.String
toString()
-
-
-
Method Detail
-
collectIndices
public void collectIndices(ImmutableSet.Builder<Index> builder)
Description copied from interface:BondPaymentPeriod
Collects 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:
collectIndices
in interfaceBondPaymentPeriod
- Parameters:
builder
- the builder to use
-
adjustPaymentDate
public FixedCouponBondPaymentPeriod adjustPaymentDate(TemporalAdjuster adjuster)
Description copied from interface:BondPaymentPeriod
Adjusts 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:
adjustPaymentDate
in interfaceBondPaymentPeriod
- Parameters:
adjuster
- the adjuster to apply to the payment date- Returns:
- the adjusted payment event
-
getPaymentDate
public LocalDate getPaymentDate()
Description copied from interface:BondPaymentPeriod
Gets the date that the payment is made.Each payment period has a single payment date. This date has been adjusted to be a valid business day.
- Specified by:
getPaymentDate
in interfaceBondPaymentPeriod
- Returns:
- the payment date of the period
-
hasExCouponPeriod
public boolean hasExCouponPeriod()
Checks if there is an ex-coupon period.- Returns:
- true if has an ex-coupon period
-
meta
public static FixedCouponBondPaymentPeriod.Meta meta()
The meta-bean forFixedCouponBondPaymentPeriod
.- Returns:
- the meta-bean, not null
-
builder
public static FixedCouponBondPaymentPeriod.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public FixedCouponBondPaymentPeriod.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getCurrency
public Currency getCurrency()
Gets the primary currency of the payment period.The amounts of the notional are usually expressed in terms of this currency, however they can be converted from amounts in a different currency.
- Specified by:
getCurrency
in interfaceBondPaymentPeriod
- Returns:
- the value of the property, not null
-
getNotional
public double getNotional()
Gets the notional amount, must be positive.The notional amount applicable during the period. The currency of the notional is specified by
currency
.- Returns:
- the value of the property
-
getStartDate
public LocalDate getStartDate()
Gets the start date of the payment period.This is the first date in the period. If the schedule adjusts for business days, then this is the adjusted date.
- Specified by:
getStartDate
in interfaceBondPaymentPeriod
- Returns:
- the value of the property, not null
-
getEndDate
public LocalDate getEndDate()
Gets the end date of the payment period.This is the last date in the period. If the schedule adjusts for business days, then this is the adjusted date.
- Specified by:
getEndDate
in interfaceBondPaymentPeriod
- Returns:
- the value of the property, not null
-
getUnadjustedStartDate
public LocalDate getUnadjustedStartDate()
Gets the unadjusted start date.The start date before any business day adjustment is applied.
When building, this will default to the start date if not specified.
- Returns:
- the value of the property, not null
-
getUnadjustedEndDate
public LocalDate getUnadjustedEndDate()
Gets the unadjusted end date.The end date before any business day adjustment is applied.
When building, this will default to the end date if not specified.
- Returns:
- the value of the property, not null
-
getDetachmentDate
public LocalDate getDetachmentDate()
Gets the detachment date.Some bonds trade ex-coupon before the coupon payment. The coupon is paid not to the owner of the bond on the payment date but to the owner of the bond on the detachment date.
When building, this will default to the end date if not specified.
- Returns:
- the value of the property, not null
-
getFixedRate
public double getFixedRate()
Gets the fixed coupon rate.The single payment is based on this fixed coupon rate.
- Returns:
- the value of the property
-
getYearFraction
public double getYearFraction()
Gets the year fraction that the accrual period represents.The year fraction of a bond period is based on the unadjusted dates.
The value is usually calculated using a
DayCount
. Typically the value will be close to 1 for one year and close to 0.5 for six months. The fraction may be greater than 1, but not less than 0.- Returns:
- the value of the property
-
toBuilder
public FixedCouponBondPaymentPeriod.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-