private void addForward ( AnalyticModel model , double fixingTime , RandomVariable forward , boolean isParameter ) { double interpolationEntitiyTime ; RandomVariable interpolationEntityForwardValue ; switch ( interpolationEntityForward ) { case FORWARD : default : interpolationEntitiyTime = fixingTime ; interpolationEntityForwardValue = forward ; break ; case FORWARD_TIMES_DISCOUNTFACTOR : interpolationEntitiyTime = fixingTime ; interpolationEntityForwardValue = forward . mult ( model . getDiscountCurve ( getDiscountCurveName ( ) ) . getValue ( model , fixingTime + getPaymentOffset ( fixingTime ) ) ) ; break ; case ZERO : { double paymentOffset = getPaymentOffset ( fixingTime ) ; interpolationEntitiyTime = fixingTime + paymentOffset ; interpolationEntityForwardValue = forward . mult ( paymentOffset ) . add ( 1.0 ) . log ( ) . div ( paymentOffset ) ; break ; } case DISCOUNTFACTOR : { double paymentOffset = getPaymentOffset ( fixingTime ) ; interpolationEntitiyTime = fixingTime + paymentOffset ; interpolationEntityForwardValue = getValue ( fixingTime ) . div ( forward . mult ( paymentOffset ) . add ( 1.0 ) ) ; break ; } } super . addPoint ( interpolationEntitiyTime , interpolationEntityForwardValue , isParameter ) ; }
Add a forward to this curve .