Class 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 a ResolvedFxVanillaOption from a FxVanillaOption using FxVanillaOption.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
    • 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
      • builder

        public static ResolvedFxVanillaOption.Builder builder()
        Returns a builder used to create an instance of the bean.
        Returns:
        the builder, not null
      • 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object