Interface RateCalculation

    • Method Detail

      • getType

        SwapLegType getType()
        Gets the type of the leg, such as Fixed or Ibor.

        This provides a high level categorization of the swap leg.

        Returns:
        the leg type
      • getDayCount

        DayCount getDayCount()
        Gets the day count convention.

        This is used to convert schedule period dates to a numerical value.

        Returns:
        the day count convention
      • collectCurrencies

        void collectCurrencies​(ImmutableSet.Builder<Currency> builder)
        Collects all the currencies referred to by this calculation.

        This collects the complete set of currencies for the calculation, not just the payment currencies.

        Parameters:
        builder - the builder to populate
      • collectIndices

        void collectIndices​(ImmutableSet.Builder<Index> builder)
        Collects all the indices referred to by this calculation.

        A calculation will typically refer to at least one index, such as 'GBP-LIBOR-3M'. Each index that is referred to must be added to the specified builder.

        Parameters:
        builder - the builder to use
      • createAccrualPeriods

        ImmutableList<RateAccrualPeriod> createAccrualPeriods​(Schedule accrualSchedule,
                                                              Schedule paymentSchedule,
                                                              ReferenceData refData)
        Creates accrual periods based on the specified schedule.

        The specified accrual schedule defines the period dates to be created. One instance of RateAccrualPeriod must be created for each period in the schedule.

        Parameters:
        accrualSchedule - the accrual schedule
        paymentSchedule - the payment schedule
        refData - the reference data to use when resolving
        Returns:
        the accrual periods
        Throws:
        ReferenceDataNotFoundException - if an identifier cannot be resolved in the reference data
        RuntimeException - if the calculation is invalid