Class IborAveragedFixing

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

    public final class IborAveragedFixing
    extends Object
    implements org.joda.beans.ImmutableBean, Serializable
    A single fixing of an index that is observed by IborAveragedRateComputation.

    The interest rate is determined for each reset period, with the weight used to create a weighted average.

    See Also:
    Serialized Form
    • Method Detail

      • of

        public static IborAveragedFixing of​(IborIndexObservation observation)
        Creates a IborAveragedFixing from the fixing date with a weight of 1.
        Parameters:
        observation - the Ibor observation
        Returns:
        the unweighted fixing information
      • of

        public static IborAveragedFixing of​(IborIndexObservation observation,
                                            Double fixedRate)
        Creates a IborAveragedFixing from the fixing date with a weight of 1.
        Parameters:
        observation - the Ibor observation
        fixedRate - the fixed rate for the fixing date, optional, may be null
        Returns:
        the unweighted fixing information
      • ofDaysInResetPeriod

        public static IborAveragedFixing ofDaysInResetPeriod​(IborIndexObservation observation,
                                                             LocalDate startDate,
                                                             LocalDate endDate)
        Creates a IborAveragedFixing from the fixing date, calculating the weight from the number of days in the reset period.

        This implements the standard approach to average weights, which is to set each weight to the actual number of days between the start and end of the reset period.

        Parameters:
        observation - the Ibor observation
        startDate - the start date of the reset period
        endDate - the end date of the reset period
        Returns:
        the weighted fixing information
      • ofDaysInResetPeriod

        public static IborAveragedFixing ofDaysInResetPeriod​(IborIndexObservation observation,
                                                             LocalDate startDate,
                                                             LocalDate endDate,
                                                             Double fixedRate)
        Creates a IborAveragedFixing from the fixing date, calculating the weight from the number of days in the reset period.

        This implements the standard approach to average weights, which is to set each weight to the actual number of days between the start and end of the reset period.

        Parameters:
        observation - the Ibor observation
        startDate - the start date of the reset period
        endDate - the end date of the reset period
        fixedRate - the fixed rate for the fixing date, optional, may be null
        Returns:
        the weighted fixing information
      • meta

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

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

        public IborIndexObservation getObservation()
        Gets the Ibor index observation to use to determine a rate for the reset period.
        Returns:
        the value of the property, not null
      • getFixedRate

        public OptionalDouble getFixedRate()
        Gets the fixed rate for the fixing date, optional. A 5% rate will be expressed as 0.05.

        In certain circumstances two counterparties agree the rate of a fixing when the contract starts. It is used in place of an observed fixing. Other calculation elements, such as gearing or spread, still apply.

        If the value not present, which is the normal case, then the rate is observed via the normal fixing process.

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

        public double getWeight()
        Gets the weight to apply to this fixing.

        If the averaging is unweighted, then all weights must be one.

        Returns:
        the value of the property
      • toBuilder

        public IborAveragedFixing.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