Class FxIndexObservation

    • Method Detail

      • of

        public static FxIndexObservation of​(FxIndex index,
                                            java.time.LocalDate fixingDate,
                                            ReferenceData refData)
        Creates an instance from an index and fixing date.

        The reference data is used to find the maturity date from the fixing date.

        Parameters:
        index - the index
        fixingDate - the fixing date
        refData - the reference data to use when resolving holiday calendars
        Returns:
        the rate observation
      • getCurrencyPair

        public CurrencyPair getCurrencyPair()
        Gets the currency pair of the FX index.
        Returns:
        the currency pair of the index
      • equals

        public boolean equals​(java.lang.Object obj)
        Compares this observation to another based on the index and fixing date.

        The maturity date is ignored.

        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the other observation
        Returns:
        true if equal
      • hashCode

        public int hashCode()
        Returns a hash code based on the index and fixing date.

        The maturity date is ignored.

        Overrides:
        hashCode in class java.lang.Object
        Returns:
        the hash code
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • meta

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

        public FxIndex getIndex()
        Gets the FX index.

        The rate will be queried from this index.

        Specified by:
        getIndex in interface IndexObservation
        Returns:
        the value of the property, not null
      • getFixingDate

        public java.time.LocalDate getFixingDate()
        Gets the date of the index fixing.

        This is an adjusted date with any business day rule applied. Valid business days are defined by FxIndex.getFixingCalendar().

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

        public java.time.LocalDate getMaturityDate()
        Gets the date of the transfer implied by the fixing date.

        This is an adjusted date with any business day rule applied. This must be equal to FxIndex.calculateMaturityFromFixing(LocalDate, ReferenceData).

        Returns:
        the value of the property, not null