Package com.opengamma.analytics.financial.model.option.pricing.analytic

Examples of com.opengamma.analytics.financial.model.option.pricing.analytic.BjerksundStenslandModel.price()


    final double pdePrice = pricer.price(s0, k, r, b, t, sigma, isCall, isAmerican, sSteps, tSteps);
    final double endTime = System.nanoTime() / 1e6;
    final double duration = endTime - startTime;


    final double amPrice = amPricer.price(s0, k, r, b, t, sigma, isCall);
    final double relErr = Math.abs(1 - pdePrice / amPrice);
    System.out.println(tSteps + "\t" + sSteps + "\t" + duration + df * fwd + "\t" + amPrice + "\t" + pdePrice + "\t" + relErr);

  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.