Documentation of 'org.jfin.date.ScheduleGenerator' Java class
ScheduleGenerator
org.jfin.date

Class ScheduleGenerator



  • public class ScheduleGenerator
    extends java.lang.Object
    Utility class for creating an UNADJUSTED schedule between two dates using a given stub type and frequency.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.util.Calendar copyAndReset(java.util.Calendar calendar)
      Copy a calendar and reset it's time to midnight to avoid problems relating to generating schedules around midnight.
      static java.util.List<Period> generateSchedule(java.util.Calendar startDate, java.util.Calendar endDate, Frequency frequency, StubType stubType)
      Used to generate a List containing an schedule ordered by period dates.
      static java.util.List<Period> generateSchedule(java.util.Calendar startDate, java.util.Calendar endDate, Frequency frequency, StubType stubType, int maxPeriods)
      Used to generate a List containing an schedule ordered by period dates.
      static java.util.List<Period> generateSchedule(java.util.Calendar startDate, java.util.Calendar endDate, Frequency frequency, StubType stubType, Period prototype)
      Used to generate a List containing an schedule ordered by period dates.
      static java.util.List<Period> generateSchedule(java.util.Calendar startDate, java.util.Calendar endDate, Frequency frequency, StubType stubType, Period prototype, int maxPeriods)
      Used to generate a List containing an schedule ordered by period dates.
      static java.util.List<Period> generateSchedule(java.util.Calendar startDate, java.util.Calendar endDate, int frequencyAmount, int frequencyUnit, StubType stubType)
      Used to generate a List containing an schedule ordered by period dates.
      static java.util.List<Period> generateSchedule(java.util.Calendar startDate, java.util.Calendar endDate, int frequencyAmount, int frequencyUnit, StubType stubType, int maxPeriods)
      Used to generate a List containing an schedule ordered by period dates.
      static java.util.List<Period> generateSchedule(java.util.Calendar startDate, java.util.Calendar endDate, int frequencyAmount, int frequencyUnit, StubType stubType, Period prototype)
      Used to generate a List containing an schedule ordered by period dates.
      static java.util.List<Period> generateSchedule(java.util.Calendar startDate, java.util.Calendar endDate, int frequencyAmount, int frequencyUnit, StubType stubType, Period prototype, int maxPeriods)
      Used to generate a List containing an schedule ordered by period dates.
      static java.util.List<Period> generateSchedule(java.util.Calendar startDate, java.lang.String maturityString, Frequency frequency, StubType stubType)
      Used to generate a List containing an schedule ordered by period dates.
      static java.util.List<Period> generateSchedule(java.util.Calendar startDate, java.lang.String maturityString, Frequency frequency, StubType stubType, int maxPeriods)
      Used to generate a List containing an schedule ordered by period dates.
      static java.util.List<Period> generateSchedule(java.util.Calendar startDate, java.lang.String maturityString, Frequency frequency, StubType stubType, Period prototype)
      Used to generate a List containing an schedule ordered by period dates.
      static java.util.List<Period> generateSchedule(java.util.Calendar startDate, java.lang.String maturityString, Frequency frequency, StubType stubType, Period prototype, int maxPeriods)
      Used to generate a List containing an schedule ordered by period dates.
      static java.util.List<Period> generateSchedule(java.util.Calendar startDate, Tenor maturity, Frequency frequency, StubType stubType)
      Used to generate a List containing an schedule ordered by period dates.
      static java.util.List<Period> generateSchedule(java.util.Calendar startDate, Tenor maturity, Frequency frequency, StubType stubType, int maxPeriods)
      Used to generate a List containing an schedule ordered by period dates.
      static java.util.List<Period> generateSchedule(java.util.Calendar startDate, Tenor maturity, Frequency frequency, StubType stubType, Period prototype)
      Used to generate a List containing an schedule ordered by period dates.
      static java.util.List<Period> generateSchedule(java.util.Calendar startDate, Tenor maturity, Frequency frequency, StubType stubType, Period prototype, int maxPeriods)
      Used to generate a List containing an schedule ordered by period dates.
      static java.lang.String getCalendarUnitDescriptor(int calendarUnit) 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ScheduleGenerator

        public ScheduleGenerator()
    • Method Detail

      • generateSchedule

        public static java.util.List<Period> generateSchedule(java.util.Calendar startDate,
                                                              java.lang.String maturityString,
                                                              Frequency frequency,
                                                              StubType stubType)
                                                       throws ScheduleException,
                                                              java.text.ParseException
        Used to generate a List containing an schedule ordered by period dates. The periods will be adjacent to each other, e.g: d1,d2 d2,d3 d3,d4
        Parameters:
        startDate -
        maturityString - Parsed by Tenor, e.g. "10Y", "6M", etc
        frequency -
        stubType -
        Returns:
        A List containing the schedule
        Throws:
        ScheduleException
        java.text.ParseException
      • generateSchedule

        public static java.util.List<Period> generateSchedule(java.util.Calendar startDate,
                                                              java.lang.String maturityString,
                                                              Frequency frequency,
                                                              StubType stubType,
                                                              int maxPeriods)
                                                       throws ScheduleException,
                                                              java.text.ParseException
        Used to generate a List containing an schedule ordered by period dates. The periods will be adjacent to each other, e.g: d1,d2 d2,d3 d3,d4
        Parameters:
        startDate -
        maturityString - Parsed by Tenor, e.g. "10Y", "6M", etc
        frequency -
        stubType -
        maxPeriods -
        Returns:
        A List containing the schedule
        Throws:
        ScheduleException
        java.text.ParseException
      • generateSchedule

        public static java.util.List<Period> generateSchedule(java.util.Calendar startDate,
                                                              java.lang.String maturityString,
                                                              Frequency frequency,
                                                              StubType stubType,
                                                              Period prototype)
                                                       throws ScheduleException,
                                                              java.text.ParseException
        Used to generate a List containing an schedule ordered by period dates. The periods will be adjacent to each other, e.g: d1,d2 d2,d3 d3,d4
        Parameters:
        startDate -
        maturityString - Parsed by Tenor, e.g. "10Y", "6M", etc
        frequency -
        stubType -
        prototype -
        Returns:
        A List containing the schedule
        Throws:
        ScheduleException
        java.text.ParseException
      • generateSchedule

        public static java.util.List<Period> generateSchedule(java.util.Calendar startDate,
                                                              java.lang.String maturityString,
                                                              Frequency frequency,
                                                              StubType stubType,
                                                              Period prototype,
                                                              int maxPeriods)
                                                       throws ScheduleException,
                                                              java.text.ParseException
        Used to generate a List containing an schedule ordered by period dates. The periods will be adjacent to each other, e.g: d1,d2 d2,d3 d3,d4
        Parameters:
        startDate -
        maturityString - Parsed by Tenor, e.g. "10Y", "6M", etc
        frequency -
        stubType -
        prototype -
        Returns:
        A List containing the schedule
        Throws:
        ScheduleException
        java.text.ParseException
      • generateSchedule

        public static java.util.List<Period> generateSchedule(java.util.Calendar startDate,
                                                              Tenor maturity,
                                                              Frequency frequency,
                                                              StubType stubType)
                                                       throws ScheduleException
        Used to generate a List containing an schedule ordered by period dates. The periods will be adjacent to each other, e.g: d1,d2 d2,d3 d3,d4
        Parameters:
        startDate -
        maturity -
        frequency -
        stubType -
        Returns:
        A List containing the schedule
        Throws:
        ScheduleException
      • generateSchedule

        public static java.util.List<Period> generateSchedule(java.util.Calendar startDate,
                                                              Tenor maturity,
                                                              Frequency frequency,
                                                              StubType stubType,
                                                              int maxPeriods)
                                                       throws ScheduleException
        Used to generate a List containing an schedule ordered by period dates. The periods will be adjacent to each other, e.g: d1,d2 d2,d3 d3,d4
        Parameters:
        startDate -
        maturity -
        frequency -
        stubType -
        maxPeriods -
        Returns:
        A List containing the schedule
        Throws:
        ScheduleException
      • generateSchedule

        public static java.util.List<Period> generateSchedule(java.util.Calendar startDate,
                                                              Tenor maturity,
                                                              Frequency frequency,
                                                              StubType stubType,
                                                              Period prototype)
                                                       throws ScheduleException
        Used to generate a List containing an schedule ordered by period dates. The periods will be adjacent to each other, e.g: d1,d2 d2,d3 d3,d4
        Parameters:
        startDate -
        maturity -
        frequency -
        stubType -
        prototype -
        Returns:
        A List containing the schedule
        Throws:
        ScheduleException
      • generateSchedule

        public static java.util.List<Period> generateSchedule(java.util.Calendar startDate,
                                                              Tenor maturity,
                                                              Frequency frequency,
                                                              StubType stubType,
                                                              Period prototype,
                                                              int maxPeriods)
                                                       throws ScheduleException
        Used to generate a List containing an schedule ordered by period dates. The periods will be adjacent to each other, e.g: d1,d2 d2,d3 d3,d4
        Parameters:
        startDate -
        maturity -
        frequency -
        stubType -
        prototype -
        Returns:
        A List containing the schedule
        Throws:
        ScheduleException
      • generateSchedule

        public static java.util.List<Period> generateSchedule(java.util.Calendar startDate,
                                                              java.util.Calendar endDate,
                                                              Frequency frequency,
                                                              StubType stubType)
                                                       throws ScheduleException
        Used to generate a List containing an schedule ordered by period dates. The periods will be adjacent to each other, e.g: d1,d2 d2,d3 d3,d4
        Parameters:
        startDate -
        endDate -
        frequency -
        stubType -
        Returns:
        A List containing the schedule
        Throws:
        ScheduleException
      • generateSchedule

        public static java.util.List<Period> generateSchedule(java.util.Calendar startDate,
                                                              java.util.Calendar endDate,
                                                              Frequency frequency,
                                                              StubType stubType,
                                                              int maxPeriods)
                                                       throws ScheduleException
        Used to generate a List containing an schedule ordered by period dates. The periods will be adjacent to each other, e.g: d1,d2 d2,d3 d3,d4
        Parameters:
        startDate -
        endDate -
        frequency -
        stubType -
        maxPeriods -
        Returns:
        A List containing the schedule
        Throws:
        ScheduleException
      • generateSchedule

        public static java.util.List<Period> generateSchedule(java.util.Calendar startDate,
                                                              java.util.Calendar endDate,
                                                              Frequency frequency,
                                                              StubType stubType,
                                                              Period prototype)
                                                       throws ScheduleException
        Used to generate a List containing an schedule ordered by period dates. The periods will be adjacent to each other, e.g: d1,d2 d2,d3 d3,d4
        Parameters:
        startDate -
        endDate -
        frequency -
        stubType -
        Returns:
        A List containing the schedule
        Throws:
        ScheduleException
      • generateSchedule

        public static java.util.List<Period> generateSchedule(java.util.Calendar startDate,
                                                              java.util.Calendar endDate,
                                                              Frequency frequency,
                                                              StubType stubType,
                                                              Period prototype,
                                                              int maxPeriods)
                                                       throws ScheduleException
        Used to generate a List containing an schedule ordered by period dates. The periods will be adjacent to each other, e.g: d1,d2 d2,d3 d3,d4
        Parameters:
        startDate -
        endDate -
        frequency -
        stubType -
        Returns:
        A List containing the schedule
        Throws:
        ScheduleException
      • generateSchedule

        public static java.util.List<Period> generateSchedule(java.util.Calendar startDate,
                                                              java.util.Calendar endDate,
                                                              int frequencyAmount,
                                                              int frequencyUnit,
                                                              StubType stubType)
                                                       throws ScheduleException
        Used to generate a List containing an schedule ordered by period dates. The periods will be adjacent to each other, e.g: d1,d2 d2,d3 d3,d4
        Parameters:
        startDate -
        endDate -
        frequencyAmount -
        frequencyUnit -
        stubType -
        Returns:
        A List containing the schedule
        Throws:
        ScheduleException
      • generateSchedule

        public static java.util.List<Period> generateSchedule(java.util.Calendar startDate,
                                                              java.util.Calendar endDate,
                                                              int frequencyAmount,
                                                              int frequencyUnit,
                                                              StubType stubType,
                                                              int maxPeriods)
                                                       throws ScheduleException
        Used to generate a List containing an schedule ordered by period dates. The periods will be adjacent to each other, e.g: d1,d2 d2,d3 d3,d4
        Parameters:
        startDate -
        endDate -
        frequencyAmount -
        frequencyUnit -
        stubType -
        Returns:
        A List containing the schedule
        Throws:
        ScheduleException
      • generateSchedule

        public static java.util.List<Period> generateSchedule(java.util.Calendar startDate,
                                                              java.util.Calendar endDate,
                                                              int frequencyAmount,
                                                              int frequencyUnit,
                                                              StubType stubType,
                                                              Period prototype)
                                                       throws ScheduleException
        Used to generate a List containing an schedule ordered by period dates. The periods will be adjacent to each other, e.g: d1,d2 d2,d3 d3,d4
        Parameters:
        startDate -
        endDate -
        frequencyAmount -
        frequencyUnit -
        stubType -
        prototype -
        Returns:
        A List containing the schedule
        Throws:
        ScheduleException
      • generateSchedule

        public static java.util.List<Period> generateSchedule(java.util.Calendar startDate,
                                                              java.util.Calendar endDate,
                                                              int frequencyAmount,
                                                              int frequencyUnit,
                                                              StubType stubType,
                                                              Period prototype,
                                                              int maxPeriods)
                                                       throws ScheduleException
        Used to generate a List containing an schedule ordered by period dates. The periods will be adjacent to each other, e.g: d1,d2 d2,d3 d3,d4
        Parameters:
        startDate -
        endDate -
        frequencyAmount -
        frequencyUnit -
        stubType -
        prototype -
        maxPeriods -
        Returns:
        A List containing the schedule
        Throws:
        ScheduleException
      • copyAndReset

        public static java.util.Calendar copyAndReset(java.util.Calendar calendar)
        Copy a calendar and reset it's time to midnight to avoid problems relating to generating schedules around midnight.
        Parameters:
        calendar - The calendar to copy and reset
        Returns:
        Calendar the calendar which has been copied and reset
      • getCalendarUnitDescriptor

        public static java.lang.String getCalendarUnitDescriptor(int calendarUnit)

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.