Class SmileTenorConverter

    • Constructor Detail

      • SmileTenorConverter

        public SmileTenorConverter​(String tenorAndMaturityDefaultValue,
                                   String moneynessDefaultValue)
    • Method Detail

      • convert

        public LocalDate convert​(com.qfs.store.IDatastoreVersion datastore,
                                 LocalDate asOfDate,
                                 BucketType bucketType,
                                 String tenorSet,
                                 String tenor,
                                 IBusinessDayConvention businessDayConvention,
                                 IBusinessDayCalendar calendar)
                          throws ParseException
        Description copied from interface: ITenorConverter
        Given an as-of-date and a String representation of a tenor, returns the LocalDate representation of the tenor (after application of business day convention).
        Specified by:
        convert in interface ITenorConverter
        Parameters:
        datastore - The datastore version.
        asOfDate - The initial as-of-date.
        bucketType - The tenor store.
        tenorSet - The tenor set.
        tenor - The String representation of a tenor.
        businessDayConvention - The business day convention to use.
        calendar - the business day calendar.
        Returns:
        The LocalDate represented by the input tenor or date, given the as-of-date.
        Throws:
        ParseException - the tenor is not recognized.
      • calculateNbDays

        protected int calculateNbDays​(String tenor)
        Transforms a tenor into a number of days. Uses the 7/30/360 convention for number of dates in W/M/Y.
        Parameters:
        tenor - The given tenor.
        Returns:
        The numbers of days represented by the tenor.