Class FixedCouponBondTrade.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<FixedCouponBondTrade>
-
- com.opengamma.strata.product.bond.FixedCouponBondTrade.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<FixedCouponBondTrade>
- Enclosing class:
- FixedCouponBondTrade
public static final class FixedCouponBondTrade.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<FixedCouponBondTrade>
The bean-builder forFixedCouponBondTrade
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FixedCouponBondTrade
build()
Object
get(String propertyName)
FixedCouponBondTrade.Builder
info(TradeInfo info)
Sets the additional trade information, defaulted to an empty instance.FixedCouponBondTrade.Builder
price(double price)
Sets the clean price at which the bond was traded, in decimal form.FixedCouponBondTrade.Builder
product(FixedCouponBond product)
Sets the bond that was traded.FixedCouponBondTrade.Builder
quantity(double quantity)
Sets the quantity that was traded.FixedCouponBondTrade.Builder
set(String propertyName, Object newValue)
FixedCouponBondTrade.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
String
toString()
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
get
in interfaceorg.joda.beans.BeanBuilder<FixedCouponBondTrade>
- Overrides:
get
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<FixedCouponBondTrade>
-
set
public FixedCouponBondTrade.Builder set(String propertyName, Object newValue)
-
set
public FixedCouponBondTrade.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
set
in interfaceorg.joda.beans.BeanBuilder<FixedCouponBondTrade>
- Overrides:
set
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<FixedCouponBondTrade>
-
build
public FixedCouponBondTrade build()
-
info
public FixedCouponBondTrade.Builder info(TradeInfo info)
Sets the additional trade information, defaulted to an empty instance.This allows additional information to be attached to the trade. Either the trade or settlement date is required when calling
FixedCouponBondTrade.resolve(ReferenceData)
.- Parameters:
info
- the new value, not null- Returns:
- this, for chaining, not null
-
product
public FixedCouponBondTrade.Builder product(FixedCouponBond product)
Sets the bond that was traded.The product captures the contracted financial details of the trade.
- Parameters:
product
- the new value, not null- Returns:
- this, for chaining, not null
-
quantity
public FixedCouponBondTrade.Builder quantity(double quantity)
Sets the quantity that was traded.This will be positive if buying and negative if selling.
- Parameters:
quantity
- the new value- Returns:
- this, for chaining, not null
-
price
public FixedCouponBondTrade.Builder price(double price)
Sets the clean price at which the bond was traded, in decimal form.The "clean" price excludes any accrued interest.
Strata uses decimal prices for bonds in the trade model, pricers and market data. For example, a price of 99.32% is represented in Strata by 0.9932.
- Parameters:
price
- the new value- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<FixedCouponBondTrade>
-
-