Class ImmutableIborFixingDepositConvention

  • All Implemented Interfaces:
    Named, IborFixingDepositConvention, TradeConvention, Serializable, org.joda.beans.Bean, org.joda.beans.ImmutableBean

    public final class ImmutableIborFixingDepositConvention
    extends Object
    implements IborFixingDepositConvention, org.joda.beans.ImmutableBean, Serializable
    A convention for Ibor fixing deposit trades.

    This defines the convention for an Ibor fixing deposit against a particular index. In most cases, the index contains sufficient information to fully define the convention. As such, no other fields need to be specified when creating an instance. The name of the convention is the same as the name of the index by default. The getters will default any missing information on the fly, avoiding both null and Optional.

    The convention is defined by four dates.

    • Trade date, the date that the trade is agreed
    • Start date or spot date, the date on which the deposit starts, typically 2 business days after the trade date
    • End date, the date on which deposit ends, typically a number of months after the start date
    • Fixing date, the date on which the index is to be observed, typically 2 business days before the start date
    The period between the start date and end date is specified by IborFixingDepositTemplate, not by this convention. However, the period is typically equal to the tenor of the index.
    See Also:
    Serialized Form
    • Method Detail

      • of

        public static ImmutableIborFixingDepositConvention of​(IborIndex index)
        Obtains a convention based on the specified index.

        The standard convention for an Ibor fixing deposit is based exclusively on the index. This creates an instance that contains the index. The instance is not dereferenced using the FraConvention name, as such the result of this method and IborFixingDepositConvention.of(IborIndex) can differ.

        Use the builder for unusual conventions.

        Parameters:
        index - the index, the convention values are extracted from the index
        Returns:
        the convention
      • getName

        public String getName()
        Gets the convention name, such as 'GBP-LIBOR-3M'.

        This will default to the name of the index if not specified.

        Specified by:
        getName in interface IborFixingDepositConvention
        Specified by:
        getName in interface Named
        Returns:
        the convention name
      • getCurrency

        public Currency getCurrency()
        Gets the primary currency, providing a default result if no override specified.

        This is the currency of the Ibor fixing deposit and the currency that payment is made in. The data model permits this currency to differ from that of the index, however the two are typically the same.

        This will default to the currency of the index if not specified.

        Returns:
        the currency, not null
      • getDayCount

        public DayCount getDayCount()
        Gets the day count convention applicable, providing a default result if no override specified.

        This is used to convert dates to a numerical value. The data model permits the day count to differ from that of the index, however the two are typically the same.

        This will default to the day count of the index if not specified.

        Returns:
        the day count, not null
      • getSpotDateOffset

        public DaysAdjustment getSpotDateOffset()
        Gets the offset of the spot value date from the trade date, providing a default result if no override specified.

        The offset is applied to the trade date and is typically plus 2 business days. The start and end date of the term are relative to the spot date.

        This will default to the effective date offset of the index if not specified.

        Specified by:
        getSpotDateOffset in interface IborFixingDepositConvention
        Returns:
        the spot date offset, not null
      • getBusinessDayAdjustment

        public BusinessDayAdjustment getBusinessDayAdjustment()
        Gets the business day adjustment to apply to the start and end date, providing a default result if no override specified.

        The start and end date are typically defined as valid business days and thus do not need to be adjusted. If this optional property is present, then the start and end date will be adjusted as defined here.

        This will default to 'ModifiedFollowing' using the index fixing calendar if not specified.

        Returns:
        the business day adjustment, not null
      • getFixingDateOffset

        public DaysAdjustment getFixingDateOffset()
        Gets the offset of the fixing date from the start date, providing a default result if no override specified.

        The offset is applied to the start date and is typically minus 2 business days. The data model permits the offset to differ from that of the index, however the two are typically the same.

        This will default to the fixing date offset of the index if not specified.

        Returns:
        the fixing date offset, not null
      • createTrade

        public IborFixingDepositTrade createTrade​(LocalDate tradeDate,
                                                  Period depositPeriod,
                                                  BuySell buySell,
                                                  double notional,
                                                  double fixedRate,
                                                  ReferenceData refData)
        Description copied from interface: IborFixingDepositConvention
        Creates a trade based on this convention.

        This returns a trade based on the specified deposit period.

        The notional is unsigned, with buy/sell determining the direction of the trade. If buying the Ibor fixing deposit, the floating rate is paid to the counterparty, with the fixed rate being received. If selling the Ibor fixing deposit, the floating rate is received from the counterparty, with the fixed rate being paid.

        Specified by:
        createTrade in interface IborFixingDepositConvention
        Parameters:
        tradeDate - the date of the trade
        depositPeriod - the period between the start date and the end date
        buySell - the buy/sell flag
        notional - the notional amount, in the payment currency of the template
        fixedRate - the fixed rate, typically derived from the market
        refData - the reference data, used to resolve the trade dates
        Returns:
        the trade
      • toTrade

        public IborFixingDepositTrade toTrade​(TradeInfo tradeInfo,
                                              LocalDate startDate,
                                              LocalDate endDate,
                                              BuySell buySell,
                                              double notional,
                                              double fixedRate)
        Description copied from interface: IborFixingDepositConvention
        Creates a trade based on this convention.

        This returns a trade based on the specified dates. The notional is unsigned, with buy/sell determining the direction of the trade. If buying the Ibor fixing deposit, the floating rate is paid to the counterparty, with the fixed rate being received. If selling the Ibor fixing deposit, the floating rate is received from the counterparty, with the fixed rate being paid.

        Specified by:
        toTrade in interface IborFixingDepositConvention
        Parameters:
        tradeInfo - additional information about the trade
        startDate - the start date
        endDate - the end date
        buySell - the buy/sell flag
        notional - the notional amount, in the payment currency of the template
        fixedRate - the fixed rate, typically derived from the market
        Returns:
        the trade
      • getIndex

        public IborIndex getIndex()
        Gets the Ibor index.

        The floating rate to be paid or received is based on this index It will be a well known market index such as 'GBP-LIBOR-3M'.

        Specified by:
        getIndex in interface IborFixingDepositConvention
        Returns:
        the value of the property, not null
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object