Beispiel #1
0
        public void Init()
        {
            Frequency resetFrequency;
            string    rollDay;

            switch (ScheduleType)
            {
            case CdsScheduleType.Basic:
                resetFrequency = new Frequency(3, DatePeriodType.M);
                rollDay        = "Termination";
                break;

            case CdsScheduleType.DualStubs:
            case CdsScheduleType.Imm3M:
                resetFrequency = new Frequency(3, DatePeriodType.M);
                rollDay        = "IMM";
                break;

            case CdsScheduleType.Imm6M:
                resetFrequency = new Frequency(6, DatePeriodType.M);
                rollDay        = "IMM";
                break;

            default:
                throw new Exception("Unable to handle CDS schedule type");
            }
            FixedLeg = new GenericSwapLeg(OriginDate, Tenor, HolidayCalendar, Currency, resetFrequency, Basis)
            {
                RollDay = rollDay,
                Nominal = (decimal)Notional
            };
            FixedSchedule = FixedLeg.GenerateSchedule();
        }
Beispiel #2
0
 public CDS()
 {
     FixedLeg = new GenericSwapLeg(OriginDate, Tenor, HolidayCalendar, Currency, new Frequency("1m"), Basis)
     {
         RollDay = "IMM"
     };
     FixedSchedule = FixedLeg.GenerateSchedule();
 }