Class FixedOvernightCompoundedAnnualRateComputation

  • All Implemented Interfaces:
    RateComputation, java.io.Serializable, Bean, ImmutableBean

    public final class FixedOvernightCompoundedAnnualRateComputation
    extends java.lang.Object
    implements RateComputation, ImmutableBean, java.io.Serializable
    Defines a known annual fixed rate of interest that follows overnight compounding.

    An interest rate that is specified in the contract. This is typically used in the fixed legs of a Brazilian swap.

    See Also:
    Serialized Form
    • Method Detail

      • of

        public static FixedOvernightCompoundedAnnualRateComputation of​(double rate,
                                                                       double accrualFactor)
        Obtains an instance from the rate and accrual factor.
        Parameters:
        rate - the fixed rate
        accrualFactor - the accrual factor
        Returns:
        the fixed rate computation
      • getSimpleRate

        public double getSimpleRate()
        Calculates the simple interest rate associated with the compounded rate.
        Returns:
        the simple rate
      • collectIndices

        public void collectIndices​(com.google.common.collect.ImmutableSet.Builder<Index> builder)
        Description copied from interface: RateComputation
        Collects all the indices referred to by this computation.

        A computation will typically refer to one index, such as 'GBP-LIBOR-3M'. Each index that is referred to must be added to the specified builder.

        Specified by:
        collectIndices in interface RateComputation
        Parameters:
        builder - the builder to use
      • getRate

        public double getRate()
        Gets the fixed rate for overnight compounding. A 5% rate will be expressed as 0.05.
        Returns:
        the value of the property
      • getAccrualFactor

        public double getAccrualFactor()
        Gets the accrual factor.
        Returns:
        the value of the property
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object