public final class IborCapletFloorletBinaryPeriod extends Object implements org.joda.beans.ImmutableBean, Serializable
This represents a single payment period within an Ibor cap/floor leg.
This class specifies the data necessary to calculate the value of the period.
The payment period contains the unique accrual period.
The value of the period is based on the observed value of IborRateComputation.
The pay-offs are, for an Ibor index on the fixingDate of 'I', a year fraction 'a' and a amount 'N'
Ibor binary caplet: N * a * ( (I > K)?1:0 ) ; K=caplet
Ibor binary floorlet: N * a * ( (I < K)?1:0 ) ; K=floorlet
The payment is a caplet or floorlet.
If caplet (floorlet) is not null, the payment is a caplet (floorlet).
Thus one of the two fields must be null and the other not null.
If start date and end date of the period, and payment date are not specified, a standard caplet/floorlet is created
based on the data and convention in rateComputation, i.e., the Ibor is fixed in advance and paid in arrears.
An IborCapletFloorletBinaryPeriod is bound to data that changes over time, such as holiday calendars.
If the data changes, such as the addition of a new holiday, the resolved form will not be updated.
Care must be taken when placing the resolved form in a cache or persistence layer.
| Modifier and Type | Class and Description |
|---|---|
static class |
IborCapletFloorletBinaryPeriod.Builder
The bean-builder for
IborCapletFloorletBinaryPeriod. |
static class |
IborCapletFloorletBinaryPeriod.Meta
The meta-bean for
IborCapletFloorletBinaryPeriod. |
| Modifier and Type | Method and Description |
|---|---|
static IborCapletFloorletBinaryPeriod.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
double |
getAmount()
Gets the fixed amount when the option is in-the-money, positive if receiving (long), negative if paying (short).
|
OptionalDouble |
getCaplet()
Gets the optional caplet strike.
|
Currency |
getCurrency()
Gets the primary currency of the payment period.
|
LocalDate |
getEndDate()
Gets the end date of the payment period.
|
LocalDate |
getFixingDate()
Gets the fixing date of the index.
|
ZonedDateTime |
getFixingDateTime()
Gets the fixing date-time of the index.
|
OptionalDouble |
getFloorlet()
Gets the optional floorlet strike.
|
IborRateComputation |
getIborRate()
Gets the rate to be observed.
|
IborIndex |
getIndex()
Gets the Ibor index.
|
LocalDate |
getPaymentDate()
Gets the date that payment occurs.
|
PutCall |
getPutCall()
Gets put or call.
|
LocalDate |
getStartDate()
Gets the start date of the payment period.
|
double |
getStrike()
Gets the strike value.
|
LocalDate |
getUnadjustedEndDate()
Gets the unadjusted end date.
|
LocalDate |
getUnadjustedStartDate()
Gets the unadjusted start date.
|
double |
getYearFraction()
Gets the year fraction that the accrual period represents.
|
int |
hashCode() |
static IborCapletFloorletBinaryPeriod.Meta |
meta()
The meta-bean for
IborCapletFloorletBinaryPeriod. |
IborCapletFloorletBinaryPeriod.Meta |
metaBean() |
CurrencyAmount |
payoff(double fixing)
The payoff for a given fixing rate.
|
IborCapletFloorletBinaryPeriod.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
public CurrencyAmount payoff(double fixing)
fixing - the fixingpublic IborIndex getIndex()
public LocalDate getFixingDate()
public ZonedDateTime getFixingDateTime()
public double getStrike()
public PutCall getPutCall()
CALL is returned for a caplet, whereas PUT is returned for a floorlet.
public static IborCapletFloorletBinaryPeriod.Meta meta()
IborCapletFloorletBinaryPeriod.public static IborCapletFloorletBinaryPeriod.Builder builder()
public IborCapletFloorletBinaryPeriod.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic Currency getCurrency()
The amounts of the notional are usually expressed in terms of this currency, however they can be converted from amounts in a different currency.
public double getAmount()
The currency of the notional is specified by currency.
public LocalDate getStartDate()
This is the first date in the period. If the schedule adjusts for business days, then this is the adjusted date.
public LocalDate getEndDate()
This is the last date in the period. If the schedule adjusts for business days, then this is the adjusted date.
public LocalDate getUnadjustedStartDate()
The start date before any business day adjustment is applied.
When building, this will default to the start date if not specified.
public LocalDate getUnadjustedEndDate()
The end date before any business day adjustment is applied.
When building, this will default to the end date if not specified.
public double getYearFraction()
The value is usually calculated using a DayCount which may be different to that of the index.
Typically the value will be close to 1 for one year and close to 0.5 for six months.
The fraction may be greater than 1, but not less than 0.
public LocalDate getPaymentDate()
If the schedule adjusts for business days, then this is the adjusted date.
public OptionalDouble getCaplet()
This defines the strike value of a caplet.
If the period is not a caplet, this field will be absent.
public OptionalDouble getFloorlet()
This defines the strike value of a floorlet.
If the period is not a floorlet, this field will be absent.
public IborRateComputation getIborRate()
The value of the period is based on this Ibor rate. For example, it might be a well known market index such as 'GBP-LIBOR-3M'.
public IborCapletFloorletBinaryPeriod.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.