Class ScheduleDescriptor

java.lang.Object
net.finmath.modelling.descriptor.ScheduleDescriptor

public class ScheduleDescriptor extends Object
Descriptor for a schedule. All data to generate a schedule for any given reference date is stored. Either via a set of periods or conventions.
Author:
Christian Fries, Roland Bachl
  • Constructor Details

    • ScheduleDescriptor

      public ScheduleDescriptor(List<Period> periods, DayCountConvention daycountConvention)
      Construct a schedule descriptor via a list of periods and daycount convention.
      Parameters:
      periods - A list of Period objects.
      daycountConvention - The common daycount convention.
    • ScheduleDescriptor

      public ScheduleDescriptor(Schedule schedule)
      Extract a schedule descriptor from a schedule.
      Parameters:
      schedule - The schedule.
    • ScheduleDescriptor

      public ScheduleDescriptor(LocalDate startDate, LocalDate maturityDate, ScheduleGenerator.Frequency frequency, ScheduleGenerator.DaycountConvention daycountConvention, ScheduleGenerator.ShortPeriodConvention shortPeriodConvention, BusinessdayCalendar.DateRollConvention dateRollConvention, BusinessdayCalendar businessdayCalendar, int fixingOffsetDays, int paymentOffsetDays, boolean isUseEndOfMonth)
      Construct a schedule descriptor via a set of parameters for a factory.
      Parameters:
      startDate - The start date of the first period (unadjusted - adjustments take place during schedule generation).
      maturityDate - The end date of the last period (unadjusted - adjustments take place during schedule generation).
      frequency - The frequency.
      daycountConvention - The daycount convention.
      shortPeriodConvention - If short period exists, have it first or last.
      dateRollConvention - Adjustment to be applied to the all dates.
      businessdayCalendar - Businessday calendar (holiday calendar) to be used for date roll adjustment.
      fixingOffsetDays - Number of business days to be added to period start to get the fixing date.
      paymentOffsetDays - Number of business days to be added to period end to get the payment date.
      isUseEndOfMonth - If ShortPeriodConvention is LAST and startDate is an end of month date, all period will be adjusted to EOM. If ShortPeriodConvention is FIRST and maturityDate is an end of month date, all period will be adjusted to EOM.
    • ScheduleDescriptor

      public ScheduleDescriptor(LocalDate startDate, LocalDate maturityDate, ScheduleGenerator.Frequency frequency, ScheduleGenerator.DaycountConvention daycountConvention, ScheduleGenerator.ShortPeriodConvention shortPeriodConvention, BusinessdayCalendar.DateRollConvention dateRollConvention, AbstractBusinessdayCalendar abstractBusinessdayCalendar, int fixingOffsetDays, int paymentOffsetDays)
      Construct a schedule descriptor via a set of parameters for a factory.
      Parameters:
      startDate - The start date of the first period (unadjusted - adjustments take place during schedule generation).
      maturityDate - The end date of the last period (unadjusted - adjustments take place during schedule generation).
      frequency - The frequency.
      daycountConvention - The daycount convention.
      shortPeriodConvention - If short period exists, have it first or last.
      dateRollConvention - Adjustment to be applied to the all dates.
      abstractBusinessdayCalendar - Businessday calendar (holiday calendar) to be used for date roll adjustment.
      fixingOffsetDays - Number of business days to be added to period start to get the fixing date.
      paymentOffsetDays - Number of business days to be added to period end to get the payment date.
  • Method Details

    • getSchedule

      public Schedule getSchedule(LocalDate referenceDate)
      Generate a schedule relative to the given reference date.
      Parameters:
      referenceDate - The desired reference date.
      Returns:
      The schedule relative to the reference date.
    • getNumberOfPeriods

      public int getNumberOfPeriods()
      The number of periods any schedule from this descriptor will have.
      Returns:
      The number of periods.
    • getPeriods

      public List<Period> getPeriods()
      The periods of a schedule generated from this descriptor.
      Returns:
      The periods.