Examples of Japan


Examples of org.jquantlib.time.calendars.Japan

    private final Calendar settlement;

    public JapanCalendarTest() {
    QL.info("::::: "+this.getClass().getSimpleName()+" :::::");
      this.settlement = new Japan();
  }
View Full Code Here

Examples of org.jquantlib.time.calendars.Japan

  public JPYLibor(final Period tenor,
      final Handle<YieldTermStructure> h) {
    super("JPYLibor", tenor, 0,
        new JPYCurrency(),
        new Japan(),
        new Actual360(), h);
  }
View Full Code Here

Examples of org.jquantlib.time.calendars.Japan

  public DailyTenorJPYLibor(final int settlementDays,
      final Handle<YieldTermStructure> h) {
    super("JPYLibor", settlementDays,
        new JPYCurrency(),
        new Japan(),
        new Actual360(), h);
  }
View Full Code Here

Examples of org.jquantlib.time.calendars.Japan

  public Tibor(final Period tenor,
      final Handle<YieldTermStructure> h) {
    super("Tibor", tenor, 0,
        new JPYCurrency(),
        new Japan(),
        BusinessDayConvention.ModifiedFollowing,
        false,
        new Actual365Fixed(),
        h);
  }
View Full Code Here

Examples of org.jquantlib.time.calendars.Japan

      final CommonVars vars = new CommonVars();

      vars.today = new Date(4, Month.October, 2007);
      new Settings().setEvaluationDate(vars.today);

      vars.calendar = new Japan();
      vars.settlement = vars.calendar.advance(vars.today,  vars.settlementDays, TimeUnit.Days);

      // market elements
      vars.rates = new SimpleQuote[vars.swaps];
      for (int i=0; i<vars.swaps; i++) {
View Full Code Here

Examples of org.jquantlib.time.calendars.Japan

      System.out.println("Testing joint calendars...");

        Calendar c1 = new Target(),
                 c2 = new UnitedKingdom(),
                 c3 = new UnitedStates(UnitedStates.Market.NYSE),
                 c4 = new Japan();

        Calendar c12h = new JointCalendar(c1,c2,JointCalendarRule.JoinHolidays),
                 c12b = new JointCalendar(c1,c2,JointCalendarRule.JoinBusinessDays),
                 c123h = new JointCalendar(c1,c2,c3,JointCalendarRule.JoinHolidays),
                 c123b = new JointCalendar(c1,c2,c3,JointCalendarRule.JoinBusinessDays),
                 c1234h = new JointCalendar(c1,c2,c3,c4,JointCalendarRule.JoinHolidays),
                 c1234b = new JointCalendar(c1,c2,c3,c4,JointCalendarRule.JoinBusinessDays);

        // test one year, starting today
        Date firstDate = Date.todaysDate(),
             endDate = firstDate.add(new Period(1, TimeUnit.Years));

        for (Date d = firstDate; d.lt(endDate); d.inc()) {

            boolean b1 = c1.isBusinessDay(d),
                 b2 = c2.isBusinessDay(d),
                 b3 = c3.isBusinessDay(d),
                 b4 = c4.isBusinessDay(d);

            if ((b1 && b2) != c12h.isBusinessDay(d))
              Assert.fail("At date " + d + ":\n"
                           + "    inconsistency between joint calendar "
                           + c12h.name() + " (joining holidays)\n"
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.