Class CmsPeriod.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<CmsPeriod>
-
- com.opengamma.strata.product.cms.CmsPeriod.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CmsPeriod
build()
CmsPeriod.Builder
caplet(Double caplet)
Sets the optional caplet strike.CmsPeriod.Builder
currency(Currency currency)
Sets the primary currency of the payment period.CmsPeriod.Builder
dayCount(DayCount dayCount)
Sets the day count of the period.CmsPeriod.Builder
endDate(LocalDate endDate)
Sets the end date of the payment period.CmsPeriod.Builder
fixingDate(LocalDate fixingDate)
Sets the date of the index fixing.CmsPeriod.Builder
floorlet(Double floorlet)
Sets the optional floorlet strike.Object
get(String propertyName)
CmsPeriod.Builder
index(SwapIndex index)
Sets the swap index.CmsPeriod.Builder
notional(double notional)
Sets the notional amount, positive if receiving, negative if paying.CmsPeriod.Builder
paymentDate(LocalDate paymentDate)
Sets the date that payment occurs.CmsPeriod.Builder
set(String propertyName, Object newValue)
CmsPeriod.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
CmsPeriod.Builder
startDate(LocalDate startDate)
Sets the start date of the payment period.String
toString()
CmsPeriod.Builder
unadjustedEndDate(LocalDate unadjustedEndDate)
Sets the unadjusted end date.CmsPeriod.Builder
unadjustedStartDate(LocalDate unadjustedStartDate)
Sets the unadjusted start date.CmsPeriod.Builder
underlyingSwap(ResolvedSwap underlyingSwap)
Sets the underlying swap.CmsPeriod.Builder
yearFraction(double yearFraction)
Sets the year fraction that the accrual period represents.
-
-
-
Method Detail
-
set
public CmsPeriod.Builder set(String propertyName, Object newValue)
-
set
public CmsPeriod.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
-
build
public CmsPeriod build()
-
currency
public CmsPeriod.Builder currency(Currency currency)
Sets 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.
- Parameters:
currency
- the new value, not null- Returns:
- this, for chaining, not null
-
notional
public CmsPeriod.Builder notional(double notional)
Sets the notional amount, positive if receiving, negative if paying.The notional amount applicable during the period. The currency of the notional is specified by
currency
.- Parameters:
notional
- the new value- Returns:
- this, for chaining, not null
-
startDate
public CmsPeriod.Builder startDate(LocalDate startDate)
Sets 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.
- Parameters:
startDate
- the new value, not null- Returns:
- this, for chaining, not null
-
endDate
public CmsPeriod.Builder endDate(LocalDate endDate)
Sets 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.
- Parameters:
endDate
- the new value, not null- Returns:
- this, for chaining, not null
-
unadjustedStartDate
public CmsPeriod.Builder unadjustedStartDate(LocalDate unadjustedStartDate)
Sets 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.
- Parameters:
unadjustedStartDate
- the new value, not null- Returns:
- this, for chaining, not null
-
unadjustedEndDate
public CmsPeriod.Builder unadjustedEndDate(LocalDate unadjustedEndDate)
Sets 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.
- Parameters:
unadjustedEndDate
- the new value, not null- Returns:
- this, for chaining, not null
-
yearFraction
public CmsPeriod.Builder yearFraction(double yearFraction)
Sets the year fraction that the accrual period represents.The value is usually calculated using a
DayCount
which may be different to that of the index. 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.- Parameters:
yearFraction
- the new value- Returns:
- this, for chaining, not null
-
paymentDate
public CmsPeriod.Builder paymentDate(LocalDate paymentDate)
Sets the date that payment occurs.If the schedule adjusts for business days, then this is the adjusted date.
- Parameters:
paymentDate
- the new value, not null- Returns:
- this, for chaining, not null
-
fixingDate
public CmsPeriod.Builder fixingDate(LocalDate fixingDate)
Sets the date of the index fixing.This is an adjusted date with any business day applied.
- Parameters:
fixingDate
- the new value, not null- Returns:
- this, for chaining, not null
-
caplet
public CmsPeriod.Builder caplet(Double caplet)
Sets the optional caplet strike.This defines the strike value of a caplet.
If the period is not a caplet, this field will be absent.
- Parameters:
caplet
- the new value- Returns:
- this, for chaining, not null
-
floorlet
public CmsPeriod.Builder floorlet(Double floorlet)
Sets the optional floorlet strike.This defines the strike value of a floorlet.
If the period is not a floorlet, this field will be absent.
- Parameters:
floorlet
- the new value- Returns:
- this, for chaining, not null
-
dayCount
public CmsPeriod.Builder dayCount(DayCount dayCount)
Sets the day count of the period.- Parameters:
dayCount
- the new value, not null- Returns:
- this, for chaining, not null
-
index
public CmsPeriod.Builder index(SwapIndex index)
Sets the swap index.The swap rate to be paid is the observed value of this index.
- Parameters:
index
- the new value, not null- Returns:
- this, for chaining, not null
-
underlyingSwap
public CmsPeriod.Builder underlyingSwap(ResolvedSwap underlyingSwap)
Sets the underlying swap.The interest rate swap for which the swap rate is referred.
- Parameters:
underlyingSwap
- the new value, not null- Returns:
- this, for chaining, not null
-
-