finMath lib documentation

net.finmath.time
Class Schedule

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

public class Schedule
extends Object
implements ScheduleInterface

A schedule of interest rate periods with a fixing and payment. The periods have two representations: one a Period which contains Calendar dates and an alternative representation using doubles. Within a schedule, the mapping from doubles to dates is one to one.

Author:
Christian Fries

Constructor Summary
Schedule(Calendar referenceDate, DayCountConventionInterface daycountconvention, Period... periods)
           
Schedule(Calendar referenceDate, List<Period> periods, DayCountConventionInterface daycountconvention)
           
 
Method Summary
 DayCountConventionInterface getDaycountconvention()
          Returns the daycount convention used to calculate period lengths.
 double getFixing(int periodIndex)
           
 int getNumberOfPeriods()
           
 double getPayment(int periodIndex)
           
 Period getPeriod(int periodIndex)
           
 double getPeriodLength(int periodIndex)
           
 List<Period> getPeriods()
          Returns the array of periods.
 Calendar getReferenceDate()
          Returns the reference data of this schedule.
 Iterator<Period> iterator()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Schedule

public Schedule(Calendar referenceDate,
                DayCountConventionInterface daycountconvention,
                Period... periods)

Schedule

public Schedule(Calendar referenceDate,
                List<Period> periods,
                DayCountConventionInterface daycountconvention)
Method Detail

getReferenceDate

public Calendar getReferenceDate()
Description copied from interface: ScheduleInterface
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 ScheduleInterface
Returns:
The reference data of this schedule corresponding to t=0.

getPeriods

public List<Period> getPeriods()
Description copied from interface: ScheduleInterface
Returns the array of periods.

Specified by:
getPeriods in interface ScheduleInterface
Returns:
The array of periods.

getDaycountconvention

public DayCountConventionInterface getDaycountconvention()
Description copied from interface: ScheduleInterface
Returns the daycount convention used to calculate period lengths.

Specified by:
getDaycountconvention in interface ScheduleInterface
Returns:
The daycount convention used to calculate period lengths.

getNumberOfPeriods

public int getNumberOfPeriods()
Specified by:
getNumberOfPeriods in interface ScheduleInterface

getPeriod

public Period getPeriod(int periodIndex)
Specified by:
getPeriod in interface ScheduleInterface

getFixing

public double getFixing(int periodIndex)
Specified by:
getFixing in interface ScheduleInterface

getPayment

public double getPayment(int periodIndex)
Specified by:
getPayment in interface ScheduleInterface

getPeriodLength

public double getPeriodLength(int periodIndex)
Specified by:
getPeriodLength in interface ScheduleInterface

toString

public String toString()
Overrides:
toString in class Object

iterator

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

Copyright © 2014 Christian P. Fries.

Copyright © 2014. All rights reserved.