Documentation of 'net.finmath.time.daycount.DayCountConventionFactory' Java class
DayCountConventionFactory
net.finmath.time.daycount

Class DayCountConventionFactory



  • public class DayCountConventionFactory
    extends java.lang.Object
    Factory methods for day count conventions.
    • Constructor Summary

      Constructors 
      Constructor and Description
      DayCountConventionFactory()
      Factory methods for day count conventions.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.util.Calendar getCalendarForData(java.util.Date date)
      Returns a java.util.Calendar for a given java.util.Date.
      static double getDaycount(java.util.Date startDate, java.util.Date endDate, java.lang.String convention)
      Return the number of days between startDate and endDate given the specific daycount convention.
      static DayCountConventionInterface getDayCountConvention(java.lang.String convention)
      Create a day count convention base on a convention string.
      static double getDaycountFraction(java.util.Date startDate, java.util.Date endDate, java.lang.String convention)
      Return the daycount fraction corresponding to the period from startDate to endDate given the specific daycount convention.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DayCountConventionFactory

        public DayCountConventionFactory()
        Factory methods for day count conventions.
    • Method Detail

      • getDayCountConvention

        public static DayCountConventionInterface getDayCountConvention(java.lang.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(java.util.Date startDate,
                                         java.util.Date endDate,
                                         java.lang.String convention)
        Return the number of days between startDate and endDate given the specific daycount convention.
        Parameters:
        startDate - The start date given as a Date.
        endDate - The end date given as a Date.
        convention - A convention string.
        Returns:
        The number of days within the given period.
      • getDaycountFraction

        public static double getDaycountFraction(java.util.Date startDate,
                                                 java.util.Date endDate,
                                                 java.lang.String convention)
        Return the daycount fraction corresponding to the period from startDate to endDate given the specific daycount convention.
        Parameters:
        startDate - The start date given as a Date.
        endDate - The end date given as a Date.
        convention - A convention string.
        Returns:
        The daycount fraction corresponding to the given period.
      • getCalendarForData

        public static java.util.Calendar getCalendarForData(java.util.Date date)
        Returns a java.util.Calendar for a given java.util.Date.
        Parameters:
        date - A Date
        Returns:
        The corresponding calendar

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.