def __init__(self, start, end, step, roll=None):
if not roll:<EOL><INDENT>roll = end<EOL><DEDENT>if not isinstance(start, BusinessDate):<EOL><INDENT>if isinstance(start, BusinessPeriod):<EOL><INDENT>start = start.to_businessdate()<EOL><DEDENT>else:<EOL><INDENT>start = BusinessDate(start)<EOL><DEDENT><DEDENT>if not isinstance(end, BusinessDate):<EOL><INDENT>if isinstance(end, BusinessPeriod):<EOL><INDENT>end = end.to_businessdate()<EOL><DEDENT>else:<EOL><INDENT>end = BusinessDate(end)<EOL><DEDENT><DEDENT>super(BusinessSchedule, self).__init__(start, end, step, roll)<EOL>if start not in self:<EOL><INDENT>self.insert(<NUM_LIT:0>, start)<EOL><DEDENT>if end not in self:<EOL><INDENT>self.append(end)<EOL><DEDENT>
class to build date schedules incl. start and end date

:param BusinessDate start: start date of schedule
:param BusinessDate end: end date of schedule
:param BusinessPeriod step: period distance of two dates
:param BusinessDate roll: origin of schedule

convenient class to build date schedules
a schedule includes always start and end date
and rolls on roll, i.e. builds a sequence by
adding and/or substracting step to/from roll.
start and end slice the relevant dates.