java.lang.Object
net.finmath.modelling.descriptor.ScheduleDescriptor
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 Summary
ConstructorsConstructorDescriptionScheduleDescriptor(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.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.ScheduleDescriptor(List<Period> periods, DayCountConvention daycountConvention)
Construct a schedule descriptor via a list of periods and daycount convention.ScheduleDescriptor(Schedule schedule)
Extract a schedule descriptor from a schedule. -
Method Summary
Modifier and TypeMethodDescriptionint
The number of periods any schedule from this descriptor will have.The periods of a schedule generated from this descriptor.getSchedule(LocalDate referenceDate)
Generate a schedule relative to the given reference date.
-
Constructor Details
-
ScheduleDescriptor
Construct a schedule descriptor via a list of periods and daycount convention.- Parameters:
periods
- A list ofPeriod
objects.daycountConvention
- The common daycount convention.
-
ScheduleDescriptor
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
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
The periods of a schedule generated from this descriptor.- Returns:
- The periods.
-