Class FxVanillaOption

    • Method Detail

      • of

        public 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.
        Parameters:
        longShort - the long/short flag of the option
        expiry - the option expiry
        currencyPair - the FX currency pair
        putCall - the put/call flag of the option
        strike - the FX strike
        baseNotional - the base currency notional amount: should always be positive
        paymentDate - the payment date of the underlying FX cash flows
        Returns:
        an equivalent fx vanilla option
      • 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.

        Specified by:
        getCurrencyPair in interface FxProduct
        Returns:
        the currency pair
      • getExpiry

        public ZonedDateTime getExpiry()
        Gets the expiry date-time.

        The option expires at this date and time.

        The result is returned by combining the expiry date, time and time-zone.

        Specified by:
        getExpiry in interface FxOptionProduct
        Returns:
        the expiry date and time
      • resolve

        public ResolvedFxVanillaOption resolve​(ReferenceData refData)
        Description copied from interface: Resolvable
        Resolves this object using the specified reference data.

        This converts the object implementing this interface to the equivalent resolved form. All ReferenceDataId identifiers in this instance will be resolved. The resolved form will typically be a type that is optimized for pricing.

        Resolved objects may be 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.

        Specified by:
        resolve in interface Resolvable<ResolvedFxVanillaOption>
        Parameters:
        refData - the reference data to use when resolving
        Returns:
        the resolved instance
      • meta

        public static FxVanillaOption.Meta meta()
        The meta-bean for FxVanillaOption.
        Returns:
        the meta-bean, not null
      • builder

        public static FxVanillaOption.Builder builder()
        Returns a builder used to create an instance of the bean.
        Returns:
        the builder, not null
      • metaBean

        public FxVanillaOption.Meta metaBean()
        Specified by:
        metaBean in interface org.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
      • getExpiryDate

        public LocalDate getExpiryDate()
        Gets the expiry date of the option.

        The option is European, and can only be exercised on the expiry date.

        Returns:
        the value of the property, not null
      • getExpiryTime

        public LocalTime getExpiryTime()
        Gets the expiry time of the option.

        The expiry time is related to the expiry date and time-zone.

        Returns:
        the value of the property, not null
      • getExpiryZone

        public ZoneId getExpiryZone()
        Gets the time-zone of the expiry time.

        The expiry time-zone is related to the expiry date and time.

        Returns:
        the value of the property, not null
      • getUnderlying

        public FxSingle getUnderlying()
        Gets the underlying foreign exchange transaction.

        At expiry, if the option is in the money, this foreign exchange will occur.

        Returns:
        the value of the property, not null
      • toBuilder

        public FxVanillaOption.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