public final class FxSwapTrade extends Object implements FxTrade, ResolvableTrade<ResolvedFxSwapTrade>, org.joda.beans.ImmutableBean, Serializable
An Over-The-Counter (OTC) trade in an FxSwap.
An FX swap is a financial instrument that represents the exchange of an equivalent amount in two different currencies between counterparties on two different dates.
For example, an FX swap might represent the payment of USD 1,000 and the receipt of EUR 932 on one date, and the payment of EUR 941 and the receipt of USD 1,000 at a later date.
| Modifier and Type | Class and Description |
|---|---|
static class |
FxSwapTrade.Builder
The bean-builder for
FxSwapTrade. |
static class |
FxSwapTrade.Meta
The meta-bean for
FxSwapTrade. |
| Modifier and Type | Method and Description |
|---|---|
static FxSwapTrade.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.
|
FxSwap |
getProduct()
Gets the FX swap product that was agreed when the trade occurred.
|
int |
hashCode() |
static FxSwapTrade.Meta |
meta()
The meta-bean for
FxSwapTrade. |
FxSwapTrade.Meta |
metaBean() |
static FxSwapTrade |
of(TradeInfo info,
FxSwap product)
Obtains an instance of an FX swap trade.
|
ResolvedFxSwapTrade |
resolve(ReferenceData refData)
Resolves this trade using the specified reference data.
|
PortfolioItemSummary |
summarize()
Summarizes the portfolio item.
|
FxSwapTrade.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
FxSwapTrade |
withInfo(PortfolioItemInfo info)
Returns an instance with the specified info.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetIdpublic static FxSwapTrade of(TradeInfo info, FxSwap product)
info - the trade infoproduct - the productpublic FxSwapTrade withInfo(PortfolioItemInfo info)
ProductTradewithInfo in interface FxTradewithInfo in interface PortfolioItemwithInfo in interface ProductTradewithInfo in interface ResolvableTrade<ResolvedFxSwapTrade>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 ResolvedFxSwapTrade 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<ResolvedFxSwapTrade>resolve in interface ResolvableTrade<ResolvedFxSwapTrade>refData - the reference data to use when resolvingpublic static FxSwapTrade.Meta meta()
FxSwapTrade.public static FxSwapTrade.Builder builder()
public FxSwapTrade.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 FxSwap getProduct()
The product captures the contracted financial details of the trade.
getProduct in interface FxTradegetProduct in interface ProductTradepublic FxSwapTrade.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.