Interface IMaturityConverter

  • All Known Implementing Classes:
    AMaturityConverter, SimpleMaturityConverter, StoreQueryMaturityConverter

    public interface IMaturityConverter
    Interface for custom maturity/date conversions. Implementations of this interface determine the interpretation of the vertex, tenor, and maturity fields in the input files.

    Implementations are also expected to encapsulate any business day and day count conventions as required.

    • Method Detail

      • toFraction

        double toFraction​(com.quartetfs.biz.pivot.IActivePivot pivot,
                          LocalDate asOfDate,
                          BucketType bucketType,
                          String tenorSet,
                          String tenorOrDate,
                          List<Object> leafCoordinates)
        Calculate a fraction between the asOfDate and the tenorOrDate. That fraction is an implementation detail and can be: a number of days, a year fraction, a fraction between two double values (e.g. between two strike values) etc. Extra parameters are required for query-time conversion.
        Parameters:
        pivot - The ActivePivot instance.
        asOfDate - The initial as-of-date.
        bucketType - The tenor store.
        tenorSet - The tenor set.
        tenorOrDate - The String representation of a tenor or date or number of days.
        leafCoordinates - Leaf coordinates required for query-time conversion.
        Returns:
        a long representing a number of days
      • toDate

        LocalDate toDate​(com.quartetfs.biz.pivot.IActivePivot pivot,
                         LocalDate asOfDate,
                         BucketType bucketType,
                         String tenorSet,
                         String tenorOrDate,
                         List<Object> leafCoordinates)
        Convert tenorOrDate to a LocalDate. Extra parameters are required for query-time conversion.
        Parameters:
        pivot - The ActivePivot instance.
        asOfDate - The initial as-of-date, for use with tenors.
        bucketType - The tenor store.
        tenorSet - The tenor set.
        tenorOrDate - The String representation of a tenor or date.
        leafCoordinates - Leaf coordinates required for query-time conversion.
        Returns:
        The LocalDate represented by tenorOrDate.