Package org.jquantlib.time

Examples of org.jquantlib.time.Month


        @Override
        public boolean isBusinessDay(final Date date) {
            final Weekday w = date.weekday();
            final int d = date.dayOfMonth(), dd = date.dayOfYear();
            final Month m = date.month();
            final int y = date.year();
            final int em = easterMonday(y);
            if (isWeekend(w)
                // New Year's Day
                || (d == 1 && m == January)
View Full Code Here


        @Override
        public boolean isBusinessDay(final Date date) {
      final Weekday w = date.weekday();
      final int d = date.dayOfMonth(), dd = date.dayOfYear();
      final Month m = date.month();
      final int y = date.year();
      final int em = easterMonday(y);
      if (isWeekend(w)
      // New Year's Day
          || (d == 1 && m == January)
View Full Code Here

      @Override
        public boolean isBusinessDay(final Date date) {
            final Weekday w = date.weekday();
            final int d = date.dayOfMonth(), dd = date.dayOfYear();
            final Month m = date.month();
            final int y = date.year();
            final int em = easterMonday(y);
            if (isWeekend(w)
                // New Year's Day
                || (d == 1 && m == January)
View Full Code Here

        @Override
        public boolean isBusinessDay(final Date date) {
            final Weekday w = date.weekday();
            final int d = date.dayOfMonth(), dd = date.dayOfYear();
            final Month m = date.month();
            final int y = date.year();
            final int em = easterMonday(y);
            if (isWeekend(w)
                // New Year's Day
                || (d == 1 && m == January)
View Full Code Here

    @Override
    public boolean isBusinessDay(final Date date) {
          final Weekday w = date.weekday();
          final int d = date.dayOfMonth();
          final int dd = date.dayOfYear();
          final Month m = date.month();
          final int y = date.year();
          final int em = easterMonday(y);
          if (isWeekend(w)
              // New Year's Day
              || (d == 1 && m == January)
View Full Code Here

    @Override
    public boolean isBusinessDay(final Date date) {
          final Weekday w = date.weekday();
          final int d = date.dayOfMonth(), dd = date.dayOfYear();
          final Month m = date.month();
          final int y = date.year();
          final int em = easterMonday(y);
          if (isWeekend(w)
              // Holy Thursday
              || (dd == em-4)
View Full Code Here

    //! utility function giving the inflation period for a given date  
    public static Pair<Date,Date> inflationPeriod(final Date date,
                         final Frequency frequency) {
     
        Month month = date.month();
        int year = date.year();

        Month startMonth, endMonth;
        switch (frequency) {
          case Annual:
            startMonth = Month.January;
            endMonth = Month.December;
            break;
          case Semiannual:          
            startMonth = Month.valueOf(6*(month.value()-1)/6 + 1);
            endMonth = Month.valueOf(startMonth.value() + 5);
            break;
          case Quarterly:
            startMonth = Month.valueOf(3*(month.value()-1)/3 + 1);
            endMonth = Month.valueOf(startMonth.value() + 2);
            break;
          case Monthly:
            startMonth = endMonth = month;
            break;
          default:
View Full Code Here

TOP

Related Classes of org.jquantlib.time.Month

Copyright © 2018 www.massapicom. 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.