Class InflationRateSwapLegConvention

  • All Implemented Interfaces:
    SwapLegConvention, Serializable, org.joda.beans.Bean, org.joda.beans.ImmutableBean

    public final class InflationRateSwapLegConvention
    extends Object
    implements SwapLegConvention, org.joda.beans.ImmutableBean, Serializable
    A market convention for the floating leg of rate swap trades based on a price index.

    This defines the market convention for a floating leg based on the observed value of a Price index such as 'GB-HICP' or 'US-CPI-U'.

    See Also:
    Serialized Form
    • Method Detail

      • of

        public static InflationRateSwapLegConvention of​(PriceIndex index,
                                                        Period lag,
                                                        PriceIndexCalculationMethod priceIndexCalculationMethod,
                                                        BusinessDayAdjustment businessDayAdjustment)
        Obtains a convention based on the specified index.

        The standard market convention for an Inflation rate leg is based on the index. Use the builder for unusual conventions.

        Parameters:
        index - the index, the market convention values are extracted from the index
        lag - the lag between the price index and the accrual date, typically a number of months
        priceIndexCalculationMethod - the price index calculation method, typically interpolated or monthly
        businessDayAdjustment - the business day
        Returns:
        the convention
      • getCurrency

        public Currency getCurrency()
        Gets the currency of the leg from the index.
        Returns:
        the currency
      • toLeg

        public RateCalculationSwapLeg toLeg​(LocalDate startDate,
                                            LocalDate endDate,
                                            PayReceive payReceive,
                                            double notional)
        Creates a leg based on this convention.

        This returns a leg based on the specified date. The notional is unsigned, with pay/receive determining the direction of the leg. If the leg is 'Pay', the fixed rate is paid to the counterparty. If the leg is 'Receive', the fixed rate is received from the counterparty.

        Parameters:
        startDate - the start date
        endDate - the end date
        payReceive - determines if the leg is to be paid or received
        notional - the business day adjustment to apply to accrual schedule dates
        Returns:
        the leg
      • getIndex

        public PriceIndex getIndex()
        Gets the Price index.

        The floating rate to be paid is based on this price index It will be a well known price index such as 'GB-HICP'.

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

        public Period getLag()
        Gets the positive period between the price index and the accrual date, typically a number of months.

        A price index is typically published monthly and has a delay before publication. The lag is subtracted from the accrual start and end date to locate the month of the data to be observed.

        For example, the September data may be published in October or November. A 3 month lag will cause an accrual date in December to be based on the observed data for September, which should be available by then.

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

        public PriceIndexCalculationMethod getIndexCalculationMethod()
        Gets reference price index calculation method.

        This specifies how the reference index calculation occurs.

        This will default to 'Monthly' if not specified.

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

        public boolean isNotionalExchange()
        Gets the flag indicating whether to exchange the notional.

        If 'true', the notional there is both an initial exchange and a final exchange of notional.

        This will default to 'false' if not specified.

        Returns:
        the value of the property
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object