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 class
FixedOvernightCompoundedAnnualRateComputation.Meta
The meta-bean forFixedOvernightCompoundedAnnualRateComputation
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
collectIndices(ImmutableSet.Builder<Index> builder)
Collects all the indices referred to by this computation.boolean
equals(Object obj)
double
getAccrualFactor()
Gets the accrual factor.double
getRate()
Gets the fixed rate for overnight compounding.double
getSimpleRate()
Calculates the simple interest rate associated with the compounded rate.int
hashCode()
static FixedOvernightCompoundedAnnualRateComputation.Meta
meta()
The meta-bean forFixedOvernightCompoundedAnnualRateComputation
.FixedOvernightCompoundedAnnualRateComputation.Meta
metaBean()
static FixedOvernightCompoundedAnnualRateComputation
of(double rate, double accrualFactor)
Obtains an instance from the rate and accrual factor.String
toString()
-
-
-
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: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 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:
metaBean
in 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
-
-