public final class NotionalSchedule extends Object implements org.joda.beans.ImmutableBean, Serializable
Interest rate swaps are based on a notional amount of money. The notional can vary during the lifetime of the swap, but only at payment period boundaries. It is not permitted to vary at an intermediate accrual (compounding) period boundary.
In most cases, the notional amount is not exchanged, with only the net difference being exchanged. However, in certain cases, initial, final or intermediate amounts are exchanged. In this case, the notional can be referred to as the principal.
Modifier and Type | Class and Description |
---|---|
static class |
NotionalSchedule.Builder
The bean-builder for
NotionalSchedule . |
static class |
NotionalSchedule.Meta
The meta-bean for
NotionalSchedule . |
Modifier and Type | Method and Description |
---|---|
static NotionalSchedule.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
ValueSchedule |
getAmount()
Gets the notional amount.
|
Currency |
getCurrency()
Gets the currency of the swap leg associated with the notional.
|
Optional<FxResetCalculation> |
getFxReset()
Gets the FX reset definition, optional.
|
int |
hashCode() |
boolean |
isFinalExchange()
Gets the flag indicating whether to exchange the final notional.
|
boolean |
isInitialExchange()
Gets the flag indicating whether to exchange the initial notional.
|
boolean |
isIntermediateExchange()
Gets the flag indicating whether to exchange the differences in the notional during the lifetime of the swap.
|
static NotionalSchedule.Meta |
meta()
The meta-bean for
NotionalSchedule . |
NotionalSchedule.Meta |
metaBean() |
static NotionalSchedule |
of(CurrencyAmount notional)
Obtains an instance with a single amount that does not change over time.
|
static NotionalSchedule |
of(Currency currency,
double amount)
Obtains an instance with a single amount that does not change over time.
|
static NotionalSchedule |
of(Currency currency,
ValueSchedule amountSchedule)
Obtains an instance with a notional amount that can change over time.
|
NotionalSchedule.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
public static NotionalSchedule of(CurrencyAmount notional)
notional
- the single notional that does not change over timepublic static NotionalSchedule of(Currency currency, double amount)
currency
- the currency of the notional and swap paymentsamount
- the single notional amount that does not change over timepublic static NotionalSchedule of(Currency currency, ValueSchedule amountSchedule)
currency
- the currency of the notional and swap paymentsamountSchedule
- the schedule describing how the notional changes over timepublic static NotionalSchedule.Meta meta()
NotionalSchedule
.public static NotionalSchedule.Builder builder()
public NotionalSchedule.Meta metaBean()
metaBean
in interface org.joda.beans.Bean
public Currency getCurrency()
This is the currency of the swap leg and the currency that interest calculation is made in.
The amounts of the notional are usually expressed in terms of this currency,
however they can be converted from amounts in a different currency.
See the optional fxReset
property.
public Optional<FxResetCalculation> getFxReset()
This property is used when the defined amount of the notional is specified in a currency other than the currency of the swap leg. When this occurs, the notional amount has to be converted using an FX rate to the swap leg currency. This conversion occurs at each payment period boundary and usually corresponds to an actual exchange of money between the counterparties.
When building the notional schedule, if an FxResetCalculation
is present,
then at least one of the notional exchange flags should be set to true. If all notional
exchange flags are false then an IllegalArgumentException is thrown.
public ValueSchedule getAmount()
This defines the notional as an initial amount and a list of adjustments. The notional expressed here is intended to always be positive.
The notional is only allowed to change at payment period boundaries.
As such, the ValueSchedule
steps are defined relative to the payment schedule.
public boolean isInitialExchange()
Setting this to true indicates that the notional is transferred at the start of the trade. This should typically be set to true in the case of an FX reset swap, or one with a varying notional.
public boolean isIntermediateExchange()
Setting this to true indicates that the notional is transferred when it changes during the trade. This should typically be set to true in the case of an FX reset swap, or one with a varying notional.
public boolean isFinalExchange()
Setting this to true indicates that the notional is transferred at the end of the trade. This should typically be set to true in the case of an FX reset swap, or one with a varying notional.
public NotionalSchedule.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.