Class FxReset
- java.lang.Object
-
- com.opengamma.strata.product.swap.FxReset
-
- All Implemented Interfaces:
Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class FxReset extends Object implements org.joda.beans.ImmutableBean, Serializable
An FX rate conversion for the notional amount of a swap leg.Interest rate swaps are based on a notional amount of money. The notional can be specified in a currency other than that of the swap leg, with an FX conversion applied at each payment period boundary.
The two currencies involved are the swap leg currency and the reference currency. The swap leg currency is, in most cases, the currency that payment will occur in. The reference currency is the currency in which the notional is actually defined. ISDA refers to the payment currency as the variable currency and the reference currency as the constant currency.
Defined by the 2006 ISDA definitions article 10.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FxReset.Meta
The meta-bean forFxReset
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
FxIndex
getIndex()
Gets the FX index.FxIndexObservation
getObservation()
Gets the FX index observation.Currency
getReferenceCurrency()
Gets the currency of the notional amount defined in the contract.int
hashCode()
static FxReset.Meta
meta()
The meta-bean forFxReset
.FxReset.Meta
metaBean()
static FxReset
of(FxIndexObservation observation, Currency referenceCurrency)
Obtains an instance from the observation and reference currency.String
toString()
-
-
-
Method Detail
-
of
public static FxReset of(FxIndexObservation observation, Currency referenceCurrency)
Obtains an instance from the observation and reference currency.- Parameters:
observation
- the FX index observationreferenceCurrency
- the reference currency- Returns:
- the FX reset
- Throws:
IllegalArgumentException
- if the currency is not one of those in the index
-
getIndex
public FxIndex getIndex()
Gets the FX index.- Returns:
- the FX index
-
meta
public static FxReset.Meta meta()
The meta-bean forFxReset
.- Returns:
- the meta-bean, not null
-
metaBean
public FxReset.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getObservation
public FxIndexObservation getObservation()
Gets the FX index observation.This defines the observation of the index used to obtain the FX reset rate.
An FX index is a daily rate of exchange between two currencies. Note that the order of the currencies in the index does not matter, as the conversion direction is fully defined by the currency of the reference amount.
- Returns:
- the value of the property, not null
-
getReferenceCurrency
public Currency getReferenceCurrency()
Gets the currency of the notional amount defined in the contract.This is the currency of notional amount as defined in the contract. The amount will be converted from this reference currency to the swap leg currency when calculating the value of the leg.
The reference currency must be one of the two currencies of the index.
The reference currency is also known as the constant currency.
- Returns:
- the value of the property, not null
-
-