Class FxResetCalculation

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

    public final class FxResetCalculation
    extends Object
    implements org.joda.beans.ImmutableBean, Serializable
    Defines the calculation of an FX rate conversion for the notional amount of a swap leg.

    Interest rate swaps are based on a notional amount of money. The notional can be specified in a currency other than that of the swap leg, with an FX conversion applied at each payment period boundary.

    The two currencies involved are the swap leg currency and the reference currency. The swap leg currency is, in most cases, the currency that payment will occur in. The reference currency is the currency in which the notional is actually defined. ISDA refers to the payment currency as the variable currency and the reference currency as the constant currency.

    Defined by the 2006 ISDA definitions article 10.

    See Also:
    Serialized Form
    • Method Detail

      • resolve

        public BiFunction<Integer,​SchedulePeriod,​Optional<FxReset>> resolve​(ReferenceData refData)
        Resolves this adjustment using the specified reference data.

        Calling this method resolves the holiday calendar, returning a function that can convert a SchedulePeriod and period index pair to an optional FxReset. The conversion locks the fixing date based on the specified schedule period and the data held in this object.

        Parameters:
        refData - the reference data to use when resolving
        Returns:
        the resolved function
        Throws:
        ReferenceDataNotFoundException - if an identifier cannot be resolved in the reference data
        RuntimeException - if the calculation is invalid
      • meta

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

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

        public FxIndex getIndex()
        Gets the FX index used to obtain the FX reset rate.

        This is the index of FX used to obtain the FX reset rate. An FX index is a daily rate of exchange between two currencies. Note that the order of the currencies in the index does not matter, as the conversion direction is fully defined by the reference and swap leg currencies.

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

        public Currency getReferenceCurrency()
        Gets the currency of the notional amount defined in the contract.

        This is the currency of notional amount as defined in the contract. The amount will be converted from this reference currency to the swap leg currency when calculating the value of the leg.

        The reference currency must be one of the two currencies of the index.

        The reference currency is also known as the constant currency.

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

        public FxResetFixingRelativeTo getFixingRelativeTo()
        Gets the base date that each FX reset fixing is made relative to, defaulted to 'PeriodStart'.

        The FX reset fixing date is relative to either the start or end of each accrual period.

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

        public DaysAdjustment getFixingDateOffset()
        Gets the offset of the FX reset fixing date from each adjusted accrual date.

        The offset is applied to the base date specified by fixingRelativeTo. The offset is typically a negative number of business days.

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

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

        public OptionalDouble getInitialNotionalValue()
        Gets the initial notional value, specified in the payment currency.

        If present, this fixed amount represents the notional of the initial period of the swap leg, with no FX reset being applied.

        If not present, the initial notional amount is calculated by applying an fx conversion to the reference currency in the same manner as all other period notional calculations.

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

        public FxResetCalculation.Builder toBuilder()
        Returns a builder that allows this bean to be mutated.
        Returns:
        the mutable builder, not null
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object