public final class FxResetCalculation extends Object implements org.joda.beans.ImmutableBean, Serializable
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.
| Modifier and Type | Class and Description |
|---|---|
static class |
FxResetCalculation.Builder
The bean-builder for
FxResetCalculation. |
static class |
FxResetCalculation.Meta
The meta-bean for
FxResetCalculation. |
| Modifier and Type | Method and Description |
|---|---|
static FxResetCalculation.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
DaysAdjustment |
getFixingDateOffset()
Gets the offset of the FX reset fixing date from each adjusted accrual date.
|
FxResetFixingRelativeTo |
getFixingRelativeTo()
Gets the base date that each FX reset fixing is made relative to, defaulted to 'PeriodStart'.
|
FxIndex |
getIndex()
Gets the FX index used to obtain the FX reset rate.
|
OptionalDouble |
getInitialNotionalValue()
Gets the initial notional value, specified in the payment currency.
|
Currency |
getReferenceCurrency()
Gets the currency of the notional amount defined in the contract.
|
int |
hashCode() |
static FxResetCalculation.Meta |
meta()
The meta-bean for
FxResetCalculation. |
FxResetCalculation.Meta |
metaBean() |
BiFunction<Integer,SchedulePeriod,Optional<FxReset>> |
resolve(ReferenceData refData)
Resolves this adjustment using the specified reference data.
|
FxResetCalculation.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
public BiFunction<Integer,SchedulePeriod,Optional<FxReset>> resolve(ReferenceData refData)
Calling this method resolves the holiday calendar, returning a function that
can convert a SchedulePeriod and period index pair to an optional FxReset.
The conversion locks the fixing date based on the specified schedule period
and the data held in this object.
refData - the reference data to use when resolvingReferenceDataNotFoundException - if an identifier cannot be resolved in the reference dataRuntimeException - if the calculation is invalidpublic static FxResetCalculation.Meta meta()
FxResetCalculation.public static FxResetCalculation.Builder builder()
public FxResetCalculation.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic FxIndex getIndex()
This is the index of FX 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 reference and swap leg currencies.
public Currency getReferenceCurrency()
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.
public FxResetFixingRelativeTo getFixingRelativeTo()
The FX reset fixing date is relative to either the start or end of each accrual period.
public DaysAdjustment getFixingDateOffset()
The offset is applied to the base date specified by fixingRelativeTo.
The offset is typically a negative number of business days.
When building, this will default to the fixing offset of the index if not specified.
public OptionalDouble getInitialNotionalValue()
If present, this fixed amount represents the notional of the initial period of the swap leg, with no FX reset being applied.
If not present, the initial notional amount is calculated by applying an fx conversion to the reference currency in the same manner as all other period notional calculations.
public FxResetCalculation.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.