Package com.opengamma.analytics.financial.model.interestrate.definition

Examples of com.opengamma.analytics.financial.model.interestrate.definition.G2ppPiecewiseConstantDataBundle


   * Sets the G2++ curve bundle using the Hull-White parameters and a given set of curves.
   * @param curves The curves.
   */
  @Override
  public void setCurves(final YieldCurveBundle curves) {
    _g2Bundle = new G2ppPiecewiseConstantDataBundle(_g2Parameters, curves);
  }
View Full Code Here


    final G2ppPiecewiseConstantParameters parametersCst = TestsDataSetG2pp.createG2ppCstParameters();
    final YieldAndDiscountCurve curve5 = YieldCurve.from(ConstantDoublesCurve.from(0.05));
    final YieldCurveBundle curves = new YieldCurveBundle();
    curves.setCurve(FUNDING_CURVE_NAME, curve5);
    curves.setCurve(FORWARD_CURVE_NAME, curve5);
    final G2ppPiecewiseConstantDataBundle bundleCst = new G2ppPiecewiseConstantDataBundle(parametersCst, curves);
    final CurrencyAmount pv = METHOD_G2PP_APPROXIMATION.presentValue(SWAPTION_PAYER_LONG, bundleCst);
    final double pvExternal = 6885626.28245924; // ! TimeCalculator with ACT/365
    assertEquals("Swaption physical - G2++ - present value - external system", pvExternal, pv.getAmount(), 1E-2);
  }
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.financial.model.interestrate.definition.G2ppPiecewiseConstantDataBundle

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.