Examples of cashflows()


Examples of org.jquantlib.instruments.bonds.FloatingRateBond.cashflows()

                         volatility,
                         new Actual365Fixed()));
       
         // Coupon pricers
         final IborCouponPricer pricer = new BlackIborCouponPricer(vol);
         PricerSetter.setCouponPricer(floatingRateBond.cashflows(),pricer);
       
         // Yield curve bootstrapping
         forecastingTermStructure.linkTo(depoSwapTermStructure);
         discountingTermStructure.linkTo(bondDiscountingTermStructur);
       
View Full Code Here

Examples of org.jquantlib.instruments.bonds.FloatingRateBond.cashflows()

                             100.0, new Date(30,Month.November,2004));

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

      PricerSetter.setCouponPricer(bond1.cashflows(),pricer);

      final boolean indexedCoupon = new Settings().isUseIndexedCoupon();
     
      final double cachedPrice1 = indexedCoupon ? 99.874645 : 99.874646;
View Full Code Here

Examples of org.jquantlib.instruments.bonds.FloatingRateBond.cashflows()

                             100.0, new Date(30,Month.November,2004));

      final PricingEngine bondEngine2 = new DiscountingBondEngine(discountCurve);
      bond2.setPricingEngine(bondEngine2);

      PricerSetter.setCouponPricer(bond2.cashflows(),pricer);

        final double cachedPrice2 = indexedCoupon ? 97.955904 : 97.955904; // yes, they are the same, according to QuantLib/C++

      price = bond2.cleanPrice();
      if (Math.abs(price-cachedPrice2) > tolerance) {
View Full Code Here

Examples of org.jquantlib.instruments.bonds.FloatingRateBond.cashflows()

                             false,
                             100.0, new Date(30,Month.November,2004));

      bond3.setPricingEngine(bondEngine2);

      PricerSetter.setCouponPricer(bond3.cashflows(),pricer);

        final double cachedPrice3 = indexedCoupon ? 98.495458 : 98.495459;
       
      price = bond3.cleanPrice();
      if (Math.abs(price-cachedPrice3) > tolerance) {
View Full Code Here

Examples of org.jquantlib.instruments.bonds.FloatingRateBond.cashflows()

        BusinessDayConvention.Following, fixingDays, gearings,
        spreadsArr, new Array(0), new Array(0), false, vars.redemption,
        vars.issueDate);

    floating.setPricingEngine(bondEngine);
    PricerSetter.setCouponPricer(floating.cashflows(), pricer);

    tolerance = 2.0e-2 * (vars.faceAmount / 100.0);

    error = Math.abs(euFloating.NPV() - floating.settlementValue());
    if (error > tolerance) {
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.