Package org.jquantlib.util

Examples of org.jquantlib.util.Date.increment()


            return d;

        Date d1 = d;
        if (c == BusinessDayConvention.FOLLOWING || c == BusinessDayConvention.MODIFIED_FOLLOWING) {
            while (isHoliday(d1))
                d1.increment();
            if (c == BusinessDayConvention.MODIFIED_FOLLOWING) {
                if (d1.getMonth() != d.getMonth()) {
                    return adjust(d, BusinessDayConvention.PRECEDING);
                }
            }
View Full Code Here


        if (n == 0) {
            return adjust(d1, c);
        } else if (unit == TimeUnit.DAYS) {
            if (n > 0) {
                while (n > 0) {
                    d1.increment();
                    while (isHoliday(d1))
                        d1.increment();
                    n--;
                }
            } else {
View Full Code Here

        } else if (unit == TimeUnit.DAYS) {
            if (n > 0) {
                while (n > 0) {
                    d1.increment();
                    while (isHoliday(d1))
                        d1.increment();
                    n--;
                }
            } else {
                while (n < 0) {
                    d1.decrement();
View Full Code Here

     */
    public Date nextDate(final String IMMcode,
                       boolean mainCycle,
                       final Date referenceDate)  {
        Date immDate = date(IMMcode, referenceDate);
        return nextDate(immDate.increment(), mainCycle);
    }


    /**
     * Returns next main cycle IMM code from the reference date
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.