Package org.jquantlib.testsuite.util

Examples of org.jquantlib.testsuite.util.Flag.lower()


      vars.termStructure.addObserver(f);

      for (int i=0; i<vars.deposits+vars.swaps; i++) {
          /*@Time*/ final double testTime = new Actual360().yearFraction(vars.settlement, vars.instruments[i].latestDate());
          /*@DiscountFactor*/ final double discount = vars.termStructure.discount(testTime);
          f.lower();
          vars.rates[i].setValue(vars.rates[i].value()*1.01);
          if (!f.isUp())
              throw new RuntimeException("Observer was not notified of underlying rate change");
          if (vars.termStructure.discount(testTime,true) == discount)
            throw new RuntimeException("rate change did not trigger recalculation");
View Full Code Here


          if (vars.termStructure.discount(testTime,true) == discount)
            throw new RuntimeException("rate change did not trigger recalculation");
          vars.rates[i].setValue(vars.rates[i].value()/1.01);
      }

      f.lower();
      new Settings().setEvaluationDate(vars.calendar.advance(vars.today, 15, TimeUnit.Days));
      if (!f.isUp())
        throw new RuntimeException("Observer was not notified of date change");
  }
View Full Code Here

          }
      }

      final Flag f = new Flag();
      vars.termStructure.addObserver(f);
      f.lower();

      index.addFixing(vars.today, 0.0425);

      if (!f.isUp())
          throw new RuntimeException("Observer was not notified of rate fixing");
View Full Code Here

      me1.setValue(3.14);
      if (!f.isUp()) {
            fail("Observer was not notified of quote change");
        }

      f.lower();
      final SimpleQuote me2 = new SimpleQuote(0.0);

      h.linkTo(me2);
      if (!f.isUp()) {
            fail("Observer was not notified of quote change");
View Full Code Here

        if (!f.isUp()) {
            fail("Observer was not notified of instrument change");
        }

        s.NPV();
        f.lower();
        final SimpleQuote me2 = new SimpleQuote(0.0);

        h.linkTo(me2);
        if (!f.isUp()) {
            fail("Observer was not notified of instrument change");
View Full Code Here

        h.linkTo(me2);
        if (!f.isUp()) {
            fail("Observer was not notified of instrument change");
        }

        f.lower();
        s.freeze();
        s.NPV();
        me2.setValue(2.71);
        if (f.isUp()) {
            fail("Observer was notified of frozen instrument change");
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.