Class MoneynessStrike

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

    public final class MoneynessStrike
    extends Object
    implements Strike, org.joda.beans.ImmutableBean, Serializable
    A strike based on moneyness.

    The moneyness is defined as strike/forward. The strike should be nonnegative and the forward should be strictly positive.

    See Also:
    Serialized Form
    • Method Detail

      • of

        public static MoneynessStrike of​(double moneyness)
        Obtains an instance of Moneyness with the value of moneyness.
        Parameters:
        moneyness - the value of moneyness, not negative
        Returns:
        the instance
      • ofStrikeAndForward

        public static MoneynessStrike ofStrikeAndForward​(double strike,
                                                         double forward)
        Obtains an instance of Moneyness from the strike and forward.

        The moneyness is defined as strike/forward.

        Parameters:
        strike - the strike, not negative
        forward - the forward, not negative
        Returns:
        the instance
      • getType

        public StrikeType getType()
        Description copied from interface: Strike
        Gets the type of the strike.
        Specified by:
        getType in interface Strike
        Returns:
        the strike type
      • withValue

        public MoneynessStrike withValue​(double value)
        Description copied from interface: Strike
        Creates an new instance of the same strike type with value.
        Specified by:
        withValue in interface Strike
        Parameters:
        value - the new value
        Returns:
        the new strike instance
      • meta

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

        public MoneynessStrike.Meta metaBean()
        Specified by:
        metaBean in interface org.joda.beans.Bean
      • getValue

        public double getValue()
        Gets the value of moneyness.
        Specified by:
        getValue in interface Strike
        Returns:
        the value of the property
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object