docs: @Override
  	public RandomVariableInterface getValue(double evaluationTime, LIBORModelMonteCarloSimulationInterface model) throws CalculationException {
  		RandomVariableInterface value = swaption.getValue(evaluationTime, model);
  
  		if(valueUnit == ValueUnit.VALUE) {
  			return value;
  		}
  
  		ForwardCurveInterface forwardCurve	 = model.getModel().getForwardRateCurve();
  		DiscountCurveInterface discountCurve = model.getModel().getAnalyticModel() != null ? model.getModel().getAnalyticModel().getDiscountCurve(forwardCurve.getDiscountCurveName()) : null;
  
  		double parSwaprate = Swap.getForwardSwapRate(new RegularSchedule(tenor), new RegularSchedule(tenor), forwardCurve, model.getModel().getAnalyticModel());
  		double optionMaturity = tenor.getTime(0);
  		double strikeSwaprate = swaprate;
  		double swapAnnuity = discountCurve != null ? SwapAnnuity.getSwapAnnuity(tenor, discountCurve) : SwapAnnuity.getSwapAnnuity(tenor, forwardCurve);
  
  		if(valueUnit == ValueUnit.VOLATILITY || valueUnit == ValueUnit.VOLATILITYLOGNORMAL) {
  			double volatility = AnalyticFormulas.blackScholesOptionImpliedVolatility(parSwaprate, optionMaturity, strikeSwaprate, swapAnnuity, value.getAverage());
  			return model.getRandomVariableForConstant(volatility);
  		}
  		else if(valueUnit == ValueUnit.VOLATILITYNORMAL) {
  			double volatility = AnalyticFormulas.bachelierOptionImpliedVolatility(parSwaprate, optionMaturity, strikeSwaprate, swapAnnuity, value.getAverage());
  			return model.getRandomVariableForConstant(volatility);
  		}
  		else if(valueUnit == ValueUnit.INTEGRATEDVARIANCE  || valueUnit == ValueUnit.INTEGRATEDLOGNORMALVARIANCE) {
  			double volatility = AnalyticFormulas.blackScholesOptionImpliedVolatility(parSwaprate, optionMaturity, strikeSwaprate, swapAnnuity, value.getAverage());
  			return model.getRandomVariableForConstant(volatility * volatility * optionMaturity);
  		}
  		else if(valueUnit == ValueUnit.INTEGRATEDNORMALVARIANCE) {
  			double volatility = AnalyticFormulas.bachelierOptionImpliedVolatility(parSwaprate, optionMaturity, strikeSwaprate, swapAnnuity, value.getAverage());
  			return model.getRandomVariableForConstant(volatility * volatility * optionMaturity);
  		}
  		else {
  			throw new UnsupportedOperationException("Provided valueUnit not implemented.");
  		}
  	}