public final class Cms extends Object implements Product, Resolvable<ResolvedCms>, org.joda.beans.ImmutableBean, Serializable
The CMS product consists of two legs, a CMS leg and a pay leg.
The CMS leg of CMS periodically pays coupons based on swap rate, which is the observed
value of a swap index.
The pay leg is any swap leg from a standard interest rate swap. The pay leg may be absent
for certain CMS products, with the premium paid upfront instead, as defined on CmsTrade.
CMS cap/floor instruments can be created. These are defined as a set of call/put options on successive swap rates, creating CMS caplets/floorlets.
For example, a CMS trade might involve an agreement to exchange the difference between the fixed rate of 1% and the swap rate of 5-year 'GBP-FIXED-6M-LIBOR-6M' swaps every 6 months for 2 years.
| Modifier and Type | Class and Description |
|---|---|
static class |
Cms.Meta
The meta-bean for
Cms. |
| Modifier and Type | Method and Description |
|---|---|
ImmutableSet<Currency> |
allCurrencies()
Returns the set of currencies the product refers to.
|
ImmutableSet<Currency> |
allPaymentCurrencies()
Returns the set of currencies that the product pays in.
|
ImmutableSet<Index> |
allRateIndices()
Returns the set of rate indices referred to by the CMS.
|
boolean |
equals(Object obj) |
CmsLeg |
getCmsLeg()
Gets the CMS leg of the product.
|
Optional<SwapLeg> |
getPayLeg()
Gets the optional pay leg of the product.
|
int |
hashCode() |
static Cms.Meta |
meta()
The meta-bean for
Cms. |
Cms.Meta |
metaBean() |
static Cms |
of(CmsLeg cmsLeg)
Obtains an instance from a CMS leg with no pay leg.
|
static Cms |
of(CmsLeg cmsLeg,
SwapLeg payLeg)
Obtains an instance from a CMS leg and a pay leg.
|
ResolvedCms |
resolve(ReferenceData refData) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitisCrossCurrencypublic static Cms of(CmsLeg cmsLeg)
The pay leg is absent in the resulting CMS.
cmsLeg - the CMS legpublic static Cms of(CmsLeg cmsLeg, SwapLeg payLeg)
cmsLeg - the CMS legpayLeg - the pay legpublic ResolvedCms resolve(ReferenceData refData)
resolve in interface Resolvable<ResolvedCms>public ImmutableSet<Currency> allPaymentCurrencies()
ProductThis returns the complete set of payment currencies. This will typically return one or two currencies.
allPaymentCurrencies in interface Productpublic ImmutableSet<Currency> allCurrencies()
ProductThis returns the complete set of currencies, not just the payment currencies. For example, the sets will differ when one of the currencies is non-deliverable.
allCurrencies in interface Productpublic ImmutableSet<Index> allRateIndices()
The CMS leg will refer to one index, such as 'GBP-LIBOR-3M'. The pay leg may refer to a different index. The swap index will not be included.
public static Cms.Meta meta()
Cms.public Cms.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic CmsLeg getCmsLeg()
This is associated with periodic payments based on swap rate. The payments are CMS coupons, CMS caplets or CMS floors.
public Optional<SwapLeg> getPayLeg()
Typically this is associated with periodic fixed or Ibor rate payments without compounding or notional exchange.
These periodic payments are not made over the lifetime of the product for certain CMS products. Instead the premium is paid upfront.
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.