Ejemplo n.º 1
0
        /// <summary>
        /// Return a Cashflows object containing array of the payment calculation periods and array of principal exchanges.
        /// </summary>
        /// <param name="paymentCalendar"> </param>
        /// <param name="interestRateStream">The interest rate stream.</param>
        /// <param name="rollDates">The list of roll dates.</param>
        /// <returns></returns>
        public static Cashflows GetCashflows(List <DateTime> rollDates, IBusinessCalendar paymentCalendar, InterestRateStream interestRateStream)
        {
            CalculationPeriodsPrincipalExchangesAndStubs calculationPeriodsPrincipalExchangesAndStubs =
                StreamCashflowsGenerator.GenerateCalculationPeriodsPrincipalExchangesAndStubsFromRollDates(interestRateStream, rollDates, paymentCalendar);

            return(GetCashfows(interestRateStream, calculationPeriodsPrincipalExchangesAndStubs, paymentCalendar));
        }