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 FixedCouponBondOption
build()
FixedCouponBondOption.Builder
cleanStrikePrice(double cleanStrikePrice)
Sets the clean price at which the option can be exercised, in decimal form.FixedCouponBondOption.Builder
expiryDate(AdjustableDate expiryDate)
Sets the expiry date of the option.FixedCouponBondOption.Builder
expiryTime(LocalTime expiryTime)
Sets the expiry time of the option.FixedCouponBondOption.Builder
expiryZone(ZoneId expiryZone)
Sets the time-zone of the expiry time.Object
get(String propertyName)
FixedCouponBondOption.Builder
longShort(LongShort longShort)
Sets whether the option is long or short.FixedCouponBondOption.Builder
quantity(double quantity)
Sets the quantity that was traded.FixedCouponBondOption.Builder
set(String propertyName, Object newValue)
FixedCouponBondOption.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
FixedCouponBondOption.Builder
settlementDate(AdjustableDate settlementDate)
Sets the settlement date when the option is exercised.String
toString()
FixedCouponBondOption.Builder
underlying(FixedCouponBond underlying)
Sets the bond underlying the option.
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
get
in interfaceorg.joda.beans.BeanBuilder<FixedCouponBondOption>
- Overrides:
get
in 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:
set
in interfaceorg.joda.beans.BeanBuilder<FixedCouponBondOption>
- Overrides:
set
in 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
businessDayAdjustment
property 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
businessDayAdjustment
property 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:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<FixedCouponBondOption>
-
-