Beispiel #1
0
        public void GetUnadjustedDates3Forward()
        {
            DateTime startDate = new DateTime(2008, 04, 10);
            DateTime endDate = new DateTime(2009, 04, 24);

            //Period interval = IntervalHelper.FromMonths(3);
            RollConventionEnum rollConventionEnum = RollConventionEnumHelper.Parse(startDate.Day.ToString());

            List<MetaScheduleItem> rollsMetaSchedule = new List<MetaScheduleItem>();

            MetaScheduleItem item1 = new MetaScheduleItem();
            item1.Period = IntervalHelper.FromMonths(6);
            item1.RollFrequency = IntervalHelper.FromMonths(1);
            item1.RollConvention = rollConventionEnum;
            rollsMetaSchedule.Add(item1);

            MetaScheduleItem item2 = new MetaScheduleItem();
            item2.Period = IntervalHelper.FromMonths(6);
            item2.RollFrequency = IntervalHelper.FromMonths(3);
            item2.RollConvention = rollConventionEnum;
            rollsMetaSchedule.Add(item2);

            List<DateTime> unadjustedDates = DatesMetaSchedule.GetUnadjustedDates3(startDate, endDate, rollsMetaSchedule, false);

            Debug.Print("Meta schedule:");
            //         Debug.Print(ParameterFormatter.FormatObject(ObjectToArrayOfPropertiesConverter.ConvertListToHorizontalArrayRange(rollsMetaSchedule)));

            Debug.Print("Start date: {0}", startDate);
            Debug.Print("End date: {0}", endDate);

            Debug.Print("Schedule:");
            PrintListOfDates(unadjustedDates);
        }
Beispiel #2
0
        public void GetUnadjustedDates2Forward()
        {
            DateTime startDate = new DateTime(2008, 04, 10);
            DateTime endDate = new DateTime(2009, 04, 24);

            Period interval = IntervalHelper.FromMonths(3);
            RollConventionEnum rollConventionEnum = RollConventionEnumHelper.Parse(startDate.Day.ToString());

            List<DateTime> unadjustedDates = DatesMetaSchedule.GetUnadjustedDates2(startDate, endDate, interval, rollConventionEnum, false);

            PrintListOfDates(unadjustedDates);
        }