Class ResolvedFra.Builder

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

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

      • get

        public Object get​(String propertyName)
        Specified by:
        get in interface org.joda.beans.BeanBuilder<ResolvedFra>
        Overrides:
        get in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedFra>
      • set

        public ResolvedFra.Builder set​(org.joda.beans.MetaProperty<?> property,
                                       Object value)
        Specified by:
        set in interface org.joda.beans.BeanBuilder<ResolvedFra>
        Overrides:
        set in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedFra>
      • currency

        public ResolvedFra.Builder currency​(Currency currency)
        Sets the primary currency.

        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.

        Parameters:
        currency - the new value, not null
        Returns:
        this, for chaining, not null
      • notional

        public ResolvedFra.Builder notional​(double notional)
        Sets the notional amount.

        The notional, which is a positive signed amount if the FRA is 'buy', and a negative signed amount if the FRA is 'sell'.

        The currency of the notional is specified by currency.

        Parameters:
        notional - the new value
        Returns:
        this, for chaining, not null
      • paymentDate

        public ResolvedFra.Builder paymentDate​(LocalDate paymentDate)
        Sets the date that payment occurs.

        This is an adjusted date, which should be a valid business day

        Parameters:
        paymentDate - the new value, not null
        Returns:
        this, for chaining, not null
      • startDate

        public ResolvedFra.Builder startDate​(LocalDate startDate)
        Sets the start date, which is the effective date of the FRA.

        This is the first date that interest accrues.

        This is an adjusted date, which should be a valid business day

        Parameters:
        startDate - the new value, not null
        Returns:
        this, for chaining, not null
      • endDate

        public ResolvedFra.Builder endDate​(LocalDate endDate)
        Sets 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 is an adjusted date, which should be a valid business day

        Parameters:
        endDate - the new value, not null
        Returns:
        this, for chaining, not null
      • yearFraction

        public ResolvedFra.Builder yearFraction​(double yearFraction)
        Sets the year fraction between the start and end date.

        The value is usually calculated using a DayCount. Typically the value will be close to 1 for one year and close to 0.5 for six months. The fraction may be greater than 1, but not less than 0.

        Parameters:
        yearFraction - the new value
        Returns:
        this, for chaining, not null
      • fixedRate

        public ResolvedFra.Builder fixedRate​(double fixedRate)
        Sets the fixed rate of interest. A 5% rate will be expressed as 0.05.
        Parameters:
        fixedRate - the new value
        Returns:
        this, for chaining, not null
      • floatingRate

        public ResolvedFra.Builder floatingRate​(RateComputation floatingRate)
        Sets the floating rate of interest.

        The floating rate to be paid is based on this index. It will be a well known market index such as 'GBP-LIBOR-3M'.

        Parameters:
        floatingRate - the new value, not null
        Returns:
        this, for chaining, not null
      • discounting

        public ResolvedFra.Builder discounting​(FraDiscountingMethod discounting)
        Sets the method to use for discounting.

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

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

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