Examples of yield()


Examples of edu.stanford.nlp.trees.Tree.yield()

      }
    }

    for (int tNum = 0, ttSize = testTreebank.size(); tNum < ttSize; tNum++) {
      Tree tree = testTreebank.get(tNum);
      int testTreeLen = tree.yield().size();
      if (testTreeLen > op.testOptions.maxLength) {
        continue;
      }
      Tree binaryTree = binaryTestTrees.get(tNum);
      // countByLength[testTreeLen]++;
View Full Code Here

Examples of edu.stanford.nlp.trees.Tree.yield()

        //System.err.println(op.testOptions.forceTags);
        if (op.testOptions.forceTags) {
          if (tagger != null) {
            //System.out.println("Using a tagger to set tags");
            //System.out.println("Tagged sentence as: " + tagger.processSentence(cutLast(wordify(binaryTree.yield()))).toString(false));
            parser.parse(addLast(tagger.apply(cutLast(wordify(binaryTree.yield())))));
          } else {
            //System.out.println("Forcing tags to match input.");
            parser.parse(cleanTags(binaryTree.taggedYield(), tlp));
          }
        } else {
View Full Code Here

Examples of org.jquantlib.instruments.FixedRateBond.yield()

                      sch,
                  new double[] { coupons[k] }, bondDayCount, paymentConvention, redemption, issue);

              for (int m = 0; m < (yields).length; m++) {
                final double price = bond.cleanPrice(yields[m], bondDayCount, compounding[n], frequencies[l]);
                final double calculated = bond.yield(
                        price,
                        bondDayCount,
                        compounding[n],
                        frequencies[l],
                        new Date(),
View Full Code Here

Examples of org.jquantlib.instruments.FixedRateBond.yield()

                  + "\n    expected:    " + price
                  + "\n    calculated': " + calculatedPrice
                  + "\n    error':      " + (price-calculatedPrice));
            }

            final double calculatedYield = bond.yield(
                bondDayCount, Compounding.Continuous, frequency,
                tolerance, maxEvaluations);
            if (Math.abs(yield-calculatedYield) > tolerance) {
                            fail(
                  "yield calculation failed:"
View Full Code Here

Examples of org.jquantlib.instruments.FixedRateBond.yield()

                     + "\n    expected:   " + cachedPrice2b
                     + "\n    tolerance:  " + tolerance
                     + "\n    error:      " + (price-cachedPrice2b));
      }

      yield = bond2.yield(marketPrice2, bondDayCount, Compounding.Compounded, freq);
      if (Math.abs(yield-cachedYield2a) > tolerance) {
        fail("failed to reproduce cached compounded yield:"
                     + "\n    calculated: " + yield
                     + "\n    expected:   " + cachedYield2a
                     + "\n    tolerance:  " + tolerance
View Full Code Here

Examples of org.jquantlib.instruments.FixedRateBond.yield()

                     + "\n    expected:   " + cachedYield2a
                     + "\n    tolerance:  " + tolerance
                     + "\n    error:      " + (yield-cachedYield2a));
      }

      yield = bond2.yield(marketPrice2, bondDayCount, Compounding.Continuous, freq);
      if (Math.abs(yield-cachedYield2b) > tolerance) {
        fail("failed to reproduce cached continuous yield:"
                     + "\n    calculated: " + yield
                     + "\n    expected:   " + cachedYield2b
                     + "\n    tolerance:  " + tolerance
View Full Code Here

Examples of org.jquantlib.instruments.FixedRateBond.yield()

                     + "\n    expected:   " + cachedYield2b
                     + "\n    tolerance:  " + tolerance
                     + "\n    error:      " + (yield-cachedYield2b));
      }

      yield = bond2.yield(bondDayCount, Compounding.Continuous, freq);
      if (Math.abs(yield-cachedYield2c) > tolerance) {
        fail("failed to reproduce cached continuous yield:"
                     + "\n    calculated: " + yield
                     + "\n    expected:   " + cachedYield2c
                     + "\n    tolerance:  " + tolerance
View Full Code Here

Examples of org.jquantlib.instruments.bonds.FixedRateBond.yield()

          + " " + fixedRateBond.nextCoupon()
          + " " + floatingRateBond.nextCoupon()
            );
        System.out.println( "Yield           "
          + " " + zeroCouponBond.yield(new Actual360(),Compounding.Compounded, Frequency.Annual)
          + " " + fixedRateBond.yield(new Actual360(),Compounding.Compounded, Frequency.Annual)
          + " " + floatingRateBond.yield(new Actual360(),Compounding.Compounded, Frequency.Annual)
            );

         // Other computations
        System.out.println("Sample indirect computations (for the floating rate bond): " );
View Full Code Here

Examples of org.jquantlib.instruments.bonds.FixedRateBond.yield()

                      sch,
                  new double[] { coupons[k] }, bondDayCount, paymentConvention, redemption, issue);

              for (int m = 0; m < (yields).length; m++) {
                final double price = bond.cleanPrice(yields[m], bondDayCount, compounding[n], frequencies[l]);
                final double calculated = bond.yield(
                        price,
                        bondDayCount,
                        compounding[n],
                        frequencies[l],
                        new Date(),
View Full Code Here

Examples of org.jquantlib.instruments.bonds.FixedRateBond.yield()

                  + "\n    expected:    " + price
                  + "\n    calculated': " + calculatedPrice
                  + "\n    error':      " + (price-calculatedPrice));
            }

            final double calculatedYield = bond.yield(
                bondDayCount, Compounding.Continuous, frequency,
                tolerance, maxEvaluations);
            if (Math.abs(yield-calculatedYield) > tolerance) {
                            fail(
                  "yield calculation failed:"
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.