Class InflationRateCalculation.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<InflationRateCalculation>
-
- com.opengamma.strata.product.swap.InflationRateCalculation.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<InflationRateCalculation>
- Enclosing class:
- InflationRateCalculation
public static final class InflationRateCalculation.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<InflationRateCalculation>
The bean-builder forInflationRateCalculation.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InflationRateCalculationbuild()InflationRateCalculation.BuilderfirstIndexValue(Double firstIndexValue)Sets the initial value of the index, optional.InflationRateCalculation.Buildergearing(ValueSchedule gearing)Sets the gearing multiplier, optional.Objectget(String propertyName)InflationRateCalculation.Builderindex(PriceIndex index)Sets the index of prices.InflationRateCalculation.BuilderindexCalculationMethod(PriceIndexCalculationMethod indexCalculationMethod)Sets reference price index calculation method.InflationRateCalculation.Builderlag(Period lag)Sets the positive period between the price index and the accrual date, typically a number of months.InflationRateCalculation.Builderset(String propertyName, Object newValue)InflationRateCalculation.Builderset(org.joda.beans.MetaProperty<?> property, Object value)StringtoString()
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
getin interfaceorg.joda.beans.BeanBuilder<InflationRateCalculation>- Overrides:
getin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<InflationRateCalculation>
-
set
public InflationRateCalculation.Builder set(String propertyName, Object newValue)
-
set
public InflationRateCalculation.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
setin interfaceorg.joda.beans.BeanBuilder<InflationRateCalculation>- Overrides:
setin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<InflationRateCalculation>
-
build
public InflationRateCalculation build()
-
index
public InflationRateCalculation.Builder index(PriceIndex index)
Sets the index of prices.The pay-off is computed based on this index The most common implementations are provided in
PriceIndices.- Parameters:
index- the new value, not null- Returns:
- this, for chaining, not null
-
lag
public InflationRateCalculation.Builder lag(Period lag)
Sets the positive period between the price index and the accrual date, typically a number of months.A price index is typically published monthly and has a delay before publication. The lag is subtracted from the accrual start and end date to locate the month of the data to be observed.
For example, the September data may be published in October or November. A 3 month lag will cause an accrual date in December to be based on the observed data for September, which should be available by then.
- Parameters:
lag- the new value, not null- Returns:
- this, for chaining, not null
-
indexCalculationMethod
public InflationRateCalculation.Builder indexCalculationMethod(PriceIndexCalculationMethod indexCalculationMethod)
Sets reference price index calculation method.This specifies how the reference index calculation occurs.
- Parameters:
indexCalculationMethod- the new value, not null- Returns:
- this, for chaining, not null
-
firstIndexValue
public InflationRateCalculation.Builder firstIndexValue(Double firstIndexValue)
Sets the initial value of the index, optional.This optional field specifies the initial value of the index. The value is applicable for the first regular accrual period. It is used in place of an observed fixing. Other calculation elements, such as gearing or spread, still apply. After the first accrual period, the rate is observed via the normal fixing process.
The method
InflationRateCalculation.createRateComputation(LocalDate)allows this field to be used as the base for any end date, as typically seen in capital indexed bonds.If this property is not present, then the first value is observed via the normal fixing process.
- Parameters:
firstIndexValue- the new value- Returns:
- this, for chaining, not null
-
gearing
public InflationRateCalculation.Builder gearing(ValueSchedule gearing)
Sets the gearing multiplier, optional.This defines the gearing as an initial value and a list of adjustments.
When calculating the index, the gearing acts as a overall factor of pay-off. The pay-off is
Gearing_Factor * (Index_End / Index_Start - 1). A gearing of 1 has no effect.If this property is not present, then no gearing applies.
Gearing is also known as leverage.
- Parameters:
gearing- the new value- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toStringin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<InflationRateCalculation>
-
-