public final class FxVanillaOption extends Object implements FxOptionProduct, Resolvable<ResolvedFxVanillaOption>, org.joda.beans.ImmutableBean, Serializable
An FX option is a financial instrument that provides an option based on the future value of a foreign exchange. The option is European, exercised only on the exercise date.
For example, a call on a 'EUR 1.00 / USD -1.41' exchange is the option to perform a foreign exchange on the expiry date, where USD 1.41 is paid to receive EUR 1.00.
| Modifier and Type | Class and Description |
|---|---|
static class |
FxVanillaOption.Builder
The bean-builder for
FxVanillaOption. |
static class |
FxVanillaOption.Meta
The meta-bean for
FxVanillaOption. |
| Modifier and Type | Method and Description |
|---|---|
static FxVanillaOption.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
CurrencyPair |
getCurrencyPair()
Gets currency pair of the base currency and counter currency.
|
ZonedDateTime |
getExpiry()
Gets the expiry date-time.
|
LocalDate |
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.
|
LongShort |
getLongShort()
Gets whether the option is long or short.
|
FxSingle |
getUnderlying()
Gets the underlying foreign exchange transaction.
|
int |
hashCode() |
static FxVanillaOption.Meta |
meta()
The meta-bean for
FxVanillaOption. |
FxVanillaOption.Meta |
metaBean() |
static FxVanillaOption |
of(LongShort longShort,
ZonedDateTime expiry,
CurrencyPair currencyPair,
PutCall putCall,
double strike,
double baseNotional,
LocalDate paymentDate)
Creates an equivalent
FxVanillaOption using currency pair, option expiry, call/put flag, strike, base
currency notional, and underlying payment date. |
ResolvedFxVanillaOption |
resolve(ReferenceData refData) |
FxVanillaOption.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitallCurrencies, isCrossCurrencyallPaymentCurrenciespublic static FxVanillaOption of(LongShort longShort, ZonedDateTime expiry, CurrencyPair currencyPair, PutCall putCall, double strike, double baseNotional, LocalDate paymentDate)
FxVanillaOption using currency pair, option expiry, call/put flag, strike, base
currency notional, and underlying payment date.longShort - the long/short flag of the optionexpiry - the option expirycurrencyPair - the FX currency pairputCall - the put/call flag of the optionstrike - the FX strikebaseNotional - the base currency notional amount: should always be positivepaymentDate - the payment date of the underlying FX cash flowspublic CurrencyPair getCurrencyPair()
This currency pair is conventional, thus indifferent to the direction of FX.
getCurrencyPair in interface FxProductpublic ZonedDateTime getExpiry()
The option expires at this date and time.
The result is returned by combining the expiry date, time and time-zone.
getExpiry in interface FxOptionProductpublic ResolvedFxVanillaOption resolve(ReferenceData refData)
resolve in interface Resolvable<ResolvedFxVanillaOption>public static FxVanillaOption.Meta meta()
FxVanillaOption.public static FxVanillaOption.Builder builder()
public FxVanillaOption.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic LongShort getLongShort()
At expiry, the long party will have the option to enter in this transaction; the short party will, at the option of the long party, potentially enter into the inverse transaction.
public LocalDate getExpiryDate()
The option is European, and can only be exercised on the expiry date.
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 FxSingle getUnderlying()
At expiry, if the option is in the money, this foreign exchange will occur.
public FxVanillaOption.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.