Class ResolvedFixedCouponBond.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedFixedCouponBond>
-
- com.opengamma.strata.product.bond.ResolvedFixedCouponBond.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<ResolvedFixedCouponBond>
- Enclosing class:
- ResolvedFixedCouponBond
public static final class ResolvedFixedCouponBond.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedFixedCouponBond>
The bean-builder forResolvedFixedCouponBond
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResolvedFixedCouponBond
build()
ResolvedFixedCouponBond.Builder
dayCount(DayCount dayCount)
Sets the day count convention applicable.ResolvedFixedCouponBond.Builder
fixedRate(double fixedRate)
Sets the fixed coupon rate.ResolvedFixedCouponBond.Builder
frequency(Frequency frequency)
Sets the frequency of the bond payments.Object
get(String propertyName)
ResolvedFixedCouponBond.Builder
legalEntityId(LegalEntityId legalEntityId)
Sets the legal entity identifier.ResolvedFixedCouponBond.Builder
nominalPayment(Payment nominalPayment)
Sets the nominal payment of the product.ResolvedFixedCouponBond.Builder
periodicPayments(FixedCouponBondPaymentPeriod... periodicPayments)
Sets theperiodicPayments
property in the builder from an array of objects.ResolvedFixedCouponBond.Builder
periodicPayments(List<FixedCouponBondPaymentPeriod> periodicPayments)
Sets the periodic payments of the product.ResolvedFixedCouponBond.Builder
rollConvention(RollConvention rollConvention)
Sets the roll convention of the bond payments.ResolvedFixedCouponBond.Builder
securityId(SecurityId securityId)
Sets the security identifier.ResolvedFixedCouponBond.Builder
set(String propertyName, Object newValue)
ResolvedFixedCouponBond.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
ResolvedFixedCouponBond.Builder
settlementDateOffset(DaysAdjustment settlementDateOffset)
Sets the number of days between valuation date and settlement date.String
toString()
ResolvedFixedCouponBond.Builder
yieldConvention(FixedCouponBondYieldConvention yieldConvention)
Sets yield convention.
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
get
in interfaceorg.joda.beans.BeanBuilder<ResolvedFixedCouponBond>
- Overrides:
get
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedFixedCouponBond>
-
set
public ResolvedFixedCouponBond.Builder set(String propertyName, Object newValue)
-
set
public ResolvedFixedCouponBond.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
set
in interfaceorg.joda.beans.BeanBuilder<ResolvedFixedCouponBond>
- Overrides:
set
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedFixedCouponBond>
-
build
public ResolvedFixedCouponBond build()
-
securityId
public ResolvedFixedCouponBond.Builder securityId(SecurityId securityId)
Sets the security identifier.This identifier uniquely identifies the security within the system.
- Parameters:
securityId
- the new value, not null- Returns:
- this, for chaining, not null
-
nominalPayment
public ResolvedFixedCouponBond.Builder nominalPayment(Payment nominalPayment)
Sets the nominal payment of the product.The payment date of the nominal payment agrees with the final coupon payment date of the periodic payments.
- Parameters:
nominalPayment
- the new value, not null- Returns:
- this, for chaining, not null
-
periodicPayments
public ResolvedFixedCouponBond.Builder periodicPayments(List<FixedCouponBondPaymentPeriod> periodicPayments)
Sets the periodic payments of the product.Each payment period represents part of the life-time of the product. The start date and end date of the leg are determined from the first and last period. As such, the periods should be sorted.
- Parameters:
periodicPayments
- the new value, not null- Returns:
- this, for chaining, not null
-
periodicPayments
public ResolvedFixedCouponBond.Builder periodicPayments(FixedCouponBondPaymentPeriod... periodicPayments)
Sets theperiodicPayments
property in the builder from an array of objects.- Parameters:
periodicPayments
- the new value, not null- Returns:
- this, for chaining, not null
-
frequency
public ResolvedFixedCouponBond.Builder frequency(Frequency frequency)
Sets the frequency of the bond payments.This must match the frequency used to generate the payment schedule.
- Parameters:
frequency
- the new value, not null- Returns:
- this, for chaining, not null
-
rollConvention
public ResolvedFixedCouponBond.Builder rollConvention(RollConvention rollConvention)
Sets the roll convention of the bond payments.This must match the convention used to generate the payment schedule.
- Parameters:
rollConvention
- the new value, not null- Returns:
- this, for chaining, not null
-
fixedRate
public ResolvedFixedCouponBond.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 ResolvedFixedCouponBond.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 ResolvedFixedCouponBond.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 ResolvedFixedCouponBond.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 ResolvedFixedCouponBond.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
-
toString
public String toString()
- Overrides:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedFixedCouponBond>
-
-