Class BlackFxOptionFlatVolatilities

    • Method Detail

      • findData

        public <T> java.util.Optional<T> findData​(MarketDataName<T> name)
        Description copied from interface: MarketDataView
        Finds the market data with the specified name.

        This is most commonly used to find an underlying curve or surface by name. If the market data cannot be found, empty is returned.

        Specified by:
        findData in interface MarketDataView
        Type Parameters:
        T - the type of the market data value
        Parameters:
        name - the name to find
        Returns:
        the market data value, empty if not found
      • getParameterCount

        public int getParameterCount()
        Description copied from interface: ParameterizedData
        Gets the number of parameters.

        This returns the number of parameters, which can be used to create a loop to access the other methods on this interface.

        Specified by:
        getParameterCount in interface ParameterizedData
        Returns:
        the number of parameters
      • getParameter

        public double getParameter​(int parameterIndex)
        Description copied from interface: ParameterizedData
        Gets the value of the parameter at the specified index.
        Specified by:
        getParameter in interface ParameterizedData
        Parameters:
        parameterIndex - the zero-based index of the parameter to get
        Returns:
        the value of the parameter
      • getParameterMetadata

        public ParameterMetadata getParameterMetadata​(int parameterIndex)
        Description copied from interface: ParameterizedData
        Gets the metadata of the parameter at the specified index.

        If there is no specific parameter metadata, an empty instance will be returned.

        Specified by:
        getParameterMetadata in interface ParameterizedData
        Parameters:
        parameterIndex - the zero-based index of the parameter to get
        Returns:
        the metadata of the parameter
      • relativeTime

        public double relativeTime​(java.time.ZonedDateTime dateTime)
        Description copied from interface: FxOptionVolatilities
        Converts a time and date to a relative year fraction.

        When the date is after the valuation date (and potentially time), the returned number is negative.

        Specified by:
        relativeTime in interface FxOptionVolatilities
        Parameters:
        dateTime - the date-time to find the relative year fraction of
        Returns:
        the relative year fraction
      • getValuationDateTime

        public java.time.ZonedDateTime getValuationDateTime()
        Gets the valuation date-time. All data items in this provider is calibrated for this date-time.
        Specified by:
        getValuationDateTime in interface FxOptionVolatilities
        Returns:
        the value of the property, not null
      • getCurve

        public Curve getCurve()
        Gets the Black volatility curve.

        The x-values represent the expiry year-fraction. The metadata of the curve must define a day count.

        Returns:
        the value of the property, 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