## Class KnownAmountNotionalSwapPaymentPeriod

• java.lang.Object
• com.opengamma.strata.product.swap.KnownAmountNotionalSwapPaymentPeriod
• All Implemented Interfaces:
NotionalPaymentPeriod, SwapPaymentPeriod, Serializable, org.joda.beans.Bean, org.joda.beans.ImmutableBean

public final class KnownAmountNotionalSwapPaymentPeriod
extends Object
implements NotionalPaymentPeriod, org.joda.beans.ImmutableBean, Serializable
A period within a swap that results in a known amount.

A swap leg consists of one or more periods that result in a payment. The standard class, RatePaymentPeriod, represents a payment period calculated from a fixed or floating rate. By contrast, this class represents a period where the amount of the payment is known and fixed.

Serialized Form
• ### Nested Class Summary

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

All Methods
Modifier and Type Method Description
KnownAmountNotionalSwapPaymentPeriod adjustPaymentDate​(TemporalAdjuster adjuster)
static KnownAmountNotionalSwapPaymentPeriod.Builder builder()
Returns a builder used to create an instance of the bean.
void collectIndices​(ImmutableSet.Builder<Index> builder)
Collects all the indices referred to by this period.
boolean equals​(Object obj)
Currency getCurrency()
Gets the primary currency of the payment period.
LocalDate getEndDate()
Gets the end date of the payment period.
Optional<FxIndexObservation> getFxResetObservation()
Gets the FX reset definition, optional.
CurrencyAmount getNotionalAmount()
Gets the notional amount, positive if receiving, negative if paying.
Payment getPayment()
Gets the payment.
LocalDate getPaymentDate()
Gets the date that the payment is made.
LocalDate getStartDate()
Gets the start date of the payment period.
LocalDate getUnadjustedEndDate()
LocalDate getUnadjustedStartDate()
int hashCode()
static KnownAmountNotionalSwapPaymentPeriod.Meta meta()
The meta-bean for KnownAmountNotionalSwapPaymentPeriod.
KnownAmountNotionalSwapPaymentPeriod.Meta metaBean()
static KnownAmountNotionalSwapPaymentPeriod of​(Payment payment, SchedulePeriod period, CurrencyAmount notional)
Obtains an instance based on a payment, schedule period and notional.
static KnownAmountNotionalSwapPaymentPeriod of​(Payment payment, SchedulePeriod period, CurrencyAmount notional, FxIndexObservation fxResetObservation)
Obtains an instance based on a payment, schedule period, notional and FX reset.
KnownAmountNotionalSwapPaymentPeriod.Builder toBuilder()
Returns a builder that allows this bean to be mutated.
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 KnownAmountNotionalSwapPaymentPeriod of​(Payment payment,
SchedulePeriod period,
CurrencyAmount notional)
Obtains an instance based on a payment, schedule period and notional.
Parameters:
payment - the payment
period - the schedule period
notional - the notional
Returns:
the period
• #### of

public static KnownAmountNotionalSwapPaymentPeriod of​(Payment payment,
SchedulePeriod period,
CurrencyAmount notional,
FxIndexObservation fxResetObservation)
Obtains an instance based on a payment, schedule period, notional and FX reset.
Parameters:
payment - the payment
period - the schedule period
notional - the notional
fxResetObservation - the FX reset observation
Returns:
the period
• #### getPaymentDate

public LocalDate getPaymentDate()
Description copied from interface: SwapPaymentPeriod
Gets the date that the payment is made.

Each payment period has a single payment date. This date has been adjusted to be a valid business day.

Specified by:
getPaymentDate in interface SwapPaymentPeriod
Returns:
the payment date of the period
• #### getCurrency

public Currency getCurrency()
Gets the primary currency of the payment period.

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.

Specified by:
getCurrency in interface SwapPaymentPeriod
Returns:
the primary currency

public KnownAmountNotionalSwapPaymentPeriod adjustPaymentDate​(TemporalAdjuster adjuster)
Description copied from interface: SwapPaymentPeriod

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 interface SwapPaymentPeriod
Parameters:
adjuster - the adjuster to apply to the payment date
Returns:
• #### collectIndices

public void collectIndices​(ImmutableSet.Builder<Index> builder)
Description copied from interface: SwapPaymentPeriod
Collects all the indices referred to by this period.

A period will typically refer to at least one index, such as 'GBP-LIBOR-3M'. Each index that is referred to must be added to the specified builder.

Specified by:
collectIndices in interface SwapPaymentPeriod
Parameters:
builder - the builder to use
• #### meta

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

public static KnownAmountNotionalSwapPaymentPeriod.Builder builder()
Returns a builder used to create an instance of the bean.
Returns:
the builder, not null
• #### metaBean

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

public Payment getPayment()
Gets the payment.

This includes the payment date and amount. If the schedule adjusts for business days, then the date is the adjusted date.

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

public LocalDate getStartDate()
Gets the start date of the payment period.

This is the first date in the period. If the schedule adjusts for business days, then this is the adjusted date.

Specified by:
getStartDate in interface SwapPaymentPeriod
Returns:
the value of the property, not null
• #### getEndDate

public LocalDate getEndDate()
Gets the end date of the payment period.

This is the last date in the period. If the schedule adjusts for business days, then this is the adjusted date.

Specified by:
getEndDate in interface SwapPaymentPeriod
Returns:
the value of the property, not null

public LocalDate getUnadjustedStartDate()

When building, this will default to the start date if not specified.

Returns:
the value of the property, not null

public LocalDate getUnadjustedEndDate()

When building, this will default to the end date if not specified.

Returns:
the value of the property, not null
• #### 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 typically the same as currency. However, if FX reset applies, the currency will differ.

Specified by:
getNotionalAmount in interface NotionalPaymentPeriod
Returns:
the value of the property
• #### getFxResetObservation

public Optional<FxIndexObservation> getFxResetObservation()
Gets the FX reset definition, optional.

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.

The FX reset definition must be valid. The payment currency and the currency of the notional must differ, and the currency pair must be that of the observation.

Specified by:
getFxResetObservation in interface NotionalPaymentPeriod
Returns:
the optional value of the property, not null
• #### toBuilder

public KnownAmountNotionalSwapPaymentPeriod.Builder toBuilder()
Returns a builder that allows this bean to be mutated.
Returns:
the mutable builder, 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