Interface IborFixingDepositConvention

  • All Superinterfaces:
    Named, TradeConvention
    All Known Implementing Classes:
    ImmutableIborFixingDepositConvention

    public interface IborFixingDepositConvention
    extends TradeConvention, Named
    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, the convention is set to be created on the fly based on the index.

    To manually create a convention, see ImmutableIborFixingDepositConvention. To register a specific convention, see IborFixingDepositConvention.ini.

    • Method Detail

      • of

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

        This uses the index name to find the matching convention. By default, this will always return a convention, however configuration may be added to restrict the conventions that are registered.

        Parameters:
        index - the index, from which the index name is used to find the matching convention
        Returns:
        the convention
        Throws:
        IllegalArgumentException - if no convention is registered for the index
      • extendedEnum

        static ExtendedEnum<IborFixingDepositConvention> extendedEnum()
        Gets the extended enum helper.

        This helper allows instances of the convention to be looked up. It also provides the complete set of available instances.

        Returns:
        the extended enum helper
      • getIndex

        IborIndex getIndex()
        Gets the Ibor index.

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

        Returns:
        the index
      • getSpotDateOffset

        DaysAdjustment getSpotDateOffset()
        Gets the offset of the spot value date from the trade date.

        The offset is applied to the trade date to find the start date. A typical value is "plus 2 business days".

        Returns:
        the spot date offset, not null
      • createTrade

        IborFixingDepositTrade createTrade​(LocalDate tradeDate,
                                           Period depositPeriod,
                                           BuySell buySell,
                                           double notional,
                                           double fixedRate,
                                           ReferenceData refData)
        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.

        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
        Throws:
        ReferenceDataNotFoundException - if an identifier cannot be resolved in the reference data
      • toTrade

        default IborFixingDepositTrade toTrade​(LocalDate tradeDate,
                                               LocalDate startDate,
                                               LocalDate endDate,
                                               BuySell buySell,
                                               double notional,
                                               double fixedRate)
        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.

        Parameters:
        tradeDate - the date of 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
      • toTrade

        IborFixingDepositTrade toTrade​(TradeInfo tradeInfo,
                                       LocalDate startDate,
                                       LocalDate endDate,
                                       BuySell buySell,
                                       double notional,
                                       double fixedRate)
        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.

        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
      • calculateSpotDateFromTradeDate

        default LocalDate calculateSpotDateFromTradeDate​(LocalDate tradeDate,
                                                         ReferenceData refData)
        Calculates the spot date from the trade date.
        Parameters:
        tradeDate - the trade date
        refData - the reference data, used to resolve the date
        Returns:
        the spot date
        Throws:
        ReferenceDataNotFoundException - if an identifier cannot be resolved in the reference data
      • getName

        String getName()
        Gets the name that uniquely identifies this convention.

        This name is used in serialization and can be parsed using of(String).

        Specified by:
        getName in interface Named
        Returns:
        the unique name