Beispiel #1
0
        public static Calculation CreateFloating(decimal fixedRate, Money notional, FloatingRateIndex floatingRateIndex, Period tenor,
                                                 DayCountFraction dayCountFraction, DiscountingTypeEnum discountingType)
        {
            var calculation = new Calculation
            {
                Item = NotionalFactory.Create(notional),
                compoundingMethod          = CompoundingMethodEnum.None,
                compoundingMethodSpecified = true,
                dayCountFraction           = dayCountFraction,
                discounting =
                    DiscountingHelper.Create(fixedRate, dayCountFraction, discountingType),
                Items = new object[] { FloatingRateCalculationHelper.CreateFloating(floatingRateIndex, tenor) }
            };

            return(calculation);
        }
        public static Calculation CreateFloating(Money notional, FloatingRateIndex floatingRateIndex, Period tenor, DayCountFraction dayCountFraction, DiscountingTypeEnum?discountingType)
        {
            var discounting = discountingType != null
                                  ? DiscountingHelper.Create(null, dayCountFraction, (DiscountingTypeEnum)discountingType)
                                  : null;

            var calculation = new Calculation
            {
                Items                      = new object[] { NotionalFactory.Create(notional) },
                compoundingMethod          = CompoundingMethodEnum.None,
                compoundingMethodSpecified = true,
                dayCountFraction           = dayCountFraction,
                discounting                = discounting,
                Items1                     = new object[] { FloatingRateCalculationHelper.CreateFloating(floatingRateIndex, tenor) }
            };

            return(calculation);
        }
        public static Calculation CreateFloating(Money notional, FloatingRateIndex floatingRateIndex, Period tenor, DayCountFraction dayCountFraction, DiscountingTypeEnum discountingType)
        {
            var calculation = new Calculation
            {
                Items                      = new object[] { NotionalFactory.Create(notional) },
                compoundingMethod          = CompoundingMethodEnum.None,
                compoundingMethodSpecified = true,
                dayCountFraction           = dayCountFraction
            };
            var discounting = new Discounting
            {
                discountingType = discountingType,
                discountRateDayCountFraction = dayCountFraction
            };

            calculation.discounting = discounting;
            calculation.Items       = new object[] { FloatingRateCalculationHelper.CreateFloating(floatingRateIndex, tenor) };
            return(calculation);
        }