net.finmath.time.RegularSchedule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of finmath-lib Show documentation
Show all versions of finmath-lib Show documentation
finmath lib is a Mathematical Finance Library in Java.
It provides algorithms and methodologies related to mathematical finance.
/*
* (c) Copyright Christian P. Fries, Germany. Contact: [email protected].
*
* Created on 07.09.2013
*/
package net.finmath.time;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Iterator;
import net.finmath.time.daycount.DayCountConventionInterface;
/**
* Simple schedule generated from {@link net.finmath.time.TimeDiscretizationInterface}
*
* @author Christian Fries
*/
public class RegularSchedule implements ScheduleInterface {
private TimeDiscretizationInterface timeDiscretization;
/**
* Create a schedule from a time discretization.
*
* @param timeDiscretization The time discretization.
*/
public RegularSchedule(TimeDiscretizationInterface timeDiscretization) {
this.timeDiscretization = timeDiscretization;
}
@Override
public LocalDate getReferenceDate() {
return null;
}
@Override
public ArrayList getPeriods() {
return null;
}
@Override
public DayCountConventionInterface getDaycountconvention() {
return null;
}
@Override
public int getNumberOfPeriods() {
return timeDiscretization.getNumberOfTimeSteps();
}
@Override
public Period getPeriod(int periodIndex) {
return null;
}
@Override
public double getFixing(int periodIndex) {
return timeDiscretization.getTime(periodIndex);
}
@Override
public double getPayment(int periodIndex) {
return timeDiscretization.getTime(periodIndex+1);
}
@Override
public double getPeriodStart(int periodIndex) {
return timeDiscretization.getTime(periodIndex);
}
@Override
public double getPeriodEnd(int periodIndex) {
return timeDiscretization.getTime(periodIndex+1);
}
@Override
public double getPeriodLength(int periodIndex) {
return timeDiscretization.getTimeStep(periodIndex);
}
@Override
public Iterator iterator() {
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy