public double [ ] getMoneynessAsOffsets ( ) { DoubleStream moneyness = getGridNodesPerMoneyness ( ) . keySet ( ) . stream ( ) . mapToDouble ( Integer :: doubleValue ) ; if ( quotingConvention == QuotingConvention . PAYERVOLATILITYLOGNORMAL ) { moneyness = moneyness . map ( new DoubleUnaryOperator ( ) { @ Override public double applyAsDouble ( double x ) { return x * 0.01 ; } } ) ; } else if ( quotingConvention == QuotingConvention . RECEIVERPRICE ) { moneyness = moneyness . map ( new DoubleUnaryOperator ( ) { @ Override public double applyAsDouble ( double x ) { return - x * 0.0001 ; } } ) ; } else { moneyness = moneyness . map ( new DoubleUnaryOperator ( ) { @ Override public double applyAsDouble ( double x ) { return x * 0.0001 ; } } ) ; } return moneyness . toArray ( ) ; }
Return all levels of moneyness for which data exists . Moneyness is returned as actual difference strike - par swap rate .