Class Cms

  • All Implemented Interfaces:
    Resolvable<ResolvedCms>, Product, Serializable, org.joda.beans.Bean, org.joda.beans.ImmutableBean

    public final class Cms
    extends Object
    implements Product, Resolvable<ResolvedCms>, org.joda.beans.ImmutableBean, Serializable
    A constant maturity swap (CMS) or CMS cap/floor.

    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.

    See Also:
    Serialized Form
    • Method Detail

      • of

        public static Cms of​(CmsLeg cmsLeg)
        Obtains an instance from a CMS leg with no pay leg.

        The pay leg is absent in the resulting CMS.

        Parameters:
        cmsLeg - the CMS leg
        Returns:
        the CMS
      • of

        public static Cms of​(CmsLeg cmsLeg,
                             SwapLeg payLeg)
        Obtains an instance from a CMS leg and a pay leg.
        Parameters:
        cmsLeg - the CMS leg
        payLeg - the pay leg
        Returns:
        the CMS
      • resolve

        public ResolvedCms resolve​(ReferenceData refData)
        Description copied from interface: Resolvable
        Resolves this object using the specified reference data.

        This converts the object implementing this interface to the equivalent resolved form. All ReferenceDataId identifiers in this instance will be resolved. The resolved form will typically be a type that is optimized for pricing.

        Resolved objects may be 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.

        Specified by:
        resolve in interface Resolvable<ResolvedCms>
        Parameters:
        refData - the reference data to use when resolving
        Returns:
        the resolved instance
      • allPaymentCurrencies

        public ImmutableSet<Currency> allPaymentCurrencies()
        Description copied from interface: Product
        Returns the set of currencies that the product pays in.

        This returns the complete set of payment currencies. This will typically return one or two currencies.

        Specified by:
        allPaymentCurrencies in interface Product
        Returns:
        the set of payment currencies
      • allCurrencies

        public ImmutableSet<Currency> allCurrencies()
        Description copied from interface: Product
        Returns the set of currencies the product refers to.

        This 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.

        Specified by:
        allCurrencies in interface Product
        Returns:
        the set of currencies the product refers to
      • allRateIndices

        public ImmutableSet<Index> allRateIndices()
        Returns the set of rate indices referred to by the CMS.

        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.

        Returns:
        the set of indices referred to by this CMS
      • meta

        public static Cms.Meta meta()
        The meta-bean for Cms.
        Returns:
        the meta-bean, not null
      • metaBean

        public Cms.Meta metaBean()
        Specified by:
        metaBean in interface org.joda.beans.Bean
      • getCmsLeg

        public CmsLeg getCmsLeg()
        Gets the CMS leg of the product.

        This is associated with periodic payments based on swap rate. The payments are CMS coupons, CMS caplets or CMS floors.

        Returns:
        the value of the property, not null
      • getPayLeg

        public Optional<SwapLeg> getPayLeg()
        Gets the optional pay leg of the product.

        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.

        Returns:
        the optional value of the property, not null
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object