Class CreditCouponPaymentPeriod
- java.lang.Object
-
- com.opengamma.strata.product.credit.CreditCouponPaymentPeriod
-
- All Implemented Interfaces:
Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class CreditCouponPaymentPeriod extends Object implements org.joda.beans.ImmutableBean, Serializable
A period over which a fixed coupon is paid.A single payment period within a CDS,
ResolvedCds
. The payments of the CDS consist of periodic coupon payments and protection payment on default. 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
CreditCouponPaymentPeriod.Builder
The bean-builder forCreditCouponPaymentPeriod
.static class
CreditCouponPaymentPeriod.Meta
The meta-bean forCreditCouponPaymentPeriod
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CreditCouponPaymentPeriod.Builder
builder()
Returns a builder used to create an instance of the bean.boolean
equals(Object obj)
Currency
getCurrency()
Gets the primary currency of the payment period.LocalDate
getEffectiveEndDate()
Gets the effective protection end date of the period.LocalDate
getEffectiveStartDate()
Gets the effective protection start date of the period.LocalDate
getEndDate()
Gets the end date of the accrual period.double
getFixedRate()
Gets the fixed coupon rate.double
getNotional()
Gets the notional amount, must be positive.LocalDate
getPaymentDate()
Gets the payment date.LocalDate
getStartDate()
Gets the start date of the accrual 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.int
hashCode()
static CreditCouponPaymentPeriod.Meta
meta()
The meta-bean forCreditCouponPaymentPeriod
.CreditCouponPaymentPeriod.Meta
metaBean()
CreditCouponPaymentPeriod.Builder
toBuilder()
Returns a builder that allows this bean to be mutated.String
toString()
-
-
-
Method Detail
-
meta
public static CreditCouponPaymentPeriod.Meta meta()
The meta-bean forCreditCouponPaymentPeriod
.- Returns:
- the meta-bean, not null
-
builder
public static CreditCouponPaymentPeriod.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public CreditCouponPaymentPeriod.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.
- 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 accrual period.This is the first accrual date in the period. If the schedule adjusts for business days, then this is the adjusted date.
- Returns:
- the value of the property, not null
-
getEndDate
public LocalDate getEndDate()
Gets the end date of the accrual period.This is the last accrual date in the period. If the schedule adjusts for business days, then this is the adjusted date.
- 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
-
getEffectiveStartDate
public LocalDate getEffectiveStartDate()
Gets the effective protection start date of the period.This is the first date in the protection period associated with the payment period.
- Returns:
- the value of the property, not null
-
getEffectiveEndDate
public LocalDate getEffectiveEndDate()
Gets the effective protection end date of the period.This is the last date in the protection period associated with the payment period.
- Returns:
- the value of the property, not null
-
getPaymentDate
public LocalDate getPaymentDate()
Gets the payment date.The fixed rate is paid on this date. This is not necessarily the same as
endDate
.- 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. The coupon must be represented in fraction.
- Returns:
- the value of the property
-
getYearFraction
public double getYearFraction()
Gets the year fraction that the accrual period represents.The year fraction of a period is based on
startDate
andendDate
. The value is usually calculated using a specificDayCount
.- Returns:
- the value of the property
-
toBuilder
public CreditCouponPaymentPeriod.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-