public final class FxSingleTrade extends Object implements FxTrade, ResolvableTrade<ResolvedFxSingleTrade>, org.joda.beans.ImmutableBean, Serializable
An Over-The-Counter (OTC) trade in an FxSingle.
An FX is a financial instrument that represents the exchange of an equivalent amount in two different currencies between counterparties on a specific date. For example, it might represent the payment of USD 1,000 and the receipt of EUR 932.
FX spot and FX forward are essentially equivalent, simply with a different way to obtain the payment date; they are both represented using this class.
| Modifier and Type | Class and Description |
|---|---|
static class |
FxSingleTrade.Builder
The bean-builder for
FxSingleTrade. |
static class |
FxSingleTrade.Meta
The meta-bean for
FxSingleTrade. |
| Modifier and Type | Method and Description |
|---|---|
static FxSingleTrade.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.
|
FxSingle |
getProduct()
Gets the product that was agreed when the trade occurred.
|
int |
hashCode() |
static FxSingleTrade.Meta |
meta()
The meta-bean for
FxSingleTrade. |
FxSingleTrade.Meta |
metaBean() |
static FxSingleTrade |
of(TradeInfo info,
FxSingle product)
Obtains an instance of a foreign exchange trade.
|
ResolvedFxSingleTrade |
resolve(ReferenceData refData)
Resolves this trade using the specified reference data.
|
PortfolioItemSummary |
summarize()
Summarizes the portfolio item.
|
FxSingleTrade.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
FxSingleTrade |
withInfo(PortfolioItemInfo info)
Returns an instance with the specified info.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetIdpublic static FxSingleTrade of(TradeInfo info, FxSingle product)
info - the trade infoproduct - the productpublic FxSingleTrade withInfo(PortfolioItemInfo info)
ProductTradewithInfo in interface FxTradewithInfo in interface PortfolioItemwithInfo in interface ProductTradewithInfo in interface ResolvableTrade<ResolvedFxSingleTrade>withInfo in interface Tradeinfo - the new infopublic PortfolioItemSummary summarize()
PortfolioItemThis provides a summary, including a human readable description.
summarize in interface PortfolioItemsummarize in interface Tradepublic ResolvedFxSingleTrade 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<ResolvedFxSingleTrade>resolve in interface ResolvableTrade<ResolvedFxSingleTrade>refData - the reference data to use when resolvingpublic static FxSingleTrade.Meta meta()
FxSingleTrade.public static FxSingleTrade.Builder builder()
public FxSingleTrade.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic TradeInfo getInfo()
This allows additional information to be attached to the trade.
getInfo in interface PortfolioItemgetInfo in interface Tradepublic FxSingle getProduct()
The product captures the contracted financial details of the trade.
getProduct in interface FxTradegetProduct in interface ProductTradepublic FxSingleTrade.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.