## Class ResolvedFxSwap

• All Implemented Interfaces:
ResolvedProduct, Serializable, org.joda.beans.Bean, org.joda.beans.ImmutableBean

public final class ResolvedFxSwap
extends Object
implements ResolvedProduct, org.joda.beans.ImmutableBean, Serializable
An FX Swap, resolved for pricing.

This is the resolved form of FxSwap and is an input to the pricers. Applications will typically create a ResolvedFxSwap from a FxSwap using FxSwap.resolve(ReferenceData).

A ResolvedFxSwap is 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.

See Also:
Serialized Form
• ### Nested Class Summary

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

All Methods
Modifier and Type Method Description
boolean equals​(Object obj)
ResolvedFxSingle getFarLeg()
Gets the foreign exchange transaction at the later date.
ResolvedFxSingle getNearLeg()
Gets the foreign exchange transaction at the earlier date.
int hashCode()
static ResolvedFxSwap.Meta meta()
The meta-bean for ResolvedFxSwap.
ResolvedFxSwap.Meta metaBean()
static ResolvedFxSwap of​(ResolvedFxSingle nearLeg, ResolvedFxSingle farLeg)
Creates a ResolvedFxSwap from two legs.
static ResolvedFxSwap ofForwardPoints​(CurrencyAmount amountCurrency1, Currency currency2, double nearFxRate, double forwardPoints, LocalDate nearDate, LocalDate farDate)
Creates a ResolvedFxSwap using forward points.
String toString()
• ### 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
• ### Method Detail

• #### of

public static ResolvedFxSwap of​(ResolvedFxSingle nearLeg,
ResolvedFxSingle farLeg)
Creates a ResolvedFxSwap from two legs.

The transactions must be passed in with payment dates in the correct order. The currency pair of each leg must match and have amounts flowing in opposite directions.

Parameters:
nearLeg - the earlier leg
farLeg - the later leg
Returns:
the resolved FX swap
• #### ofForwardPoints

public static ResolvedFxSwap ofForwardPoints​(CurrencyAmount amountCurrency1,
Currency currency2,
double nearFxRate,
double forwardPoints,
LocalDate nearDate,
LocalDate farDate)
Creates a ResolvedFxSwap using forward points.

The FX rate at the near date is specified as fxRate. The FX rate at the far date is equal to fxRate + forwardPoints

The two currencies must not be equal. The near date must be before the far date. Conventions will be used to determine the base and counter currency.

Parameters:
amountCurrency1 - the amount of the near leg in the first currency
currency2 - the second currency
nearFxRate - the near FX rate, where (1.0 * amountCurrency1 = fxRate * amountCurrency2)
forwardPoints - the forward points, where the far FX rate is (fxRate + forwardPoints)
nearDate - the near value date
farDate - the far value date
Returns:
the resolved FX swap
• #### meta

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

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

public ResolvedFxSingle getNearLeg()
Gets the foreign exchange transaction at the earlier date.

This provides details of a single foreign exchange at a specific date. The payment date of this transaction must be before that of the far leg.

Returns:
the value of the property, not null
• #### getFarLeg

public ResolvedFxSingle getFarLeg()
Gets the foreign exchange transaction at the later date.

This provides details of a single foreign exchange at a specific date. The payment date of this transaction must be after that of the near leg.

Returns:
the value of the property, 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