Class FixedCouponBondOption
- java.lang.Object
-
- com.opengamma.strata.product.bond.FixedCouponBondOption
-
- All Implemented Interfaces:
Resolvable<ResolvedFixedCouponBondOption>
,Product
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class FixedCouponBondOption extends Object implements Product, Resolvable<ResolvedFixedCouponBondOption>, org.joda.beans.ImmutableBean, Serializable
An option on aFixedCouponBond
.The option strike is expressed as "Clean price". The "clean" price excludes any accrued interest. The clean price is in the currency of the underlying bond.
The call/put is provided by the quantity's sign. If positive, it indicates the right to buy the bond (call), if negative it indicates the right to sell the bond (put).
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FixedCouponBondOption.Builder
The bean-builder forFixedCouponBondOption
.static class
FixedCouponBondOption.Meta
The meta-bean forFixedCouponBondOption
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableSet<Currency>
allCurrencies()
Returns the set of currencies the product refers to.static FixedCouponBondOption.Builder
builder()
Returns a builder used to create an instance of the bean.boolean
equals(Object obj)
double
getCleanStrikePrice()
Gets the clean price at which the option can be exercised, in decimal form.Currency
getCurrency()
The currency of the underlying bond.AdjustableDate
getExpiryDate()
Gets the expiry date of the option.LocalTime
getExpiryTime()
Gets the expiry time of the option.ZoneId
getExpiryZone()
Gets the time-zone of the expiry time.LongShort
getLongShort()
Gets whether the option is long or short.double
getQuantity()
Gets the quantity that was traded.AdjustableDate
getSettlementDate()
Gets the settlement date when the option is exercised.FixedCouponBond
getUnderlying()
Gets the bond underlying the option.int
hashCode()
static FixedCouponBondOption.Meta
meta()
The meta-bean forFixedCouponBondOption
.FixedCouponBondOption.Meta
metaBean()
ResolvedFixedCouponBondOption
resolve(ReferenceData refData)
Resolves this object using the specified reference data.FixedCouponBondOption.Builder
toBuilder()
Returns a builder that allows this bean to be mutated.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.opengamma.strata.product.Product
allPaymentCurrencies, isCrossCurrency
-
-
-
-
Method Detail
-
getCurrency
public Currency getCurrency()
The currency of the underlying bond.- Returns:
- the currency
-
resolve
public ResolvedFixedCouponBondOption resolve(ReferenceData refData)
Description copied from interface:Resolvable
Resolves this object using the specified reference data.This converts the object implementing this interface to the equivalent resolved form. All
ReferenceDataId
identifiers in this instance will be resolved. The resolved form will typically be a type that is optimized for pricing.Resolved objects may be bound to data that changes over time, such as holiday calendars. If the data changes, such as the addition of a new holiday, the resolved form will not be updated. Care must be taken when placing the resolved form in a cache or persistence layer.
- Specified by:
resolve
in interfaceResolvable<ResolvedFixedCouponBondOption>
- Parameters:
refData
- the reference data to use when resolving- Returns:
- the resolved instance
-
allCurrencies
public ImmutableSet<Currency> allCurrencies()
Description copied from interface:Product
Returns the set of currencies the product refers to.This returns the complete set of currencies, not just the payment currencies. For example, the sets will differ when one of the currencies is non-deliverable.
- Specified by:
allCurrencies
in interfaceProduct
- Returns:
- the set of currencies the product refers to
-
meta
public static FixedCouponBondOption.Meta meta()
The meta-bean forFixedCouponBondOption
.- Returns:
- the meta-bean, not null
-
builder
public static FixedCouponBondOption.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public FixedCouponBondOption.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getLongShort
public LongShort getLongShort()
Gets whether the option is long or short.Long indicates that the owner has the right to exercise the option at expiry.
- Returns:
- the value of the property, not null
-
getUnderlying
public FixedCouponBond getUnderlying()
Gets the bond underlying the option.- Returns:
- the value of the property, not null
-
getExpiryDate
public AdjustableDate getExpiryDate()
Gets 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.- Returns:
- the value of the property, not null
-
getExpiryTime
public LocalTime getExpiryTime()
Gets the expiry time of the option.The expiry time is related to the expiry date and time-zone.
- Returns:
- the value of the property, not null
-
getExpiryZone
public ZoneId getExpiryZone()
Gets the time-zone of the expiry time.The expiry time-zone is related to the expiry date and time.
- Returns:
- the value of the property, not null
-
getQuantity
public double getQuantity()
Gets the quantity that was traded.This will be positive if buying (call) and negative if selling (put).
- Returns:
- the value of the property
-
getCleanStrikePrice
public double getCleanStrikePrice()
Gets 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.
- Returns:
- the value of the property
-
getSettlementDate
public AdjustableDate getSettlementDate()
Gets 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.- Returns:
- the value of the property, not null
-
toBuilder
public FixedCouponBondOption.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-