Class RegularSchedule

java.lang.Object
net.finmath.time.RegularSchedule
All Implemented Interfaces:
Iterable<Period>, Schedule

public class RegularSchedule extends Object implements Schedule
Simple schedule generated from TimeDiscretization
Version:
1.0
Author:
Christian Fries
  • Constructor Details

    • RegularSchedule

      public RegularSchedule(TimeDiscretization timeDiscretization)
      Create a schedule from a time discretization.
      Parameters:
      timeDiscretization - The time discretization.
  • Method Details

    • getReferenceDate

      public LocalDate getReferenceDate()
      Description copied from interface: Schedule
      Returns the reference data of this schedule. The reference date is only used to convert dates to doubles using and internal daycount conventions (ACT/365) which does not need to agree with the daycount convention used to calculate period length.
      Specified by:
      getReferenceDate in interface Schedule
      Returns:
      The reference data of this schedule corresponding to t=0.
    • getPeriods

      public ArrayList<Period> getPeriods()
      Description copied from interface: Schedule
      Returns the array of periods.
      Specified by:
      getPeriods in interface Schedule
      Returns:
      The array of periods.
    • getDaycountconvention

      public DayCountConvention getDaycountconvention()
      Description copied from interface: Schedule
      Returns the daycount convention used to calculate period lengths.
      Specified by:
      getDaycountconvention in interface Schedule
      Returns:
      The daycount convention used to calculate period lengths.
    • getNumberOfPeriods

      public int getNumberOfPeriods()
      Description copied from interface: Schedule
      Returns the number of periods.
      Specified by:
      getNumberOfPeriods in interface Schedule
      Returns:
      The number of periods.
    • getPeriod

      public Period getPeriod(int periodIndex)
      Description copied from interface: Schedule
      Return the period for a given period index.
      Specified by:
      getPeriod in interface Schedule
      Parameters:
      periodIndex - A given period index.
      Returns:
      The period for the given period index.
    • getFixing

      public double getFixing(int periodIndex)
      Description copied from interface: Schedule
      Return the fixing converted to the internal daycounting relative to the schedules reference date.
      Specified by:
      getFixing in interface Schedule
      Parameters:
      periodIndex - A given period index.
      Returns:
      The fixing converted to the internal daycounting relative to the schedules reference date.
    • getPayment

      public double getPayment(int periodIndex)
      Description copied from interface: Schedule
      Return the payment date converted to the internal daycounting relative to the schedules reference date.
      Specified by:
      getPayment in interface Schedule
      Parameters:
      periodIndex - A given period index.
      Returns:
      The payment date converted to the internal daycounting relative to the schedules reference date.
    • getPeriodStart

      public double getPeriodStart(int periodIndex)
      Description copied from interface: Schedule
      Return the period start date converted to the internal daycounting relative to the schedules reference date.
      Specified by:
      getPeriodStart in interface Schedule
      Parameters:
      periodIndex - A given period index.
      Returns:
      The period start date converted to the internal daycounting relative to the schedules reference date.
    • getPeriodEnd

      public double getPeriodEnd(int periodIndex)
      Description copied from interface: Schedule
      Return the period end date converted to the internal daycounting relative to the schedules reference date.
      Specified by:
      getPeriodEnd in interface Schedule
      Parameters:
      periodIndex - A given period index.
      Returns:
      The period end date converted to the internal daycounting relative to the schedules reference date.
    • getPeriodLength

      public double getPeriodLength(int periodIndex)
      Description copied from interface: Schedule
      Return the period length for a given period index.
      Specified by:
      getPeriodLength in interface Schedule
      Parameters:
      periodIndex - A given period index.
      Returns:
      The period length for a given period index.
    • iterator

      public Iterator<Period> iterator()
      Specified by:
      iterator in interface Iterable<Period>
    • getPeriodIndex

      public int getPeriodIndex(double time)
      Description copied from interface: Schedule
      Return the index of the period which contains the given time point.
      Specified by:
      getPeriodIndex in interface Schedule
      Parameters:
      time - A given time.
      Returns:
      The period index of the .
    • getPeriodIndex

      public int getPeriodIndex(LocalDate date)
      Description copied from interface: Schedule
      Return the index of the period which contains the given date.
      Specified by:
      getPeriodIndex in interface Schedule
      Parameters:
      date - A given date.
      Returns:
      The period index of the .