public final class CmsLeg extends Object implements Resolvable<ResolvedCmsLeg>, org.joda.beans.ImmutableBean, Serializable
This defines a single CMS leg for CMS or CMS cap/floor. The CMS leg of CMS periodically pays coupons based on swap rate, which is the observed value of a swap index. A CMS cap/floor instruments are defined as a set of call/put options on successive swap rates, creating CMS caplets/floorlets.
The periodic payments in the resolved leg are CMS coupons, CMS caplets or
CMS floorlets depending on the data in this leg.
The capSchedule field is used to represent strike values of individual caplets,
whereas floorSchedule is used to represent strike values of individual floorlets.
Thus at least one of capSchedule and floorSchedule must be empty.
If both the fields are absent, the periodic payments in this leg are CMS coupons.
| Modifier and Type | Class and Description |
|---|---|
static class |
CmsLeg.Builder
The bean-builder for
CmsLeg. |
static class |
CmsLeg.Meta
The meta-bean for
CmsLeg. |
| Modifier and Type | Method and Description |
|---|---|
static CmsLeg.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
Optional<ValueSchedule> |
getCapSchedule()
Gets the cap schedule, optional.
|
Currency |
getCurrency()
Gets the currency of the leg associated with the notional.
|
DayCount |
getDayCount()
Gets the day count convention.
|
AdjustableDate |
getEndDate()
Gets the accrual end date of the leg.
|
DaysAdjustment |
getFixingDateOffset()
Gets the offset of the fixing date from each adjusted reset date.
|
FixingRelativeTo |
getFixingRelativeTo()
Gets the base date that each fixing is made relative to, defaulted to 'PeriodStart'.
|
Optional<ValueSchedule> |
getFloorSchedule()
Gets the floor schedule, optional.
|
SwapIndex |
getIndex()
Gets the swap index.
|
ValueSchedule |
getNotional()
Gets the notional amount, must be non-negative.
|
DaysAdjustment |
getPaymentDateOffset()
Gets the offset of payment from the base calculation period date.
|
PeriodicSchedule |
getPaymentSchedule()
Gets the periodic payment schedule.
|
PayReceive |
getPayReceive()
Gets whether the leg is pay or receive.
|
AdjustableDate |
getStartDate()
Gets the accrual start date of the leg.
|
RateIndex |
getUnderlyingIndex()
Gets the underlying Rate index that the leg is based on.
|
int |
hashCode() |
static CmsLeg.Meta |
meta()
The meta-bean for
CmsLeg. |
CmsLeg.Meta |
metaBean() |
ResolvedCmsLeg |
resolve(ReferenceData refData) |
CmsLeg.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
public AdjustableDate getStartDate()
This is the first accrual date in the leg, often known as the effective date.
public AdjustableDate getEndDate()
This is the last accrual date in the leg, often known as the termination date.
public RateIndex getUnderlyingIndex()
public ResolvedCmsLeg resolve(ReferenceData refData)
resolve in interface Resolvable<ResolvedCmsLeg>public static CmsLeg.Meta meta()
CmsLeg.public static CmsLeg.Builder builder()
public CmsLeg.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic PayReceive getPayReceive()
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.
public PeriodicSchedule getPaymentSchedule()
This is used to define the periodic payment periods. These are used directly or indirectly to determine other dates in the leg.
public DaysAdjustment getPaymentDateOffset()
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.
public Currency getCurrency()
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.
public ValueSchedule getNotional()
The notional amount applicable during the period.
The currency of the notional is specified by currency.
public SwapIndex getIndex()
The swap rate to be paid is the observed value of this index.
public FixingRelativeTo getFixingRelativeTo()
The fixing date is relative to either the start or end of each period.
public DaysAdjustment getFixingDateOffset()
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.
public DayCount getDayCount()
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.
public Optional<ValueSchedule> getCapSchedule()
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.
public Optional<ValueSchedule> getFloorSchedule()
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.
public CmsLeg.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.