- java.lang.Object
-
- net.finmath.time.daycount.DayCountConventionFactory
-
- All Implemented Interfaces:
Serializable
public class DayCountConventionFactory extends Object implements Serializable
Factory methods for day count conventions.- Version:
- 1.0
- Author:
- Christian Fries
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double
getDaycount(LocalDate startDate, LocalDate endDate, String convention)
Return the number of days between startDate and endDate given the specific daycount convention.static DayCountConvention
getDayCountConvention(String convention)
Create a day count convention base on a convention string.static double
getDaycountFraction(LocalDate startDate, LocalDate endDate, String convention)
Return the daycount fraction corresponding to the period from startDate to endDate given the specific daycount convention.
-
-
-
Method Detail
-
getDayCountConvention
public static DayCountConvention getDayCountConvention(String convention)
Create a day count convention base on a convention string. The follwoing convention strings are supported- act/act isda
- 30/360
- 30E/360
- 30U/360
- act/360
- act/365
- act/act yearfrac
- Parameters:
convention
- A convention string.- Returns:
- A day count convention object.
-
getDaycount
public static double getDaycount(LocalDate startDate, LocalDate endDate, String convention)
Return the number of days between startDate and endDate given the specific daycount convention.
-
-