## Class IborFutureOptionPosition

• All Implemented Interfaces:
CalculationTarget, Resolvable<ResolvedIborFutureOptionTrade>, PortfolioItem, Position, SecuritizedProductPortfolioItem<IborFutureOption>, SecuritizedProductPosition<IborFutureOption>, SecurityQuantity, Serializable, org.joda.beans.Bean, org.joda.beans.ImmutableBean

public final class IborFutureOptionPosition
extends Object
implements SecuritizedProductPosition<IborFutureOption>, Resolvable<ResolvedIborFutureOptionTrade>, org.joda.beans.ImmutableBean, Serializable
A position in an option on a futures contract based on an Ibor index.

A position in an underlying IborFutureOption.

An Ibor future option is also known as a STIR future option (Short Term Interest Rate).

The net quantity of the position is stored using two fields - longQuantity and shortQuantity. These two fields must not be negative. In many cases, only a long quantity or short quantity will be present with the other set to zero. However it is also possible for both to be non-zero, allowing long and short positions to be treated separately. The net quantity is available via getQuantity().

#### Price

The price of an Ibor future option is based on the price of the underlying future, the volatility and the time to expiry. The price of the at-the-money option tends to zero as expiry approaches.

Strata uses decimal prices for Ibor future options in the trade model, pricers and market data. The decimal price is based on the decimal rate equivalent to the percentage. For example, an option price of 0.2 is related to a futures price of 99.32 that implies an interest rate of 0.68%. Strata represents the price of the future as 0.9932 and thus represents the price of the option as 0.002.

Serialized Form
• ### Nested Class Summary

Nested Classes
Modifier and Type Class Description
static class  IborFutureOptionPosition.Builder
The bean-builder for IborFutureOptionPosition.
static class  IborFutureOptionPosition.Meta
The meta-bean for IborFutureOptionPosition.
• ### Method Summary

All Methods
Modifier and Type Method Description
static IborFutureOptionPosition.Builder builder()
Returns a builder used to create an instance of the bean.
boolean equals​(Object obj)
Currency getCurrency()
Gets the currency of the position.
PositionInfo getInfo()
Gets the additional position information, defaulted to an empty instance.
double getLongQuantity()
Gets the long quantity of the security.
IborFutureOption getProduct()
Gets the option that was traded.
double getQuantity()
Gets the net quantity of the security.
SecurityId getSecurityId()
Gets the identifier of the underlying security.
double getShortQuantity()
Gets the short quantity of the security.
int hashCode()
static IborFutureOptionPosition.Meta meta()
The meta-bean for IborFutureOptionPosition.
IborFutureOptionPosition.Meta metaBean()
static IborFutureOptionPosition ofLongShort​(PositionInfo positionInfo, IborFutureOption product, double longQuantity, double shortQuantity)
Obtains an instance from position information, product, long quantity and short quantity.
static IborFutureOptionPosition ofNet​(PositionInfo positionInfo, IborFutureOption product, double netQuantity)
Obtains an instance from position information, product and net quantity.
ResolvedIborFutureOptionTrade resolve​(ReferenceData refData)
Resolves this object using the specified reference data.
PortfolioItemSummary summarize()
Summarizes the portfolio item.
IborFutureOptionPosition.Builder toBuilder()
Returns a builder that allows this bean to be mutated.
String toString()
IborFutureOptionPosition withInfo​(PortfolioItemInfo info)
Returns an instance with the specified info.
IborFutureOptionPosition withQuantity​(double quantity)
Returns an instance with the specified quantity.
• ### Methods inherited from class java.lang.Object

clone, finalize, getClass, notify, notifyAll, wait, wait, wait
• ### Methods inherited from interface org.joda.beans.Bean

property, propertyNames
• ### Methods inherited from interface com.opengamma.strata.product.PortfolioItem

getId
• ### Method Detail

• #### ofNet

public static IborFutureOptionPosition ofNet​(PositionInfo positionInfo,
IborFutureOption product,
double netQuantity)
Obtains an instance from position information, product and net quantity.

The net quantity is the long quantity minus the short quantity, which may be negative. If the quantity is positive it is treated as a long quantity. Otherwise it is treated as a short quantity.

Parameters:
positionInfo - the position information
product - the underlying product
netQuantity - the net quantity of the underlying security
Returns:
the position
• #### ofLongShort

public static IborFutureOptionPosition ofLongShort​(PositionInfo positionInfo,
IborFutureOption product,
double longQuantity,
double shortQuantity)
Obtains an instance from position information, product, long quantity and short quantity.

The long quantity and short quantity must be zero or positive, not negative. In many cases, only a long quantity or short quantity will be present with the other set to zero. However it is also possible for both to be non-zero, allowing long and short positions to be treated separately.

Parameters:
positionInfo - the position information
product - the underlying product
longQuantity - the long quantity of the underlying security
shortQuantity - the short quantity of the underlying security
Returns:
the position
• #### getSecurityId

public SecurityId getSecurityId()
Description copied from interface: Position
Gets the identifier of the underlying security.

This identifier uniquely identifies the security within the system.

Specified by:
getSecurityId in interface Position
Specified by:
getSecurityId in interface SecuritizedProductPortfolioItem<IborFutureOption>
Specified by:
getSecurityId in interface SecuritizedProductPosition<IborFutureOption>
Specified by:
getSecurityId in interface SecurityQuantity
Returns:
the security identifier
• #### getCurrency

public Currency getCurrency()
Description copied from interface: SecuritizedProductPortfolioItem
Gets the currency of the position.

This is typically the same as the currency of the product.

Specified by:
getCurrency in interface SecuritizedProductPortfolioItem<IborFutureOption>
Returns:
• #### getQuantity

public double getQuantity()
Description copied from interface: Position
Gets the net quantity of the security.

This returns the net quantity of the underlying security. The result is positive if the net position is long and negative if the net position is short.

Specified by:
getQuantity in interface Position
Specified by:
getQuantity in interface SecurityQuantity
Returns:
the net quantity of the underlying security
• #### withInfo

public IborFutureOptionPosition withInfo​(PortfolioItemInfo info)
Description copied from interface: SecuritizedProductPosition
Returns an instance with the specified info.
Specified by:
withInfo in interface PortfolioItem
Specified by:
withInfo in interface Position
Specified by:
withInfo in interface SecuritizedProductPosition<IborFutureOption>
Parameters:
info - the new info
Returns:
the instance with the specified info
• #### withQuantity

public IborFutureOptionPosition withQuantity​(double quantity)
Description copied from interface: SecuritizedProductPosition
Returns an instance with the specified quantity.
Specified by:
withQuantity in interface Position
Specified by:
withQuantity in interface SecuritizedProductPortfolioItem<IborFutureOption>
Specified by:
withQuantity in interface SecuritizedProductPosition<IborFutureOption>
Parameters:
quantity - the new quantity
Returns:
the instance with the specified quantity
• #### summarize

public PortfolioItemSummary summarize()
Description copied from interface: PortfolioItem
Summarizes the portfolio item.

This provides a summary, including a human readable description.

Specified by:
summarize in interface PortfolioItem
Specified by:
summarize in interface Position
Returns:
the summary of the item
• #### resolve

public ResolvedIborFutureOptionTrade 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 interface Resolvable<ResolvedIborFutureOptionTrade>
Parameters:
refData - the reference data to use when resolving
Returns:
the resolved instance
• #### meta

public static IborFutureOptionPosition.Meta meta()
The meta-bean for IborFutureOptionPosition.
Returns:
the meta-bean, not null
• #### builder

public static IborFutureOptionPosition.Builder builder()
Returns a builder used to create an instance of the bean.
Returns:
the builder, not null
• #### metaBean

public IborFutureOptionPosition.Meta metaBean()
Specified by:
metaBean in interface org.joda.beans.Bean
• #### getInfo

public PositionInfo getInfo()
Gets the additional position information, defaulted to an empty instance.

This allows additional information to be attached to the position.

Specified by:
getInfo in interface PortfolioItem
Specified by:
getInfo in interface Position
Returns:
the value of the property, not null
• #### getProduct

public IborFutureOption getProduct()
Gets the option that was traded.

The product captures the contracted financial details.

Specified by:
getProduct in interface SecuritizedProductPortfolioItem<IborFutureOption>
Returns:
the value of the property, not null
• #### getLongQuantity

public double getLongQuantity()
Gets the long quantity of the security.

This is the quantity of the underlying security that is held. The quantity cannot be negative, as that would imply short selling.

Returns:
the value of the property
• #### getShortQuantity

public double getShortQuantity()
Gets the short quantity of the security.

This is the quantity of the underlying security that has been short sold. The quantity cannot be negative, as that would imply the position is long.

Returns:
the value of the property
• #### toBuilder

public IborFutureOptionPosition.Builder toBuilder()
Returns a builder that allows this bean to be mutated.
Returns:
the mutable builder, not null
• #### equals

public boolean equals​(Object obj)
Overrides:
equals in class Object
• #### hashCode

public int hashCode()
Overrides:
hashCode in class Object
• #### toString

public String toString()
Overrides:
toString in class Object