Class ResolvedCms

  • All Implemented Interfaces:
    ResolvedProduct, java.io.Serializable, Bean, ImmutableBean

    public final class ResolvedCms
    extends java.lang.Object
    implements ResolvedProduct, ImmutableBean, java.io.Serializable
    A constant maturity swap (CMS) or CMS cap/floor, resolved for pricing.

    This is the resolved form of Cms and is an input to the pricers. Applications will typically create a ResolvedCms from a Cms using Cms.resolve(ReferenceData).

    A ResolvedCms 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
    • Method Detail

      • of

        public static ResolvedCms of​(ResolvedCmsLeg 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 ResolvedCms of​(ResolvedCmsLeg cmsLeg,
                                     ResolvedSwapLeg payLeg)
        Obtains an instance from a CMS leg and a pay leg.
        Parameters:
        cmsLeg - the CMS leg
        payLeg - the pay leg
        Returns:
        the CMS
      • allPaymentCurrencies

        public com.google.common.collect.ImmutableSet<Currency> allPaymentCurrencies()
        Returns the set of currencies referred to by the CMS.

        This returns the complete set of payment currencies for the CMS. This will typically return one currency, but could return two.

        Returns:
        the set of payment currencies referred to by this swap
      • meta

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

        public ResolvedCmsLeg 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<ResolvedSwapLeg> 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 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