Class BondFutureOptionSecurity
- java.lang.Object
-
- com.opengamma.strata.product.bond.BondFutureOptionSecurity
-
- All Implemented Interfaces:
Security,Serializable,org.joda.beans.Bean,org.joda.beans.ImmutableBean
public final class BondFutureOptionSecurity extends Object implements Security, org.joda.beans.ImmutableBean, Serializable
A security representing a futures contract, based on a basket of fixed coupon bonds.A bond future is a financial instrument that is based on the future value of a basket of fixed coupon bonds. The profit or loss of a bond future is settled daily.
Price
Strata uses decimal prices for bond futures options in the trade model, pricers and market data. This is coherent with the pricing ofBondFuture.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBondFutureOptionSecurity.BuilderThe bean-builder forBondFutureOptionSecurity.static classBondFutureOptionSecurity.MetaThe meta-bean forBondFutureOptionSecurity.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BondFutureOptionSecurity.Builderbuilder()Returns a builder used to create an instance of the bean.BondFutureOptionPositioncreatePosition(PositionInfo positionInfo, double longQuantity, double shortQuantity, ReferenceData refData)Creates a position based on this security from a long and short quantity.BondFutureOptionPositioncreatePosition(PositionInfo positionInfo, double quantity, ReferenceData refData)Creates a position based on this security from a net quantity.BondFutureOptioncreateProduct(ReferenceData refData)Creates the product associated with this security.BondFutureOptionTradecreateTrade(TradeInfo info, double quantity, double tradePrice, ReferenceData refData)Creates a trade based on this security.booleanequals(Object obj)CurrencygetCurrency()Gets the currency that the future is traded in.LocalDategetExpiryDate()Gets the expiry date of the option.LocalTimegetExpiryTime()Gets the expiry time of the option.ZoneIdgetExpiryZone()Gets the time-zone of the expiry time.SecurityInfogetInfo()Gets the standard security information.FutureOptionPremiumStylegetPremiumStyle()Gets the style of the option premium.PutCallgetPutCall()Gets whether the option is put or call.RoundinggetRounding()Gets the definition of how to round the option price, defaulted to no rounding.doublegetStrikePrice()Gets the strike price, represented in decimal form.SecurityIdgetUnderlyingFutureId()Gets the identifier of the underlying future.ImmutableSet<SecurityId>getUnderlyingIds()Gets the set of underlying security identifiers.inthashCode()static BondFutureOptionSecurity.Metameta()The meta-bean forBondFutureOptionSecurity.BondFutureOptionSecurity.MetametaBean()BondFutureOptionSecurity.BuildertoBuilder()Returns a builder that allows this bean to be mutated.StringtoString()BondFutureOptionSecuritywithInfo(SecurityInfo info)Returns an instance with the specified info.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.opengamma.strata.product.Security
getSecurityId
-
-
-
-
Method Detail
-
getUnderlyingIds
public ImmutableSet<SecurityId> getUnderlyingIds()
Description copied from interface:SecurityGets the set of underlying security identifiers.The set must contain all the security identifiers that this security directly refers to. For example, a bond future will return the identifiers of the underlying basket of bonds, but a bond future option will only return the identifier of the underlying future, not the basket.
- Specified by:
getUnderlyingIdsin interfaceSecurity- Returns:
- the underlying security identifiers
-
withInfo
public BondFutureOptionSecurity withInfo(SecurityInfo info)
Description copied from interface:SecurityReturns an instance with the specified info.
-
createProduct
public BondFutureOption createProduct(ReferenceData refData)
Description copied from interface:SecurityCreates the product associated with this security.The product of a security is distinct from the security. The product includes the financial details from this security, but excludes the additional information. The product also includes the products of any underlying securities.
- Specified by:
createProductin interfaceSecurity- Parameters:
refData- the reference data used to find underlying securities- Returns:
- the product
-
createTrade
public BondFutureOptionTrade createTrade(TradeInfo info, double quantity, double tradePrice, ReferenceData refData)
Description copied from interface:SecurityCreates a trade based on this security.This creates a trade of a suitable type for this security.
- Specified by:
createTradein interfaceSecurity- Parameters:
info- the trade informationquantity- the number of contracts in the tradetradePrice- the price agreed when the trade occurredrefData- the reference data used to find underlying securities- Returns:
- the trade
-
createPosition
public BondFutureOptionPosition createPosition(PositionInfo positionInfo, double quantity, ReferenceData refData)
Description copied from interface:SecurityCreates a position based on this security from a net quantity.This creates a position of a suitable type for this security.
- Specified by:
createPositionin interfaceSecurity- Parameters:
positionInfo- the position informationquantity- the number of contracts in the positionrefData- the reference data used to find underlying securities- Returns:
- the position
-
createPosition
public BondFutureOptionPosition createPosition(PositionInfo positionInfo, double longQuantity, double shortQuantity, ReferenceData refData)
Description copied from interface:SecurityCreates a position based on this security from a long and short quantity.This creates a position of a suitable type for this security.
The long quantity and short quantity must be zero or positive, not negative.
- Specified by:
createPositionin interfaceSecurity- Parameters:
positionInfo- the position informationlongQuantity- the long quantity in the positionshortQuantity- the short quantity in the positionrefData- the reference data used to find underlying securities- Returns:
- the position
-
meta
public static BondFutureOptionSecurity.Meta meta()
The meta-bean forBondFutureOptionSecurity.- Returns:
- the meta-bean, not null
-
builder
public static BondFutureOptionSecurity.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public BondFutureOptionSecurity.Meta metaBean()
- Specified by:
metaBeanin interfaceorg.joda.beans.Bean
-
getInfo
public SecurityInfo getInfo()
Gets the standard security information.This includes the security identifier.
-
getCurrency
public Currency getCurrency()
Gets the currency that the future is traded in.- Specified by:
getCurrencyin interfaceSecurity- Returns:
- the value of the property, not null
-
getPutCall
public PutCall getPutCall()
Gets whether the option is put or call.A call gives the owner the right, but not obligation, to buy the underlying at an agreed price in the future. A put gives a similar option to sell.
- Returns:
- the value of the property
-
getStrikePrice
public double getStrikePrice()
Gets the strike price, represented in decimal form.This is the price at which the option applies and refers to the price of the underlying future. This must be represented in decimal form,
(1.0 - decimalRate). As such, the common market price of 99.3 for a 0.7% rate must be input as 0.993. The rate implied by the strike can take negative values.- Returns:
- the value of the property
-
getExpiryDate
public LocalDate getExpiryDate()
Gets the expiry date of the option.The expiry date is related to the expiry time and time-zone. The date must not be after last trade date of the underlying future.
- 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
-
getPremiumStyle
public FutureOptionPremiumStyle getPremiumStyle()
Gets the style of the option premium.The two options are daily margining and upfront premium.
- Returns:
- the value of the property, not null
-
getRounding
public Rounding getRounding()
Gets the definition of how to round the option price, defaulted to no rounding.The price is represented in decimal form, not percentage form. As such, the decimal places expressed by the rounding refers to this decimal form. For example, the common market price of 99.7125 is represented as 0.997125 which has 6 decimal places.
- Returns:
- the value of the property, not null
-
getUnderlyingFutureId
public SecurityId getUnderlyingFutureId()
Gets the identifier of the underlying future.- Returns:
- the value of the property, not null
-
toBuilder
public BondFutureOptionSecurity.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-