Class Fra

  • All Implemented Interfaces:
    Resolvable<ResolvedFra>, Product, java.io.Serializable, org.joda.beans.Bean, org.joda.beans.ImmutableBean

    public final class Fra
    extends java.lang.Object
    implements Product, Resolvable<ResolvedFra>, org.joda.beans.ImmutableBean, java.io.Serializable
    A forward rate agreement (FRA).

    A FRA is a financial instrument that represents the one off exchange of a fixed rate of interest for a floating rate at a future date.

    For example, a FRA might involve an agreement to exchange the difference between the fixed rate of 1% and the 'GBP-LIBOR-3M' rate in 2 months time.

    The FRA is defined by four dates.

    • Start date, the date on which the implied deposit starts
    • End date, the date on which the implied deposit ends
    • Fixing date, the date on which the index is to be observed, typically 2 business days before the start date
    • Payment date, the date on which payment is made, typically the same as the start date

    The start date, end date and payment date are determined when the trade if created, adjusting to valid business days based on the holiday calendar dates known on the trade trade. The payment date may be further adjusted when the FRA is resolved if an additional holiday has been added. The data model does allow for the start and end dates to be adjusted when the FRA is resolved, but this is typically not used.

    See Also:
    Serialized Form
    • Method Detail

      • allCurrencies

        public ImmutableSet<Currency> allCurrencies()
        Description copied from interface: Product
        Returns the set of currencies the product refers to.

        This returns the complete set of currencies, not just the payment currencies. For example, the sets will differ when one of the currencies is non-deliverable.

        Specified by:
        allCurrencies in interface Product
        Returns:
        the set of currencies the product refers to
      • resolve

        public ResolvedFra resolve​(ReferenceData refData)
        Description copied from interface: Resolvable
        Resolves this object using the specified reference data.

        This converts the object implementing this interface to the equivalent resolved form. All ReferenceDataId identifiers in this instance will be resolved. The resolved form will typically be a type that is optimized for pricing.

        Resolved objects may be 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.

        Specified by:
        resolve in interface Resolvable<ResolvedFra>
        Parameters:
        refData - the reference data to use when resolving
        Returns:
        the resolved instance
      • meta

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

        public static Fra.Builder builder()
        Returns a builder used to create an instance of the bean.
        Returns:
        the builder, not null
      • metaBean

        public Fra.Meta metaBean()
        Specified by:
        metaBean in interface org.joda.beans.Bean
      • getBuySell

        public BuySell getBuySell()
        Gets whether the FRA is buy or sell.

        A value of 'Buy' implies that the floating rate is received from the counterparty, with the fixed rate being paid. A value of 'Sell' implies that the floating rate is paid to the counterparty, with the fixed rate being received.

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

        public Currency getCurrency()
        Gets the primary currency, defaulted to the currency of the index.

        This is the currency of the FRA 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.

        When building, this will default to the currency of the index if not specified.

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

        public double getNotional()
        Gets the notional amount.

        The notional expressed here must be positive. The currency of the notional is specified by currency.

        Returns:
        the value of the property
      • getStartDate

        public java.time.LocalDate getStartDate()
        Gets the start date, which is the effective date of the FRA.

        This is the first date that interest accrues.

        This date is typically set to be a valid business day. Optionally, the businessDayAdjustment property may be set to provide a rule for adjustment.

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

        public java.time.LocalDate getEndDate()
        Gets the end date, which is the termination date of the FRA.

        This is the last day that interest accrues. This date must be after the start date.

        This date is typically set to be a valid business day. Optionally, the businessDayAdjustment property may be set to provide a rule for adjustment.

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

        public java.util.Optional<BusinessDayAdjustment> getBusinessDayAdjustment()
        Gets the business day adjustment to apply to the start and end date, optional.

        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.

        Returns:
        the optional value of the property, not null
      • getPaymentDate

        public AdjustableDate getPaymentDate()
        Gets the payment date.

        The payment date is typically the same as the start date. The date may be subject to adjustment to ensure it is a business day.

        When building, this will default to the start date with no adjustments if not specified.

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

        public double getFixedRate()
        Gets the fixed rate of interest. A 5% rate will be expressed as 0.05.

        See buySell to determine whether this rate is paid or received.

        Returns:
        the value of the property
      • getIndex

        public 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'. This will be used throughout unless indexInterpolated is present.

        See buySell to determine whether this rate is paid or received.

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

        public java.util.Optional<IborIndex> getIndexInterpolated()
        Gets the second Ibor index to be used for linear interpolation, optional.

        This will be used with index to linearly interpolate the rate. It will be a well known market index such as 'GBP-LIBOR-6M'. This index may be shorter or longer than index, but not the same.

        Returns:
        the optional value of the property, not null
      • getFixingDateOffset

        public DaysAdjustment getFixingDateOffset()
        Gets the offset of the fixing date from the start date.

        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.

        When building, this will default to the fixing date offset of the index if not specified.

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

        public DayCount getDayCount()
        Gets the day count convention applicable, defaulted to the day count of the index.

        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.

        When building, this will default to the day count of the index if not specified.

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

        public FraDiscountingMethod getDiscounting()
        Gets the method to use for discounting, defaulted to 'ISDA' or 'AFMA'.

        There are different approaches FRA pricing in the area of discounting. This method specifies the approach for this FRA.

        When building, this will default 'AFMA' if the index has the currency 'AUD' or 'NZD' and to 'ISDA' otherwise.

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

        public Fra.Builder toBuilder()
        Returns a builder that allows this bean to be mutated.
        Returns:
        the mutable builder, 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