Class OvernightFutureSecurity.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<OvernightFutureSecurity>
-
- com.opengamma.strata.product.index.OvernightFutureSecurity.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<OvernightFutureSecurity>
- Enclosing class:
- OvernightFutureSecurity
public static final class OvernightFutureSecurity.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<OvernightFutureSecurity>
The bean-builder forOvernightFutureSecurity
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OvernightFutureSecurity.Builder
accrualFactor(double accrualFactor)
Sets the accrual factor, defaulted from the index if not set.OvernightFutureSecurity.Builder
accrualMethod(OvernightAccrualMethod accrualMethod)
Sets the method of accruing Overnight interest.OvernightFutureSecurity
build()
OvernightFutureSecurity.Builder
endDate(LocalDate endDate)
Sets the last date of the rate calculation period.Object
get(String propertyName)
OvernightFutureSecurity.Builder
index(OvernightIndex index)
Sets the underlying Overnight index.OvernightFutureSecurity.Builder
info(SecurityInfo info)
Sets the standard security information.OvernightFutureSecurity.Builder
lastTradeDate(LocalDate lastTradeDate)
Sets the last date of trading.OvernightFutureSecurity.Builder
notional(double notional)
Sets the notional amount.OvernightFutureSecurity.Builder
rounding(Rounding rounding)
Sets the definition of how to round the futures price, defaulted to no rounding.OvernightFutureSecurity.Builder
set(String propertyName, Object newValue)
OvernightFutureSecurity.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
OvernightFutureSecurity.Builder
startDate(LocalDate startDate)
Sets the first date of the rate calculation period.String
toString()
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
get
in interfaceorg.joda.beans.BeanBuilder<OvernightFutureSecurity>
- Overrides:
get
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<OvernightFutureSecurity>
-
set
public OvernightFutureSecurity.Builder set(String propertyName, Object newValue)
-
set
public OvernightFutureSecurity.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
set
in interfaceorg.joda.beans.BeanBuilder<OvernightFutureSecurity>
- Overrides:
set
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<OvernightFutureSecurity>
-
build
public OvernightFutureSecurity build()
-
info
public OvernightFutureSecurity.Builder info(SecurityInfo info)
Sets the standard security information.This includes the security identifier.
- Parameters:
info
- the new value, not null- Returns:
- this, for chaining, not null
-
notional
public OvernightFutureSecurity.Builder notional(double notional)
Sets the notional amount.This is the full notional of the deposit, such as 5 million dollars. The notional expressed here must be positive. The currency of the notional the same as the currency of the index.
- Parameters:
notional
- the new value- Returns:
- this, for chaining, not null
-
accrualFactor
public OvernightFutureSecurity.Builder accrualFactor(double accrualFactor)
Sets the accrual factor, defaulted from the index if not set.This is the year fraction of the contract, typically 1/12 for a 30-day future. As such, it is often unrelated to the day count of the index. The year fraction must be positive.
- Parameters:
accrualFactor
- the new value- Returns:
- this, for chaining, not null
-
lastTradeDate
public OvernightFutureSecurity.Builder lastTradeDate(LocalDate lastTradeDate)
Sets the last date of trading.This must be a valid business day on the fixing calendar of
index
. For example, the last trade date is often the last business day of the month.- Parameters:
lastTradeDate
- the new value, not null- Returns:
- this, for chaining, not null
-
startDate
public OvernightFutureSecurity.Builder startDate(LocalDate startDate)
Sets the first date of the rate calculation period.This is not necessarily a valid business day on the fixing calendar of
index
. However, it will be adjusted inOvernightRateComputation
if needed.- Parameters:
startDate
- the new value, not null- Returns:
- this, for chaining, not null
-
endDate
public OvernightFutureSecurity.Builder endDate(LocalDate endDate)
Sets the last date of the rate calculation period.This is not necessarily a valid business day on the fixing calendar of
index
. However, it will be adjusted inOvernightRateComputation
if needed.- Parameters:
endDate
- the new value, not null- Returns:
- this, for chaining, not null
-
index
public OvernightFutureSecurity.Builder index(OvernightIndex index)
Sets the underlying Overnight index.The future is based on this index. It will be a well known market index such as 'USD-FED-FUND'.
- Parameters:
index
- the new value, not null- Returns:
- this, for chaining, not null
-
accrualMethod
public OvernightFutureSecurity.Builder accrualMethod(OvernightAccrualMethod accrualMethod)
Sets the method of accruing Overnight interest.The average rate is calculated based on this method over the period between
startDate
andendDate
.- Parameters:
accrualMethod
- the new value, not null- Returns:
- this, for chaining, not null
-
rounding
public OvernightFutureSecurity.Builder rounding(Rounding rounding)
Sets the definition of how to round the futures price, defaulted to no rounding.The price is represented in decimal form, not percentage form. As such, the decimal places expressed by the rounding refers to this decimal form. For example, the common market price of 99.7125 for a 0.2875% rate is represented as 0.997125 which has 6 decimal places.
- Parameters:
rounding
- the new value, not null- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<OvernightFutureSecurity>
-
-