public final class OvernightFutureOptionTrade extends Object implements SecuritizedProductTrade<OvernightFutureOption>, ResolvableTrade<ResolvedOvernightFutureOptionTrade>, org.joda.beans.ImmutableBean, Serializable
A trade in an underlying OvernightFutureOption.
The option is American, exercised at any point up to the exercise time.
Both daily margin and upfront premium styles are handled.
Strata uses decimal prices for overnight 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.
| Modifier and Type | Class and Description |
|---|---|
static class |
OvernightFutureOptionTrade.Builder
The bean-builder for
OvernightFutureOptionTrade. |
static class |
OvernightFutureOptionTrade.Meta
The meta-bean for
OvernightFutureOptionTrade. |
| Modifier and Type | Method and Description |
|---|---|
static OvernightFutureOptionTrade.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
TradeInfo |
getInfo()
Gets the additional trade information, defaulted to an empty instance.
|
double |
getPrice()
Gets the price that was traded, in decimal form.
|
OvernightFutureOption |
getProduct()
Gets the option that was traded.
|
double |
getQuantity()
Gets the quantity that was traded.
|
int |
hashCode() |
static OvernightFutureOptionTrade.Meta |
meta()
The meta-bean for
OvernightFutureOptionTrade. |
OvernightFutureOptionTrade.Meta |
metaBean() |
ResolvedOvernightFutureOptionTrade |
resolve(ReferenceData refData)
Resolves this trade using the specified reference data.
|
PortfolioItemSummary |
summarize()
Summarizes the portfolio item.
|
OvernightFutureOptionTrade.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
OvernightFutureOptionTrade |
withInfo(PortfolioItemInfo info)
Returns an instance with the specified info.
|
OvernightFutureOptionTrade |
withPrice(double price)
Returns an instance with the specified price.
|
OvernightFutureOptionTrade |
withQuantity(double quantity)
Returns an instance with the specified quantity.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetIdgetCurrency, getSecurityIdpublic OvernightFutureOptionTrade withInfo(PortfolioItemInfo info)
SecuritizedProductTradewithInfo in interface PortfolioItemwithInfo in interface ProductTradewithInfo in interface ResolvableTrade<ResolvedOvernightFutureOptionTrade>withInfo in interface SecuritizedProductTrade<OvernightFutureOption>withInfo in interface SecurityQuantityTradewithInfo in interface Tradeinfo - the new infopublic OvernightFutureOptionTrade withQuantity(double quantity)
SecuritizedProductTradewithQuantity in interface SecuritizedProductPortfolioItem<OvernightFutureOption>withQuantity in interface SecuritizedProductTrade<OvernightFutureOption>withQuantity in interface SecurityQuantityTradequantity - the new quantitypublic OvernightFutureOptionTrade withPrice(double price)
SecuritizedProductTradewithPrice in interface SecuritizedProductTrade<OvernightFutureOption>withPrice in interface SecurityQuantityTradeprice - the new pricepublic PortfolioItemSummary summarize()
PortfolioItemThis provides a summary, including a human readable description.
summarize in interface PortfolioItemsummarize in interface Tradepublic ResolvedOvernightFutureOptionTrade resolve(ReferenceData refData)
ResolvableTrade
This converts this trade to the equivalent resolved form.
All ReferenceDataId identifiers in this instance will be resolved.
The resulting ResolvedTrade 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.
resolve in interface Resolvable<ResolvedOvernightFutureOptionTrade>resolve in interface ResolvableTrade<ResolvedOvernightFutureOptionTrade>refData - the reference data to use when resolvingpublic static OvernightFutureOptionTrade.Meta meta()
OvernightFutureOptionTrade.public static OvernightFutureOptionTrade.Builder builder()
public OvernightFutureOptionTrade.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic TradeInfo getInfo()
This allows additional information to be attached to the trade.
The trade date is required when calling resolve(ReferenceData).
getInfo in interface PortfolioItemgetInfo in interface Tradepublic OvernightFutureOption getProduct()
The product captures the contracted financial details of the trade.
getProduct in interface ProductTradegetProduct in interface SecuritizedProductPortfolioItem<OvernightFutureOption>public double getQuantity()
This is the number of contracts that were traded. This will be positive if buying and negative if selling.
getQuantity in interface SecurityQuantitypublic double getPrice()
This is the price agreed when the trade occurred.
Strata uses decimal prices for overnight 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.
getPrice in interface SecurityQuantityTradepublic OvernightFutureOptionTrade.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.