Class FixedCouponBondSecurity.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<FixedCouponBondSecurity>
-
- com.opengamma.strata.product.bond.FixedCouponBondSecurity.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<FixedCouponBondSecurity>
- Enclosing class:
- FixedCouponBondSecurity
public static final class FixedCouponBondSecurity.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<FixedCouponBondSecurity>
The bean-builder forFixedCouponBondSecurity
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FixedCouponBondSecurity.Builder
accrualSchedule(PeriodicSchedule accrualSchedule)
Sets the accrual schedule.FixedCouponBondSecurity
build()
FixedCouponBondSecurity.Builder
currency(Currency currency)
Sets the currency that the bond is traded in.FixedCouponBondSecurity.Builder
dayCount(DayCount dayCount)
Sets the day count convention applicable.FixedCouponBondSecurity.Builder
exCouponPeriod(DaysAdjustment exCouponPeriod)
Sets ex-coupon period.FixedCouponBondSecurity.Builder
fixedRate(double fixedRate)
Sets the fixed coupon rate.Object
get(String propertyName)
FixedCouponBondSecurity.Builder
info(SecurityInfo info)
Sets the standard security information.FixedCouponBondSecurity.Builder
legalEntityId(LegalEntityId legalEntityId)
Sets the legal entity identifier.FixedCouponBondSecurity.Builder
notional(double notional)
Sets the notional amount, must be positive.FixedCouponBondSecurity.Builder
set(String propertyName, Object newValue)
FixedCouponBondSecurity.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
FixedCouponBondSecurity.Builder
settlementDateOffset(DaysAdjustment settlementDateOffset)
Sets the number of days between valuation date and settlement date.String
toString()
FixedCouponBondSecurity.Builder
yieldConvention(FixedCouponBondYieldConvention yieldConvention)
Sets yield convention.
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
get
in interfaceorg.joda.beans.BeanBuilder<FixedCouponBondSecurity>
- Overrides:
get
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<FixedCouponBondSecurity>
-
set
public FixedCouponBondSecurity.Builder set(String propertyName, Object newValue)
-
set
public FixedCouponBondSecurity.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
set
in interfaceorg.joda.beans.BeanBuilder<FixedCouponBondSecurity>
- Overrides:
set
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<FixedCouponBondSecurity>
-
build
public FixedCouponBondSecurity build()
-
info
public FixedCouponBondSecurity.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
-
currency
public FixedCouponBondSecurity.Builder currency(Currency currency)
Sets the currency that the bond is traded in.- Parameters:
currency
- the new value, not null- Returns:
- this, for chaining, not null
-
notional
public FixedCouponBondSecurity.Builder notional(double notional)
Sets the notional amount, must be positive.The notional expressed here must be positive. The currency of the notional is specified by
currency
.- Parameters:
notional
- the new value- Returns:
- this, for chaining, not null
-
accrualSchedule
public FixedCouponBondSecurity.Builder accrualSchedule(PeriodicSchedule accrualSchedule)
Sets the accrual schedule.This is used to define the accrual periods. These are used directly or indirectly to determine other dates in the product.
- Parameters:
accrualSchedule
- the new value, not null- Returns:
- this, for chaining, not null
-
fixedRate
public FixedCouponBondSecurity.Builder fixedRate(double fixedRate)
Sets the fixed coupon rate.The periodic payments are based on this fixed coupon rate.
- Parameters:
fixedRate
- the new value- Returns:
- this, for chaining, not null
-
dayCount
public FixedCouponBondSecurity.Builder dayCount(DayCount dayCount)
Sets the day count convention applicable.The conversion from dates to a numerical value is made based on this day count. For the fixed bond, the day count convention is used to compute accrued interest.
Note that the year fraction of a coupon payment is computed based on the unadjusted dates in the schedule.
- Parameters:
dayCount
- the new value, not null- Returns:
- this, for chaining, not null
-
yieldConvention
public FixedCouponBondSecurity.Builder yieldConvention(FixedCouponBondYieldConvention yieldConvention)
Sets yield convention.The convention defines how to convert from yield to price and inversely.
- Parameters:
yieldConvention
- the new value, not null- Returns:
- this, for chaining, not null
-
legalEntityId
public FixedCouponBondSecurity.Builder legalEntityId(LegalEntityId legalEntityId)
Sets the legal entity identifier.This identifier is used for the legal entity that issues the bond.
- Parameters:
legalEntityId
- the new value, not null- Returns:
- this, for chaining, not null
-
settlementDateOffset
public FixedCouponBondSecurity.Builder settlementDateOffset(DaysAdjustment settlementDateOffset)
Sets the number of days between valuation date and settlement date.This is used to compute clean price. The clean price is the relative price to be paid at the standard settlement date in exchange for the bond.
It is usually one business day for US treasuries and UK Gilts and three days for Euroland government bonds.
- Parameters:
settlementDateOffset
- the new value, not null- Returns:
- this, for chaining, not null
-
exCouponPeriod
public FixedCouponBondSecurity.Builder exCouponPeriod(DaysAdjustment exCouponPeriod)
Sets ex-coupon period.Some bonds trade ex-coupons before the coupon payment. The coupon is paid not to the owner of the bond on the payment date but to the owner of the bond on the detachment date. The difference between the two is the ex-coupon period (measured in days).
Because the detachment date is not after the coupon date, the number of days stored in this field should be zero or negative.
- Parameters:
exCouponPeriod
- the new value, not null- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<FixedCouponBondSecurity>
-
-