code: public double getYield(double bondPrice, AnalyticModel model) {
  		GoldenSectionSearch search = new GoldenSectionSearch(-2.0, 2.0);
  		while(search.getAccuracy() > 1E-11 && !search.isDone()) {
  			double x = search.getNextPoint();
  			double fx=getValueWithGivenYield(0.0,x,model);
  			double y = (bondPrice-fx)*(bondPrice-fx);
  
  			search.setValue(y);
  		}
  		return search.getBestPoint();
  	}
docs: Returns the yield value such that the sum of cash flows of the bond discounted with the yield curve
  coincides with a given price.
  
  @param bondPrice The target price as double.
  @param model The model under which the product is valued.
  @return The optimal yield value.