Class FxResetNotionalExchange
- java.lang.Object
-
- com.opengamma.strata.product.swap.FxResetNotionalExchange
-
- All Implemented Interfaces:
SwapPaymentEvent
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class FxResetNotionalExchange extends Object implements SwapPaymentEvent, org.joda.beans.ImmutableBean, Serializable
An exchange of notionals between two counterparties where FX reset applies.In most swaps, the notional amount is not exchanged, with only the interest being exchanged. However, in the case of an FX reset swap, the notional is exchanged. The swap contract will define a notional, which may vary over time, in one currency however payments are defined to occur in a different currency. An FX conversion is used to convert the amount.
For example, a swap may have a notional of GBP 1,000,000 but be paid in USD. At the start of the first swap period, there is a notional exchange at the prevailing FX rate, say of USD 1,520,000. At the end of the first swap period, that amount is repaid and the new FX rate is used to determine the exchange for the second period, say of USD 1,610,000. In general, only the net difference due to FX will be exchanged at intermediate swap period boundaries.
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. An FX reset swap is also known as a Mark-to-market currency swap.
Defined by the 2006 ISDA definitions article 10.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FxResetNotionalExchange.Meta
The meta-bean forFxResetNotionalExchange
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description FxResetNotionalExchange
adjustPaymentDate(TemporalAdjuster adjuster)
Adjusts the payment date using the rules of the specified adjuster.boolean
equals(Object obj)
Currency
getCurrency()
Gets the payment currency.double
getNotional()
Gets the amount of the notional.CurrencyAmount
getNotionalAmount()
Gets the notional amount, positive if receiving, negative if paying.FxIndexObservation
getObservation()
Gets the FX index observation.LocalDate
getPaymentDate()
Gets the date that the payment is made.Currency
getReferenceCurrency()
Gets the reference currency, as defined in the contract.int
hashCode()
boolean
isKnownAmountAt(LocalDate date)
Checks whether the payment amount of an event is known at a given date.static FxResetNotionalExchange.Meta
meta()
The meta-bean forFxResetNotionalExchange
.FxResetNotionalExchange.Meta
metaBean()
static FxResetNotionalExchange
of(CurrencyAmount notionalAmount, LocalDate paymentDate, FxIndexObservation observation)
Obtains an instance from the amount, date and FX index observation.String
toString()
-
-
-
Method Detail
-
of
public static FxResetNotionalExchange of(CurrencyAmount notionalAmount, LocalDate paymentDate, FxIndexObservation observation)
Obtains an instance from the amount, date and FX index observation.- Parameters:
notionalAmount
- the notional amount that will be FX convertedpaymentDate
- the date that the payment is madeobservation
- the FX observation to perform- Returns:
- the FX reset notional exchange
-
getCurrency
public Currency getCurrency()
Gets the payment currency.This returns the currency that the payment is made in. ISDA refers to this as the variable currency.
- Specified by:
getCurrency
in interfaceSwapPaymentEvent
- Returns:
- the payment currency
-
getReferenceCurrency
public Currency getReferenceCurrency()
Gets the reference currency, as defined in the contract.This is the currency of notional amount as defined in the contract. The notional will be converted from this currency to the payment currency using the specified index. ISDA refers to this as the constant currency.
The reference currency must be one of the two currencies of the index.
- Returns:
- the reference currency, as defined in the contract
-
getNotional
public double getNotional()
Gets the amount of the notional.See
getNotionalAmount()
.- Returns:
- the amount of the notional
-
adjustPaymentDate
public FxResetNotionalExchange adjustPaymentDate(TemporalAdjuster adjuster)
Description copied from interface:SwapPaymentEvent
Adjusts the payment date using the rules of the specified adjuster.The adjuster is typically an instance of
BusinessDayAdjustment
. Implementations must return a new instance unless they are immutable and no change occurs.- Specified by:
adjustPaymentDate
in interfaceSwapPaymentEvent
- Parameters:
adjuster
- the adjuster to apply to the payment date- Returns:
- the adjusted payment event
-
isKnownAmountAt
public boolean isKnownAmountAt(LocalDate date)
Description copied from interface:SwapPaymentEvent
Checks whether the payment amount of an event is known at a given date.Each payment event may be a known amount at a given date, else it could be fixed at a later date
- Specified by:
isKnownAmountAt
in interfaceSwapPaymentEvent
- Parameters:
date
- the date to check whether payment amount is known or not- Returns:
- true if payment is fixed at given date
-
meta
public static FxResetNotionalExchange.Meta meta()
The meta-bean forFxResetNotionalExchange
.- Returns:
- the meta-bean, not null
-
metaBean
public FxResetNotionalExchange.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getNotionalAmount
public CurrencyAmount getNotionalAmount()
Gets the notional amount, positive if receiving, negative if paying.The notional amount applicable during the period. The currency of the notional is specified by
referenceCurrency
but will be paid after FX conversion using the index.- Returns:
- the value of the property, not null
-
getPaymentDate
public LocalDate getPaymentDate()
Gets the date that the payment is made.Each payment event has a single payment date. This date has been adjusted to be a valid business day.
- Specified by:
getPaymentDate
in interfaceSwapPaymentEvent
- Returns:
- the value of the property, not null
-
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
-
-