Class Cms

  • All Implemented Interfaces:
    Resolvable<ResolvedCms>, Product, java.io.Serializable, Bean, ImmutableBean

    public final class Cms
    extends java.lang.Object
    implements Product, Resolvable<ResolvedCms>, ImmutableBean, java.io.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 com.google.common.collect.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 com.google.common.collect.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 com.google.common.collect.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
      • 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 java.util.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
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object