Class LogMoneynessStrike

  • All Implemented Interfaces:
    Strike, java.io.Serializable, Bean, ImmutableBean

    public final class LogMoneynessStrike
    extends java.lang.Object
    implements Strike, ImmutableBean, java.io.Serializable
    A strike based on log-moneyness.

    The log-moneyness is defined as ln(strike/forward). The strike value and forward value should strictly positive.

    See Also:
    Serialized Form
    • Method Detail

      • of

        public static LogMoneynessStrike of​(double logMoneyness)
        Obtains an instance of LogMoneyness with the value of log-moneyness.
        Parameters:
        logMoneyness - the value of log-moneyness
        Returns:
        the instance
      • ofStrikeAndForward

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

        The log-moneyness is defined as ln(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 Strike 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 LogMoneynessStrike.Meta meta()
        The meta-bean for LogMoneynessStrike.
        Returns:
        the meta-bean, not null
      • getValue

        public double getValue()
        Gets the value of log-moneyness.
        Specified by:
        getValue in interface Strike
        Returns:
        the value of the property
      • 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