Examples of weekday()


Examples of org.jquantlib.time.Date.weekday()

            final Date immDate = IMM.nextDate(counter, false);

            // check that imm is greater than counter
            if (immDate.le(counter)) {
                fail("\n  " + immDate.weekday() + " " + immDate + " is not greater than " + counter.weekday() + " " + counter);
            }

            // check that imm is an IMM date
            if (!IMM.isIMMdate(immDate, false)) {
                fail("\n  " + immDate.weekday() + " " + immDate + " is not an IMM date (calculated from " + counter.weekday() + " " + counter + ")");
View Full Code Here

Examples of org.jquantlib.time.Date.weekday()

                fail("\n  " + immDate.weekday() + " " + immDate + " is not greater than " + counter.weekday() + " " + counter);
            }

            // check that imm is an IMM date
            if (!IMM.isIMMdate(immDate, false)) {
                fail("\n  " + immDate.weekday() + " " + immDate + " is not an IMM date (calculated from " + counter.weekday() + " " + counter + ")");
            }

            // check that imm is <= to the next IMM date in the main cycle
            if (immDate.gt(IMM.nextDate(counter, true))) {
                fail("\n  " + immDate.weekday() + " " + immDate + " is not less than or equal to the next future in the main cycle " + IMM.nextDate(counter, true));
View Full Code Here

Examples of org.jquantlib.time.Date.weekday()

                fail("\n  " + immDate.weekday() + " " + immDate + " is not an IMM date (calculated from " + counter.weekday() + " " + counter + ")");
            }

            // check that imm is <= to the next IMM date in the main cycle
            if (immDate.gt(IMM.nextDate(counter, true))) {
                fail("\n  " + immDate.weekday() + " " + immDate + " is not less than or equal to the next future in the main cycle " + IMM.nextDate(counter, true));
            }

            //
            // COMMENTED AT SOURCE QuantLib 0.8.1
            //
View Full Code Here

Examples of org.jquantlib.time.Date.weekday()

        System.out.println("The month of today's date is = "+month);
        System.out.println("The integer equivalent of this month as obtained from the date is = "+integerEquivalentOfMonth);
        System.out.println("The integer equivalent of the date as obtained from the Month is also = "+month.value());

        //Get the weekday
        final Weekday weekDayOfThisDate = today.weekday();
        System.out.println("The weekday of this date is = "+weekDayOfThisDate);

        //Get the day of the date for it's month
        System.out.println("The day of the date as a day in this date's month(1-31) is = "+today.dayOfMonth());
View Full Code Here

Examples of org.jquantlib.time.Date.weekday()

        final int settlementDays = 3;

        final Date todaysDate = calendar.advance(settlementDate, -fixingDays, TimeUnit.Days);
        new Settings().setEvaluationDate(todaysDate);

        QL.info("Evaluation date: " + todaysDate.weekday() + ", " + todaysDate);
        QL.info("Settlement date: " + settlementDate.weekday() + ", " + settlementDate);

        // Building of the bonds discounting yield curve

        /*********************
 
View Full Code Here

Examples of org.jquantlib.time.Date.weekday()

        final int fixingDays = euribor3m.currentLink().fixingDays();
        final Date settlementDate = calendar.advance(todaysDate, fixingDays, TimeUnit.Months );

        System.out.println("Today: "+ todaysDate.weekday() + "," + todaysDate);

        System.out.println("Settlement date: " + settlementDate.weekday() + "," + settlementDate);

        // 3 month term FRA quotes (index refers to monthsToStart)
        final double threeMonthFraQuote [] = new double[10];
        threeMonthFraQuote[1]=0.030;
        threeMonthFraQuote[2]=0.031;
View Full Code Here

Examples of org.jquantlib.time.Date.weekday()

            final Date immDate = IMM.nextDate(counter, false);

            // check that imm is greater than counter
            if (immDate.le(counter)) {
                fail("\n  " + immDate.weekday() + " " + immDate + " is not greater than " + counter.weekday() + " " + counter);
            }

            // check that imm is an IMM date
            if (!IMM.isIMMdate(immDate, false)) {
                fail("\n  " + immDate.weekday() + " " + immDate + " is not an IMM date (calculated from " + counter.weekday() + " " + counter + ")");
View Full Code Here

Examples of org.jquantlib.time.Date.weekday()

                fail("\n  " + immDate.weekday() + " " + immDate + " is not greater than " + counter.weekday() + " " + counter);
            }

            // check that imm is an IMM date
            if (!IMM.isIMMdate(immDate, false)) {
                fail("\n  " + immDate.weekday() + " " + immDate + " is not an IMM date (calculated from " + counter.weekday() + " " + counter + ")");
            }

            // check that imm is <= to the next IMM date in the main cycle
            if (immDate.gt(IMM.nextDate(counter, true))) {
                fail("\n  " + immDate.weekday() + " " + immDate + " is not less than or equal to the next future in the main cycle " + IMM.nextDate(counter, true));
View Full Code Here

Examples of org.jquantlib.time.Date.weekday()

                fail("\n  " + immDate.weekday() + " " + immDate + " is not an IMM date (calculated from " + counter.weekday() + " " + counter + ")");
            }

            // check that imm is <= to the next IMM date in the main cycle
            if (immDate.gt(IMM.nextDate(counter, true))) {
                fail("\n  " + immDate.weekday() + " " + immDate + " is not less than or equal to the next future in the main cycle " + IMM.nextDate(counter, true));
            }

            //
            // COMMENTED AT SOURCE QuantLib 0.8.1
            //
View Full Code Here

Examples of org.jquantlib.time.Date.weekday()

                  bmaDayCount);
     
      this.swap.setPricingEngine(new DiscountingSwapEngine(iborIndex.termStructure()));
     
      Date d = calendar.adjust(swap.maturityDate(), BusinessDayConvention.Following);
      Weekday w = d.weekday();
      Date nextWednesday = w.value() >=4 ? d.add(11 - w.value()) :  d.add(4 - w.value());
     
      latestDate = clonedIndex.valueDate(clonedIndex.fixingCalendar().adjust(nextWednesday));
    }
   
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.