Class FxResetCalculation.Builder

  • All Implemented Interfaces:
    org.joda.beans.BeanBuilder<FxResetCalculation>
    Enclosing class:
    FxResetCalculation

    public static final class FxResetCalculation.Builder
    extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<FxResetCalculation>
    The bean-builder for FxResetCalculation.
    • Method Detail

      • index

        public FxResetCalculation.Builder index​(FxIndex index)
        Sets 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.

        Parameters:
        index - the new value, not null
        Returns:
        this, for chaining, not null
      • referenceCurrency

        public FxResetCalculation.Builder referenceCurrency​(Currency referenceCurrency)
        Sets 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.

        Parameters:
        referenceCurrency - the new value, not null
        Returns:
        this, for chaining, not null
      • fixingRelativeTo

        public FxResetCalculation.Builder fixingRelativeTo​(FxResetFixingRelativeTo fixingRelativeTo)
        Sets 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.

        Parameters:
        fixingRelativeTo - the new value, not null
        Returns:
        this, for chaining, not null
      • fixingDateOffset

        public FxResetCalculation.Builder fixingDateOffset​(DaysAdjustment fixingDateOffset)
        Sets 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.

        Parameters:
        fixingDateOffset - the new value, not null
        Returns:
        this, for chaining, not null
      • initialNotionalValue

        public FxResetCalculation.Builder initialNotionalValue​(Double initialNotionalValue)
        Sets 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.

        Parameters:
        initialNotionalValue - the new value
        Returns:
        this, for chaining, not null
      • toString

        public String toString()
        Overrides:
        toString in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<FxResetCalculation>