Class FixedCouponBondOption.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<FixedCouponBondOption>
-
- com.opengamma.strata.product.bond.FixedCouponBondOption.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<FixedCouponBondOption>
- Enclosing class:
- FixedCouponBondOption
public static final class FixedCouponBondOption.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<FixedCouponBondOption>
The bean-builder forFixedCouponBondOption.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FixedCouponBondOptionbuild()FixedCouponBondOption.BuildercleanStrikePrice(double cleanStrikePrice)Sets the clean price at which the option can be exercised, in decimal form.FixedCouponBondOption.BuilderexpiryDate(AdjustableDate expiryDate)Sets the expiry date of the option.FixedCouponBondOption.BuilderexpiryTime(LocalTime expiryTime)Sets the expiry time of the option.FixedCouponBondOption.BuilderexpiryZone(ZoneId expiryZone)Sets the time-zone of the expiry time.Objectget(String propertyName)FixedCouponBondOption.BuilderlongShort(LongShort longShort)Sets whether the option is long or short.FixedCouponBondOption.Builderquantity(double quantity)Sets the quantity that was traded.FixedCouponBondOption.Builderset(String propertyName, Object newValue)FixedCouponBondOption.Builderset(org.joda.beans.MetaProperty<?> property, Object value)FixedCouponBondOption.BuildersettlementDate(AdjustableDate settlementDate)Sets the settlement date when the option is exercised.StringtoString()FixedCouponBondOption.Builderunderlying(FixedCouponBond underlying)Sets the bond underlying the option.
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
getin interfaceorg.joda.beans.BeanBuilder<FixedCouponBondOption>- Overrides:
getin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<FixedCouponBondOption>
-
set
public FixedCouponBondOption.Builder set(String propertyName, Object newValue)
-
set
public FixedCouponBondOption.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
setin interfaceorg.joda.beans.BeanBuilder<FixedCouponBondOption>- Overrides:
setin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<FixedCouponBondOption>
-
build
public FixedCouponBondOption build()
-
longShort
public FixedCouponBondOption.Builder longShort(LongShort longShort)
Sets whether the option is long or short.Long indicates that the owner has the right to exercise the option at expiry.
- Parameters:
longShort- the new value, not null- Returns:
- this, for chaining, not null
-
underlying
public FixedCouponBondOption.Builder underlying(FixedCouponBond underlying)
Sets the bond underlying the option.- Parameters:
underlying- the new value, not null- Returns:
- this, for chaining, not null
-
expiryDate
public FixedCouponBondOption.Builder expiryDate(AdjustableDate expiryDate)
Sets the expiry date of the option.This is the last date that the option can be exercised.
This date is typically set to be a valid business day. However, the
businessDayAdjustmentproperty may be set to provide a rule for adjustment.- Parameters:
expiryDate- the new value, not null- Returns:
- this, for chaining, not null
-
expiryTime
public FixedCouponBondOption.Builder expiryTime(LocalTime expiryTime)
Sets the expiry time of the option.The expiry time is related to the expiry date and time-zone.
- Parameters:
expiryTime- the new value, not null- Returns:
- this, for chaining, not null
-
expiryZone
public FixedCouponBondOption.Builder expiryZone(ZoneId expiryZone)
Sets the time-zone of the expiry time.The expiry time-zone is related to the expiry date and time.
- Parameters:
expiryZone- the new value, not null- Returns:
- this, for chaining, not null
-
quantity
public FixedCouponBondOption.Builder quantity(double quantity)
Sets the quantity that was traded.This will be positive if buying (call) and negative if selling (put).
- Parameters:
quantity- the new value- Returns:
- this, for chaining, not null
-
cleanStrikePrice
public FixedCouponBondOption.Builder cleanStrikePrice(double cleanStrikePrice)
Sets the clean price at which the option can be exercised, 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:
cleanStrikePrice- the new value- Returns:
- this, for chaining, not null
-
settlementDate
public FixedCouponBondOption.Builder settlementDate(AdjustableDate settlementDate)
Sets the settlement date when the option is exercised.This date is typically set to be a valid business day. However, the
businessDayAdjustmentproperty may be set to provide a rule for adjustment.- Parameters:
settlementDate- the new value, not null- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toStringin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<FixedCouponBondOption>
-
-