Class OvernightCompoundedRateComputation.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<OvernightCompoundedRateComputation>
-
- com.opengamma.strata.product.rate.OvernightCompoundedRateComputation.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<OvernightCompoundedRateComputation>
- Enclosing class:
- OvernightCompoundedRateComputation
public static final class OvernightCompoundedRateComputation.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<OvernightCompoundedRateComputation>
The bean-builder forOvernightCompoundedRateComputation.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OvernightCompoundedRateComputationbuild()OvernightCompoundedRateComputation.BuilderendDate(LocalDate endDate)Sets the fixing date associated with the end date of the accrual period.OvernightCompoundedRateComputation.BuilderfixingCalendar(HolidayCalendar fixingCalendar)Sets the resolved calendar that the index uses.Objectget(String propertyName)OvernightCompoundedRateComputation.Builderindex(OvernightIndex index)Sets the Overnight index.OvernightCompoundedRateComputation.BuilderrateCutOffDays(int rateCutOffDays)Sets the number of business days before the end of the period that the rate is cut off.OvernightCompoundedRateComputation.Builderset(String propertyName, Object newValue)OvernightCompoundedRateComputation.Builderset(org.joda.beans.MetaProperty<?> property, Object value)OvernightCompoundedRateComputation.BuilderstartDate(LocalDate startDate)Sets the fixing date associated with the start date of the accrual period.StringtoString()
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
getin interfaceorg.joda.beans.BeanBuilder<OvernightCompoundedRateComputation>- Overrides:
getin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<OvernightCompoundedRateComputation>
-
set
public OvernightCompoundedRateComputation.Builder set(String propertyName, Object newValue)
-
set
public OvernightCompoundedRateComputation.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
setin interfaceorg.joda.beans.BeanBuilder<OvernightCompoundedRateComputation>- Overrides:
setin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<OvernightCompoundedRateComputation>
-
build
public OvernightCompoundedRateComputation build()
-
index
public OvernightCompoundedRateComputation.Builder index(OvernightIndex index)
Sets the Overnight index.The rate to be paid is based on this index. It will be a well known market index such as 'GBP-SONIA'.
- Parameters:
index- the new value, not null- Returns:
- this, for chaining, not null
-
fixingCalendar
public OvernightCompoundedRateComputation.Builder fixingCalendar(HolidayCalendar fixingCalendar)
Sets the resolved calendar that the index uses.- Parameters:
fixingCalendar- the new value, not null- Returns:
- this, for chaining, not null
-
startDate
public OvernightCompoundedRateComputation.Builder startDate(LocalDate startDate)
Sets the fixing date associated with the start date of the accrual period.This is also the first fixing date. The overnight rate is observed from this date onwards.
In general, the fixing dates and accrual dates are the same for an overnight index. However, in the case of a Tomorrow/Next index, the fixing period is one business day before the accrual period.
- Parameters:
startDate- the new value, not null- Returns:
- this, for chaining, not null
-
endDate
public OvernightCompoundedRateComputation.Builder endDate(LocalDate endDate)
Sets the fixing date associated with the end date of the accrual period.The overnight rate is observed until this date.
In general, the fixing dates and accrual dates are the same for an overnight index. However, in the case of a Tomorrow/Next index, the fixing period is one business day before the accrual period.
- Parameters:
endDate- the new value, not null- Returns:
- this, for chaining, not null
-
rateCutOffDays
public OvernightCompoundedRateComputation.Builder rateCutOffDays(int rateCutOffDays)
Sets the number of business days before the end of the period that the rate is cut off.When a rate cut-off applies, the final daily rate is determined this number of days before the end of the period, with any subsequent days having the same rate.
The amount must be zero or positive. A value of zero or one will have no effect on the standard calculation. The fixing holiday calendar of the index is used to determine business days.
For example, a value of
3means that the rate observed on(periodEndDate - 3 business days)is also to be used on(periodEndDate - 2 business days)and(periodEndDate - 1 business day).If there are multiple accrual periods in the payment period, then this should typically only be non-zero in the last accrual period.
- Parameters:
rateCutOffDays- the new value- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toStringin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<OvernightCompoundedRateComputation>
-
-