Class ResolvedFxVanillaOption
- java.lang.Object
-
- com.opengamma.strata.product.fxopt.ResolvedFxVanillaOption
-
- All Implemented Interfaces:
ResolvedProduct
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class ResolvedFxVanillaOption extends Object implements ResolvedProduct, org.joda.beans.ImmutableBean, Serializable
A vanilla FX option, resolved for pricing.This is the resolved form of
FxVanillaOption
and is an input to the pricers. Applications will typically create aResolvedFxVanillaOption
from aFxVanillaOption
usingFxVanillaOption.resolve(ReferenceData)
.A
ResolvedFxVanillaOption
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.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ResolvedFxVanillaOption.Builder
The bean-builder forResolvedFxVanillaOption
.static class
ResolvedFxVanillaOption.Meta
The meta-bean forResolvedFxVanillaOption
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ResolvedFxVanillaOption.Builder
builder()
Returns a builder used to create an instance of the bean.boolean
equals(Object obj)
Currency
getCounterCurrency()
Get the counter currency of the underlying FX transaction.CurrencyPair
getCurrencyPair()
Gets currency pair of the base currency and counter currency.ZonedDateTime
getExpiry()
Gets the expiry date-time of the option.LocalDate
getExpiryDate()
Gets the expiry date of the option.LongShort
getLongShort()
Gets whether the option is long or short.PutCall
getPutCall()
Returns the put/call flag.double
getStrike()
Gets the strike rate.ResolvedFxSingle
getUnderlying()
Gets the underlying foreign exchange transaction.int
hashCode()
static ResolvedFxVanillaOption.Meta
meta()
The meta-bean forResolvedFxVanillaOption
.ResolvedFxVanillaOption.Meta
metaBean()
ResolvedFxVanillaOption.Builder
toBuilder()
Returns a builder that allows this bean to be mutated.String
toString()
-
-
-
Method Detail
-
getCurrencyPair
public CurrencyPair getCurrencyPair()
Gets currency pair of the base currency and counter currency.This currency pair is conventional, thus indifferent to the direction of FX.
- Returns:
- the currency pair
-
getExpiryDate
public LocalDate getExpiryDate()
Gets the expiry date of the option.- Returns:
- the expiry date
-
getStrike
public double getStrike()
Gets the strike rate.- Returns:
- the strike
-
getPutCall
public PutCall getPutCall()
Returns the put/call flag.This is the put/call for the base currency. If the amount for the base currency is positive, the option is a call on the base currency (put on counter currency). If the amount for the base currency is negative, the option is a put on the base currency (call on counter currency).
- Returns:
- the put or call
-
getCounterCurrency
public Currency getCounterCurrency()
Get the counter currency of the underlying FX transaction.- Returns:
- the counter currency
-
meta
public static ResolvedFxVanillaOption.Meta meta()
The meta-bean forResolvedFxVanillaOption
.- Returns:
- the meta-bean, not null
-
builder
public static ResolvedFxVanillaOption.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public ResolvedFxVanillaOption.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getLongShort
public LongShort getLongShort()
Gets whether the option is long or short.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.
- Returns:
- the value of the property, not null
-
getExpiry
public ZonedDateTime getExpiry()
Gets the expiry date-time of the option.The option is European, and can only be exercised on the expiry date.
- Returns:
- the value of the property, not null
-
getUnderlying
public ResolvedFxSingle getUnderlying()
Gets the underlying foreign exchange transaction.At expiry, if the option is in the money, this foreign exchange will occur. A call option permits the transaction as specified to occur. A put option permits the inverse transaction to occur.
- Returns:
- the value of the property, not null
-
toBuilder
public ResolvedFxVanillaOption.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-