Class GenericVolatilitySurfaceYearFractionParameterMetadata

  • All Implemented Interfaces:
    ParameterMetadata, Serializable, org.joda.beans.Bean, org.joda.beans.ImmutableBean

    public final class GenericVolatilitySurfaceYearFractionParameterMetadata
    extends Object
    implements ParameterMetadata, org.joda.beans.ImmutableBean, Serializable
    Surface node metadata for a generic volatility surface node with a specific time to expiry and strike.
    See Also:
    Serialized Form
    • Method Detail

      • of

        public static GenericVolatilitySurfaceYearFractionParameterMetadata of​(double yearFraction,
                                                                               Tenor yearFractionTenor,
                                                                               Strike strike)
        Creates node metadata using year fraction, associated tenor and strike.
        Parameters:
        yearFraction - the year fraction
        yearFractionTenor - the tenor associated with year fraction
        strike - the strike
        Returns:
        node metadata
      • of

        public static GenericVolatilitySurfaceYearFractionParameterMetadata of​(double yearFraction,
                                                                               Tenor yearFractionTenor,
                                                                               Strike strike,
                                                                               String label)
        Creates node using year fraction, associated tenor, strike and label.
        Parameters:
        yearFraction - the year fraction
        yearFractionTenor - the tenor associated with year fraction
        strike - the strike
        label - the label to use
        Returns:
        the metadata
      • getIdentifier

        public Pair<Double,​Strike> getIdentifier()
        Description copied from interface: ParameterMetadata
        Returns an object used to identify the parameter.

        A good choice of identifier is one that makes sense to the user and can easily be created as part of a scenario definition. For example, many nodes types are naturally identified by a tenor.

        The identifier must satisfy the following criteria:

        • It must be non-null
        • It should be unique within a single data set
        • It should have a sensible implementation of hashCode() and equals().
        Otherwise the choice of identifier is free and the system makes no assumptions about it.
        Specified by:
        getIdentifier in interface ParameterMetadata
        Returns:
        an object used to uniquely identify the parameter within the data
      • getYearFraction

        public double getYearFraction()
        Gets the year fraction of the surface node.

        This is the time to expiry that the node on the surface is defined as. There is not necessarily a direct relationship with a date from an underlying instrument.

        Returns:
        the value of the property
      • getYearFractionTenor

        public Optional<Tenor> getYearFractionTenor()
        Gets the tenor associated with the year fraction.
        Returns:
        the optional value of the property, not null
      • getStrike

        public Strike getStrike()
        Gets the strike of the surface node.

        This is the strike that the node on the surface is defined as.

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

        public String getLabel()
        Gets the label that describes the node.
        Specified by:
        getLabel in interface ParameterMetadata
        Returns:
        the value of the property, not empty
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object