net.finmath.time
Class RegularSchedule
- java.lang.Object
-
- net.finmath.time.RegularSchedule
-
- All Implemented Interfaces:
- java.lang.Iterable<Period>, ScheduleInterface
public class RegularSchedule extends java.lang.Object implements ScheduleInterface
Simple schedule generated fromTimeDiscretizationInterface
-
-
Constructor Summary
Constructors Constructor and Description RegularSchedule(TimeDiscretizationInterface timeDiscretization)Create a schedule from a time discretization.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description DayCountConventionInterfacegetDaycountconvention()Returns the daycount convention used to calculate period lengths.doublegetFixing(int periodIndex)Return the fixing converted to the internal daycounting relative to the schedules reference date.intgetNumberOfPeriods()Returns the number of periods.doublegetPayment(int periodIndex)Return the payment date converted to the internal daycounting relative to the schedules reference date.PeriodgetPeriod(int periodIndex)Return the period for a given period index.doublegetPeriodEnd(int periodIndex)Return the period end date converted to the internal daycounting relative to the schedules reference date.doublegetPeriodLength(int periodIndex)Return the period length for a given period index.java.util.ArrayList<Period>getPeriods()Returns the array of periods.doublegetPeriodStart(int periodIndex)Return the period start date converted to the internal daycounting relative to the schedules reference date.java.util.CalendargetReferenceDate()Returns the reference data of this schedule.java.util.Iterator<Period>iterator()
-
-
-
Constructor Detail
-
RegularSchedule
public RegularSchedule(TimeDiscretizationInterface timeDiscretization)
Create a schedule from a time discretization.- Parameters:
timeDiscretization- The time discretization.
-
-
Method Detail
-
getReferenceDate
public java.util.Calendar getReferenceDate()
Description copied from interface:ScheduleInterfaceReturns 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:
getReferenceDatein interfaceScheduleInterface- Returns:
- The reference data of this schedule corresponding to t=0.
-
getPeriods
public java.util.ArrayList<Period> getPeriods()
Description copied from interface:ScheduleInterfaceReturns the array of periods.- Specified by:
getPeriodsin interfaceScheduleInterface- Returns:
- The array of periods.
-
getDaycountconvention
public DayCountConventionInterface getDaycountconvention()
Description copied from interface:ScheduleInterfaceReturns the daycount convention used to calculate period lengths.- Specified by:
getDaycountconventionin interfaceScheduleInterface- Returns:
- The daycount convention used to calculate period lengths.
-
getNumberOfPeriods
public int getNumberOfPeriods()
Description copied from interface:ScheduleInterfaceReturns the number of periods.- Specified by:
getNumberOfPeriodsin interfaceScheduleInterface- Returns:
- The number of periods.
-
getPeriod
public Period getPeriod(int periodIndex)
Description copied from interface:ScheduleInterfaceReturn the period for a given period index.- Specified by:
getPeriodin interfaceScheduleInterface- Parameters:
periodIndex- A given period index.- Returns:
- The period for the given period index.
-
getFixing
public double getFixing(int periodIndex)
Description copied from interface:ScheduleInterfaceReturn the fixing converted to the internal daycounting relative to the schedules reference date.- Specified by:
getFixingin interfaceScheduleInterface- 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:ScheduleInterfaceReturn the payment date converted to the internal daycounting relative to the schedules reference date.- Specified by:
getPaymentin interfaceScheduleInterface- 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:ScheduleInterfaceReturn the period start date converted to the internal daycounting relative to the schedules reference date.- Specified by:
getPeriodStartin interfaceScheduleInterface- 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:ScheduleInterfaceReturn the period end date converted to the internal daycounting relative to the schedules reference date.- Specified by:
getPeriodEndin interfaceScheduleInterface- 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:ScheduleInterfaceReturn the period length for a given period index.- Specified by:
getPeriodLengthin interfaceScheduleInterface- Parameters:
periodIndex- A given period index.- Returns:
- The period length for a given period index.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG