public final class Swaption extends Object implements Product, Resolvable<ResolvedSwaption>, org.joda.beans.ImmutableBean, Serializable
A swaption is a financial instrument that provides an option based on the future value of a swap. The underlying swap must be a single currency, Fixed-Float swap with a single index. The index may be Ibor or Overnight.
Strata supports European swaptions for pricing. However, the trade model supports Bermudan and American exercise.
| Modifier and Type | Class and Description |
|---|---|
static class |
Swaption.Builder
The bean-builder for
Swaption. |
static class |
Swaption.Meta
The meta-bean for
Swaption. |
| Modifier and Type | Method and Description |
|---|---|
ImmutableSet<Currency> |
allCurrencies()
Returns the set of currencies the product refers to.
|
static Swaption.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
Swap |
exercise(LocalDate exerciseDate,
ReferenceData refData)
Exercises the swaption into a swap at one of the optional exercise dates.
|
Currency |
getCurrency()
Gets the currency of the swaption.
|
Optional<SwaptionExercise> |
getExerciseInfo()
Gets the exercise information, optional.
|
ZonedDateTime |
getExpiry()
Gets the expiry date-time.
|
AdjustableDate |
getExpiryDate()
Gets the expiry date of the option.
|
LocalTime |
getExpiryTime()
Gets the expiry time of the option.
|
ZoneId |
getExpiryZone()
Gets the time-zone of the expiry time.
|
RateIndex |
getIndex()
Gets the index of the underlying swap.
|
LongShort |
getLongShort()
Gets whether the option is long or short.
|
SwaptionSettlement |
getSwaptionSettlement()
Gets settlement method.
|
Swap |
getUnderlying()
Gets the underlying swap.
|
int |
hashCode() |
static Swaption.Meta |
meta()
The meta-bean for
Swaption. |
Swaption.Meta |
metaBean() |
ResolvedSwaption |
resolve(ReferenceData refData) |
Swaption |
selectExerciseDate(LocalDate exerciseDate,
ReferenceData refData)
Selects one of the exercise dates.
|
Swaption.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitallPaymentCurrencies, isCrossCurrencypublic ZonedDateTime getExpiry()
The option expires at this date and time.
The result is returned by combining the expiry date, time and time-zone.
public Currency getCurrency()
This is the currency of the underlying swap, which is not allowed to be cross-currency.
public ImmutableSet<Currency> allCurrencies()
ProductThis returns the complete set of currencies, not just the payment currencies. For example, the sets will differ when one of the currencies is non-deliverable.
allCurrencies in interface Productpublic RateIndex getIndex()
public Swaption selectExerciseDate(LocalDate exerciseDate, ReferenceData refData)
This returns a swaption with the exerciseInfo removed.
The expiry date and underlying swap will be set in accordance with the selected exercise date.
If the swaption has no exercise information, this checks that the exercise date matches the expiry date.
The date is matched as an adjusted date first, then as an unadjusted date.
If the date can only be an adjusted date, the result will use BusinessDayAdjustment.NONE.
exerciseDate - the exercise date, which must be valid for the swaptionrefData - the reference dataIllegalArgumentException - if the proposed exercise date is not validpublic Swap exercise(LocalDate exerciseDate, ReferenceData refData)
The start date of the swap will be set in accordance with the selected exercise date.
See selectExerciseDate(LocalDate, ReferenceData) for more info.
exerciseDate - the exercise date, which must be valid for the swaptionrefData - the reference dataIllegalArgumentException - if the proposed exercise date is not validpublic ResolvedSwaption resolve(ReferenceData refData)
resolve in interface Resolvable<ResolvedSwaption>public static Swaption.Meta meta()
Swaption.public static Swaption.Builder builder()
public Swaption.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic LongShort getLongShort()
Long indicates that the owner wants the option to be in the money at expiry. Short indicates that the owner wants the option to be out of the money at expiry.
public SwaptionSettlement getSwaptionSettlement()
The settlement of the option is specified by SwaptionSettlement.
public Optional<SwaptionExercise> getExerciseInfo()
A swaption can have three different kinds of exercise - European, American and Bermudan. A European swaption has one exercise date, an American can exercise on any date, and a Bermudan can exercise on a fixed set of dates.
If not present, the swaption is considered to be a European swaption as per the expiry date.
public AdjustableDate getExpiryDate()
This is the last date that the swaption can be exercised.
To represent Bermudan and American swaptions, or to represent a European swaption where the swap start
date is calculated dynamically, see the exerciseOptions field.
This date is typically set to be a valid business day.
However, the businessDayAdjustment property may be set to provide a rule for adjustment.
public LocalTime getExpiryTime()
The expiry time is related to the expiry date and time-zone.
public ZoneId getExpiryZone()
The expiry time-zone is related to the expiry date and time.
public Swap getUnderlying()
At expiry, if the option is exercised, this swap will be entered into. The swap description is the swap as viewed by the party long the option.
public Swaption.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.