Class ResolvedCmsLeg
- java.lang.Object
-
- com.opengamma.strata.product.cms.ResolvedCmsLeg
-
- All Implemented Interfaces:
Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class ResolvedCmsLeg extends Object implements org.joda.beans.ImmutableBean, Serializable
A CMS leg of a constant maturity swap (CMS) product, resolved for pricing.This is the resolved form of
CmsLeg
and is an input to the pricers. Applications will typically create aResolvedCmLegs
from aCmsLeg
usingCmsLeg.resolve(ReferenceData)
.This defines a single leg for a CMS product and is formed from a number of periods. Each period may be a CMS coupon, caplet or floorlet.
A
ResolvedCmsLeg
is bound to data that changes over time, such as holiday calendars. If the data changes, such as the addition of a new holiday, the resolved form will not be updated. Care must be taken when placing the resolved form in a cache or persistence layer.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ResolvedCmsLeg.Builder
The bean-builder forResolvedCmsLeg
.static class
ResolvedCmsLeg.Meta
The meta-bean forResolvedCmsLeg
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ResolvedCmsLeg.Builder
builder()
Returns a builder used to create an instance of the bean.boolean
equals(Object obj)
ImmutableList<CmsPeriod>
getCmsPeriods()
Gets the periodic payments based on the successive observed values of a swap index.Currency
getCurrency()
Gets the currency of the leg.LocalDate
getEndDate()
Gets the end date of the leg.SwapIndex
getIndex()
Gets the swap index of the leg.PayReceive
getPayReceive()
Gets whether the leg is pay or receive.LocalDate
getStartDate()
Gets the start date of the leg.RateIndex
getUnderlyingIndex()
Gets the underlying Rate index that the leg is based on.int
hashCode()
static ResolvedCmsLeg.Meta
meta()
The meta-bean forResolvedCmsLeg
.ResolvedCmsLeg.Meta
metaBean()
ResolvedCmsLeg.Builder
toBuilder()
Returns a builder that allows this bean to be mutated.String
toString()
-
-
-
Method Detail
-
getStartDate
public LocalDate getStartDate()
Gets the start date of the leg.This is the first accrual date in the leg, often known as the effective date. This date has been adjusted to be a valid business day.
- Returns:
- the start date of the leg
-
getEndDate
public LocalDate getEndDate()
Gets the end date of the leg.This is the last accrual date in the leg, often known as the maturity date. This date has been adjusted to be a valid business day.
- Returns:
- the end date of the leg
-
getCurrency
public Currency getCurrency()
Gets the currency of the leg.All periods in the leg will have this currency.
- Returns:
- the currency
-
getIndex
public SwapIndex getIndex()
Gets the swap index of the leg.All periods in the leg will have this index.
- Returns:
- the index
-
getUnderlyingIndex
public RateIndex getUnderlyingIndex()
Gets the underlying Rate index that the leg is based on.All periods in the leg will have this index.
- Returns:
- the index
-
meta
public static ResolvedCmsLeg.Meta meta()
The meta-bean forResolvedCmsLeg
.- Returns:
- the meta-bean, not null
-
builder
public static ResolvedCmsLeg.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public ResolvedCmsLeg.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getPayReceive
public PayReceive getPayReceive()
Gets 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.
The value of this flag should match the signs of the payment period notionals.
- Returns:
- the value of the property, not null
-
getCmsPeriods
public ImmutableList<CmsPeriod> getCmsPeriods()
Gets the periodic payments based on the successive observed values of a swap index.Each payment period represents part of the life-time of the leg. In most cases, the periods do not overlap. However, since each payment period is essentially independent the data model allows overlapping periods.
- Returns:
- the value of the property, not empty
-
toBuilder
public ResolvedCmsLeg.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-