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
FxVanillaOptionand is an input to the pricers. Applications will typically create aResolvedFxVanillaOptionfrom aFxVanillaOptionusingFxVanillaOption.resolve(ReferenceData).A
ResolvedFxVanillaOptionis 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 classResolvedFxVanillaOption.BuilderThe bean-builder forResolvedFxVanillaOption.static classResolvedFxVanillaOption.MetaThe meta-bean forResolvedFxVanillaOption.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ResolvedFxVanillaOption.Builderbuilder()Returns a builder used to create an instance of the bean.booleanequals(Object obj)CurrencygetCounterCurrency()Get the counter currency of the underlying FX transaction.CurrencyPairgetCurrencyPair()Gets currency pair of the base currency and counter currency.ZonedDateTimegetExpiry()Gets the expiry date-time of the option.LocalDategetExpiryDate()Gets the expiry date of the option.LongShortgetLongShort()Gets whether the option is long or short.PutCallgetPutCall()Returns the put/call flag.doublegetStrike()Gets the strike rate.ResolvedFxSinglegetUnderlying()Gets the underlying foreign exchange transaction.inthashCode()static ResolvedFxVanillaOption.Metameta()The meta-bean forResolvedFxVanillaOption.ResolvedFxVanillaOption.MetametaBean()ResolvedFxVanillaOption.BuildertoBuilder()Returns a builder that allows this bean to be mutated.StringtoString()
-
-
-
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:
metaBeanin 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
-
-