Class FxVanillaOption

    • 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.

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

        public java.time.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.

        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
      • 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 java.time.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 java.time.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 java.time.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
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object