Class OvernightRateCalculation.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<OvernightRateCalculation>
-
- com.opengamma.strata.product.swap.OvernightRateCalculation.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<OvernightRateCalculation>
- Enclosing class:
- OvernightRateCalculation
public static final class OvernightRateCalculation.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<OvernightRateCalculation>
The bean-builder forOvernightRateCalculation
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OvernightRateCalculation.Builder
accrualMethod(OvernightAccrualMethod accrualMethod)
Sets the method of accruing overnight interest, defaulted to 'Compounded'.OvernightRateCalculation
build()
OvernightRateCalculation.Builder
dayCount(DayCount dayCount)
Sets the day count convention.OvernightRateCalculation.Builder
gearing(ValueSchedule gearing)
Sets the gearing multiplier, optional.Object
get(String propertyName)
OvernightRateCalculation.Builder
index(OvernightIndex index)
Sets the Overnight index.OvernightRateCalculation.Builder
negativeRateMethod(NegativeRateMethod negativeRateMethod)
Sets the negative rate method, defaulted to 'AllowNegative'.OvernightRateCalculation.Builder
rateCutOffDays(int rateCutOffDays)
Sets the number of business days before the end of the period that the rate is cut off, defaulted to zero.OvernightRateCalculation.Builder
set(String propertyName, Object newValue)
OvernightRateCalculation.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
OvernightRateCalculation.Builder
spread(ValueSchedule spread)
Sets the spread rate, optional.String
toString()
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
get
in interfaceorg.joda.beans.BeanBuilder<OvernightRateCalculation>
- Overrides:
get
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<OvernightRateCalculation>
-
set
public OvernightRateCalculation.Builder set(String propertyName, Object newValue)
-
set
public OvernightRateCalculation.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
set
in interfaceorg.joda.beans.BeanBuilder<OvernightRateCalculation>
- Overrides:
set
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<OvernightRateCalculation>
-
build
public OvernightRateCalculation build()
-
dayCount
public OvernightRateCalculation.Builder dayCount(DayCount dayCount)
Sets the day count convention.This is used to convert dates to a numerical value.
When building, this will default to the day count of the index if not specified.
- Parameters:
dayCount
- the new value, not null- Returns:
- this, for chaining, not null
-
index
public OvernightRateCalculation.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
-
accrualMethod
public OvernightRateCalculation.Builder accrualMethod(OvernightAccrualMethod accrualMethod)
Sets the method of accruing overnight interest, defaulted to 'Compounded'.Two methods of accrual are supported - compounding and averaging. Averaging is primarily related to the 'USD-FED-FUND' index.
- Parameters:
accrualMethod
- the new value, not null- Returns:
- this, for chaining, not null
-
negativeRateMethod
public OvernightRateCalculation.Builder negativeRateMethod(NegativeRateMethod negativeRateMethod)
Sets the negative rate method, defaulted to 'AllowNegative'.This is used when the interest rate, observed or calculated, goes negative. It does not apply if the rate is fixed, such as in a stub or using
firstRegularRate
.Defined by the 2006 ISDA definitions article 6.4.
- Parameters:
negativeRateMethod
- the new value, not null- Returns:
- this, for chaining, not null
-
rateCutOffDays
public OvernightRateCalculation.Builder rateCutOffDays(int rateCutOffDays)
Sets the number of business days before the end of the period that the rate is cut off, defaulted to zero.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
3
means 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 will only apply to the last accrual period in the payment period.
- Parameters:
rateCutOffDays
- the new value- Returns:
- this, for chaining, not null
-
gearing
public OvernightRateCalculation.Builder gearing(ValueSchedule gearing)
Sets the gearing multiplier, optional.This defines the gearing as an initial value and a list of adjustments. The gearing is only permitted to change at accrual period boundaries.
When calculating the rate, the fixing rate is multiplied by the gearing. A gearing of 1 has no effect. If both gearing and spread exist, then the gearing is applied first.
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
-
spread
public OvernightRateCalculation.Builder spread(ValueSchedule spread)
Sets the spread rate, optional. A 5% rate will be expressed as 0.05.This defines the spread as an initial value and a list of adjustments. The spread is only permitted to change at accrual period boundaries. Spread is a per annum rate.
When calculating the rate, the spread is added to the fixing rate. A spread of 0 has no effect. If both gearing and spread exist, then the gearing is applied first.
If this property is not present, then no spread applies.
Defined by the 2006 ISDA definitions article 6.2e.
- Parameters:
spread
- the new value- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<OvernightRateCalculation>
-
-