Class OvernightFuture.Builder

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

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

      • get

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

        public OvernightFuture.Builder securityId​(SecurityId securityId)
        Sets the security identifier.

        This identifier uniquely identifies the security within the system.

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

        public OvernightFuture.Builder currency​(Currency currency)
        Sets the currency that the future is traded in, defaulted from the index if not set.
        Parameters:
        currency - the new value, not null
        Returns:
        this, for chaining, not null
      • notional

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

        This is the full notional of the deposit, such as 5 million dollars. The notional expressed here must be positive. The currency of the notional is specified by currency.

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

        public OvernightFuture.Builder accrualFactor​(double accrualFactor)
        Sets the accrual factor, defaulted from the index if not set.

        This is the year fraction of the contract, typically 1/12 for a 30-day future. As such, it is often unrelated to the day count of the index. The year fraction must be positive.

        Parameters:
        accrualFactor - the new value
        Returns:
        this, for chaining, not null
      • lastTradeDate

        public OvernightFuture.Builder lastTradeDate​(LocalDate lastTradeDate)
        Sets the last date of trading.

        This must be a valid business day on the fixing calendar of index. For example, the last trade date is often the last business day of the month.

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

        public OvernightFuture.Builder startDate​(LocalDate startDate)
        Sets the first date of the rate calculation period.

        This is not necessarily a valid business day on the fixing calendar of index. However, it will be adjusted in OvernightRateComputation if needed.

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

        public OvernightFuture.Builder endDate​(LocalDate endDate)
        Sets the last date of the rate calculation period.

        This is not necessarily a valid business day on the fixing calendar of index. However, it will be adjusted in OvernightRateComputation if needed.

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

        public OvernightFuture.Builder index​(OvernightIndex index)
        Sets the underlying Overnight index.

        The future is based on this index. It will be a well known market index such as 'USD-FED-FUND'.

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

        public OvernightFuture.Builder accrualMethod​(OvernightAccrualMethod accrualMethod)
        Sets the method of accruing Overnight interest.

        The average rate is calculated based on this method over the period between startDate and endDate.

        Parameters:
        accrualMethod - the new value, not null
        Returns:
        this, for chaining, not null
      • rounding

        public OvernightFuture.Builder rounding​(Rounding rounding)
        Sets the definition of how to round the futures price, defaulted to no rounding.

        The price is represented in decimal form, not percentage form. As such, the decimal places expressed by the rounding refers to this decimal form. For example, the common market price of 99.7125 for a 0.2875% rate is represented as 0.997125 which has 6 decimal places.

        Parameters:
        rounding - 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<OvernightFuture>