java.lang.Object
net.finmath.time.daycount.DayCountConventionFactory
- All Implemented Interfaces:
Serializable
Factory methods for day count conventions.
- Version:
- 1.0
- Author:
- Christian Fries
- See Also:
- Serialized Form
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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 Details
-
getDayCountConvention
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
Return the number of days between startDate and endDate given the specific daycount convention. -
getDaycountFraction
public 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.
-