Package com.opengamma.analytics.math.minimization

Examples of com.opengamma.analytics.math.minimization.SingleRangeLimitTransform


  }

  @Test
      (enabled = false)
      public void debugTest2() {
    final ParameterLimitsTransform trans = new SingleRangeLimitTransform(0.0, LimitType.GREATER_THAN);
    ShiftedLogNormalTailExtrapolationFitter fitter = new ShiftedLogNormalTailExtrapolationFitter();
    double f = 1.0;
    double t = 2. / 52.;
    double k = 1.1;

    double mu = 0.133333;
    double theta = 0.16;
    double p = ShiftedLogNormalTailExtrapolation.price(f, k, t, true, mu, theta);
    double dd = ShiftedLogNormalTailExtrapolation.dualDelta(f, k, t, true, mu, theta);
    System.out.println("price and DD " + p + "\t" + dd);
    System.out.println("trans " + trans.inverseTransform(-2.2521684610628063));

    double[] res = fitter.fitPriceAndGrad(f, k, p, dd, t, true);
    assertEquals("mu ", mu, res[0], 1e-8);
    assertEquals("theta", theta, res[1], 1e-8);
  }
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.math.minimization.SingleRangeLimitTransform

Copyright © 2018 www.massapicom. 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.