Class FixedOvernightCompoundedAnnualRateComputation
- java.lang.Object
-
- com.opengamma.strata.product.rate.FixedOvernightCompoundedAnnualRateComputation
-
- All Implemented Interfaces:
RateComputation,Serializable,org.joda.beans.Bean,org.joda.beans.ImmutableBean
public final class FixedOvernightCompoundedAnnualRateComputation extends Object implements RateComputation, org.joda.beans.ImmutableBean, 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFixedOvernightCompoundedAnnualRateComputation.MetaThe meta-bean forFixedOvernightCompoundedAnnualRateComputation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcollectIndices(ImmutableSet.Builder<Index> builder)Collects all the indices referred to by this computation.booleanequals(Object obj)doublegetAccrualFactor()Gets the accrual factor.doublegetRate()Gets the fixed rate for overnight compounding.doublegetSimpleRate()Calculates the simple interest rate associated with the compounded rate.inthashCode()static FixedOvernightCompoundedAnnualRateComputation.Metameta()The meta-bean forFixedOvernightCompoundedAnnualRateComputation.FixedOvernightCompoundedAnnualRateComputation.MetametaBean()static FixedOvernightCompoundedAnnualRateComputationof(double rate, double accrualFactor)Obtains an instance from the rate and accrual factor.StringtoString()
-
-
-
Method Detail
-
of
public static FixedOvernightCompoundedAnnualRateComputation of(double rate, double accrualFactor)
Obtains an instance from the rate and accrual factor.- Parameters:
rate- the fixed rateaccrualFactor- 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(ImmutableSet.Builder<Index> builder)
Description copied from interface:RateComputationCollects 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:
collectIndicesin interfaceRateComputation- Parameters:
builder- the builder to use
-
meta
public static FixedOvernightCompoundedAnnualRateComputation.Meta meta()
The meta-bean forFixedOvernightCompoundedAnnualRateComputation.- Returns:
- the meta-bean, not null
-
metaBean
public FixedOvernightCompoundedAnnualRateComputation.Meta metaBean()
- Specified by:
metaBeanin interfaceorg.joda.beans.Bean
-
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
-
-