Class IborFixingDepositTemplate

  • All Implemented Interfaces:
    TradeTemplate, java.io.Serializable, org.joda.beans.Bean, org.joda.beans.ImmutableBean

    public final class IborFixingDepositTemplate
    extends java.lang.Object
    implements TradeTemplate, org.joda.beans.ImmutableBean, java.io.Serializable
    A template for creating an Ibor fixing deposit trade.

    This defines almost all the data necessary to create a IborFixingDepositTrade. The trade date, notional and fixed rate are required to complete the template and create the trade. As such, it is often possible to get a market price for a trade based on the template.

    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
    Some of these dates are specified by the convention embedded within this template.
    See Also:
    Serialized Form
    • Method Detail

      • of

        public static IborFixingDepositTemplate of​(IborIndex index)
        Obtains a template based on the specified index.

        The period from the start date to the end date will be the tenor of the index. The convention will be created based on the index.

        Parameters:
        index - the index that defines the market convention
        Returns:
        the template
      • of

        public static IborFixingDepositTemplate of​(java.time.Period depositPeriod,
                                                   IborIndex index)
        Obtains a template based on the specified period and index.

        The period from the start date to the end is specified. The convention will be created based on the index.

        Parameters:
        depositPeriod - the period between the start date and the end date
        index - the index that defines the market convention
        Returns:
        the template
      • of

        public static IborFixingDepositTemplate of​(java.time.Period depositPeriod,
                                                   IborFixingDepositConvention convention)
        Obtains a template based on the specified periods and convention.
        Parameters:
        depositPeriod - the period between the start date and the end date
        convention - the market convention
        Returns:
        the template
      • createTrade

        public IborFixingDepositTrade createTrade​(java.time.LocalDate tradeDate,
                                                  BuySell buySell,
                                                  double notional,
                                                  double fixedRate,
                                                  ReferenceData refData)
        Creates a trade based on this template.

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

        Parameters:
        tradeDate - the date of the trade
        buySell - the buy/sell flag, see IborFixingDeposit.getBuySell()
        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
      • getDepositPeriod

        public java.time.Period getDepositPeriod()
        Gets the period between the start date and the end date.

        The difference between the start date and the end date typically matches the tenor of the index, however this is not validated.

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

        public IborFixingDepositConvention getConvention()
        Gets the underlying Ibor fixing deposit convention.

        This specifies the standard convention of the Ibor fixing deposit to be created.

        Returns:
        the 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