Class CmsLeg.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<CmsLeg>
-
- com.opengamma.strata.product.cms.CmsLeg.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CmsLeg
build()
CmsLeg.Builder
capSchedule(ValueSchedule capSchedule)
Sets the cap schedule, optional.CmsLeg.Builder
currency(Currency currency)
Sets the currency of the leg associated with the notional.CmsLeg.Builder
dayCount(DayCount dayCount)
Sets the day count convention.CmsLeg.Builder
fixingDateOffset(DaysAdjustment fixingDateOffset)
Sets the offset of the fixing date from each adjusted reset date.CmsLeg.Builder
fixingRelativeTo(FixingRelativeTo fixingRelativeTo)
Sets the base date that each fixing is made relative to, defaulted to 'PeriodStart'.CmsLeg.Builder
floorSchedule(ValueSchedule floorSchedule)
Sets the floor schedule, optional.Object
get(String propertyName)
CmsLeg.Builder
index(SwapIndex index)
Sets the swap index.CmsLeg.Builder
notional(ValueSchedule notional)
Sets the notional amount, must be non-negative.CmsLeg.Builder
paymentDateOffset(DaysAdjustment paymentDateOffset)
Sets the offset of payment from the base calculation period date.CmsLeg.Builder
paymentSchedule(PeriodicSchedule paymentSchedule)
Sets the periodic payment schedule.CmsLeg.Builder
payReceive(PayReceive payReceive)
Sets whether the leg is pay or receive.CmsLeg.Builder
set(String propertyName, Object newValue)
CmsLeg.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
String
toString()
-
-
-
Method Detail
-
set
public CmsLeg.Builder set(String propertyName, Object newValue)
-
set
public CmsLeg.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
-
build
public CmsLeg build()
-
payReceive
public CmsLeg.Builder payReceive(PayReceive payReceive)
Sets whether the leg is pay or receive.A value of 'Pay' implies that the resulting amount is paid to the counterparty. A value of 'Receive' implies that the resulting amount is received from the counterparty. Note that negative swap rates can result in a payment in the opposite direction to that implied by this indicator.
- Parameters:
payReceive
- the new value, not null- Returns:
- this, for chaining, not null
-
paymentSchedule
public CmsLeg.Builder paymentSchedule(PeriodicSchedule paymentSchedule)
Sets the periodic payment schedule.This is used to define the periodic payment periods. These are used directly or indirectly to determine other dates in the leg.
- Parameters:
paymentSchedule
- the new value, not null- Returns:
- this, for chaining, not null
-
paymentDateOffset
public CmsLeg.Builder paymentDateOffset(DaysAdjustment paymentDateOffset)
Sets the offset of payment from the base calculation period date.The offset is applied to the adjusted end date of each payment period. Offset can be based on calendar days or business days.
When building, this will default to the payment offset of the swap convention in the swap index if not specified.
- Parameters:
paymentDateOffset
- the new value, not null- Returns:
- this, for chaining, not null
-
currency
public CmsLeg.Builder currency(Currency currency)
Sets the currency of the leg associated with the notional.This is the currency of the leg and the currency that swap rate calculation is made in. The amounts of the notional are expressed in terms of this currency.
- Parameters:
currency
- the new value, not null- Returns:
- this, for chaining, not null
-
notional
public CmsLeg.Builder notional(ValueSchedule notional)
Sets the notional amount, must be non-negative.The notional amount applicable during the period. The currency of the notional is specified by
currency
.- Parameters:
notional
- the new value, not null- Returns:
- this, for chaining, not null
-
index
public CmsLeg.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
-
fixingRelativeTo
public CmsLeg.Builder fixingRelativeTo(FixingRelativeTo fixingRelativeTo)
Sets the base date that each fixing is made relative to, defaulted to 'PeriodStart'.The fixing date is relative to either the start or end of each period.
- Parameters:
fixingRelativeTo
- the new value, not null- Returns:
- this, for chaining, not null
-
fixingDateOffset
public CmsLeg.Builder fixingDateOffset(DaysAdjustment fixingDateOffset)
Sets the offset of the fixing date from each adjusted reset date.The offset is applied to the base date specified by
fixingRelativeTo
. The offset is typically a negative number of business days.When building, this will default to the fixing offset of the swap convention in the swap index if not specified.
- Parameters:
fixingDateOffset
- the new value, not null- Returns:
- this, for chaining, not null
-
dayCount
public CmsLeg.Builder dayCount(DayCount dayCount)
Sets the day count convention.This is used to convert dates to a numerical value.
When building, this will default to the day count of the swap convention in the swap index if not specified.
- Parameters:
dayCount
- the new value, not null- Returns:
- this, for chaining, not null
-
capSchedule
public CmsLeg.Builder capSchedule(ValueSchedule capSchedule)
Sets the cap schedule, optional.This defines the strike value of a cap as an initial value and a list of adjustments. Thus individual caplets may have different strike values. The cap rate is only allowed to change at payment period boundaries.
If the product is not a cap, the cap schedule will be absent.
- Parameters:
capSchedule
- the new value- Returns:
- this, for chaining, not null
-
floorSchedule
public CmsLeg.Builder floorSchedule(ValueSchedule floorSchedule)
Sets the floor schedule, optional.This defines the strike value of a floor as an initial value and a list of adjustments. Thus individual floorlets may have different strike values. The floor rate is only allowed to change at payment period boundaries.
If the product is not a floor, the floor schedule will be absent.
- Parameters:
floorSchedule
- the new value- Returns:
- this, for chaining, not null
-
-