Package org.jquantlib.pricingengines.bond

Examples of org.jquantlib.pricingengines.bond.DiscountingBondEngine


                  settlementDays, faceAmount, sch,
              new double[] { coupon },
              bondDayCount, paymentConvention,
              redemption, issue);

          final PricingEngine bondEngine = new DiscountingBondEngine(discountCurve);
          bond.setPricingEngine(bondEngine);

          for (final double yield : yields) {

            rate.setValue(yield);
View Full Code Here


      final FixedRateBond bond1 = new FixedRateBond(settlementDays, faceAmount, sch1,
                          new double[] {0.025},
                          bondDayCount, BusinessDayConvention.ModifiedFollowing,
                          100.0, new Date(1, Month.November, 2004));

    final PricingEngine bondEngine = new DiscountingBondEngine(discountCurve);

      bond1.setPricingEngine(bondEngine);

      final double marketPrice1 = 99.203125;
      final double marketYield1 = 0.02925;
View Full Code Here

                           faceAmount,
                           new Date(30,Month.November,2008),
                           BusinessDayConvention.ModifiedFollowing,
                           100.0, new Date(30,Month.November,2004));

    final PricingEngine bondEngine = new DiscountingBondEngine(discountCurve);
      bond1.setPricingEngine(bondEngine);

      final double cachedPrice1 = 88.551726;

      double price = bond1.getCleanPrice();
View Full Code Here

                          new double [] { 0.02875 },
                          new ActualActual(ActualActual.Convention.ISMA),
                          BusinessDayConvention.ModifiedFollowing,
                          100.0, new Date(30,Month.November,2004));

      final PricingEngine bondEngine = new DiscountingBondEngine(discountCurve);
      bond1.setPricingEngine(bondEngine);

      final double cachedPrice1 = 99.298100;

      double price = bond1.getCleanPrice();
View Full Code Here

        if (engine==null)
            throw new LibraryException("null pricing engine"); //// TODO: message
        //FIXME: DiscontingBondEngine
        QL.require(DiscountingBondEngine.class.isAssignableFrom(engine.getClass()), ReflectConstants.WRONG_ARGUMENT_TYPE); // QA:[RG]::verified
        final DiscountingBondEngine discountingBondEngine = (DiscountingBondEngine)engine;

        return dirtyPriceFromZSpreadFunction(notional(settlement), cashflows_,
                zSpread, dc, comp, freq,
                settlement,
                discountingBondEngine.discountCurve());
    }
View Full Code Here

       
         // Common data
         final double faceAmount = 100;
       
         // Pricing engine
        final PricingEngine  bondEngine = new DiscountingBondEngine(discountingTermStructure);
       
         // Zero coupon bond
         final ZeroCouponBond zeroCouponBond = new ZeroCouponBond(
                           settlementDays,
                           new UnitedStates(UnitedStates.Market.GOVERNMENTBOND),
View Full Code Here

        }
        QL.require(engine != null, "null pricing engine");

        //FIXME: DiscontingBondEngine
        QL.require(DiscountingBondEngine.class.isAssignableFrom(engine.getClass()), ReflectConstants.WRONG_ARGUMENT_TYPE); // QA:[RG]::verified
        final DiscountingBondEngine discountingBondEngine = (DiscountingBondEngine)engine;

        return dirtyPriceFromZSpreadFunction(notional(settlement), cashflows_,
                zSpread, dc, comp, freq, settlement,
                discountingBondEngine.discountCurve());
    }
View Full Code Here

        coupons, dayCounter, paymentConvention, redemption, issueDate);
   
    this.latestDate = this.bond.maturityDate();
    new Settings().evaluationDate().addObserver(this);
   
    final PricingEngine bondEngine = new DiscountingBondEngine(this.termStructureHandle);
    this.bond.setPricingEngine(bondEngine);
          
}
View Full Code Here

    QL.validateExperimentalMode()
   
    this.latestDate = bond.maturityDate();
    new Settings().evaluationDate().addObserver(this);
   
    final PricingEngine bondEngine = new DiscountingBondEngine(this.termStructureHandle);
    this.bond.setPricingEngine(bondEngine);
     
  }
View Full Code Here

            final FixedRateBond bond = new FixedRateBond(vars.bondSettlementDays, 100.0,
                               vars.schedules[i], coupons,
                               vars.bondDayCounter, vars.bondConvention,
                               vars.bondRedemption, issue);

            final PricingEngine bondEngine = new DiscountingBondEngine(curveHandle);
            bond.setPricingEngine(bondEngine);

            /*@Real*/ final double expectedPrice = bondData[i].price, estimatedPrice = bond.cleanPrice();
            /*@Real*/ final double error = Math.abs(expectedPrice-estimatedPrice);
            if (error > tolerance) {
View Full Code Here

TOP

Related Classes of org.jquantlib.pricingengines.bond.DiscountingBondEngine

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.