Exemplo n.º 1
0
        public static Discounting Parse(decimal discountingRate, string dayCountFraction, DiscountingTypeEnum discountingTypeEnum)
        {
            var discounting = new Discounting
            {
                discountingType = discountingTypeEnum,
                discountRate    = discountingRate,
                discountRateDayCountFraction =
                    DayCountFractionHelper.Parse(dayCountFraction)
                    //discountRateSpecified = true
            };

            return(discounting);
        }
Exemplo n.º 2
0
        public static RateIndex Parse(string floatingRateIndex,
                                      string currency,
                                      string dayCountFraction)
        {
            var rateIndex = new RateIndex
            {
                currency = new IdentifiedCurrency()
                {
                    Value = currency
                },
                dayCountFraction  = DayCountFractionHelper.Parse(dayCountFraction),
                floatingRateIndex = FloatingRateIndexHelper.Parse(floatingRateIndex),
            };

            return(rateIndex);
        }
Exemplo n.º 3
0
        public static RateIndex Parse(string instrumentId,
                                      string floatingRateIndex,
                                      string currency,
                                      string dayCountFraction,
                                      string paymentFrequency,
                                      string term)
        {
            var rateIndex = new RateIndex
            {
                currency = new IdentifiedCurrency()
                {
                    Value = currency
                },
                dayCountFraction  = DayCountFractionHelper.Parse(dayCountFraction),
                floatingRateIndex = FloatingRateIndexHelper.Parse(floatingRateIndex),
                id               = instrumentId,
                instrumentId     = InstrumentIdArrayHelper.Parse(instrumentId),
                paymentFrequency = PeriodHelper.Parse(paymentFrequency),
                term             = PeriodHelper.Parse(term)
            };

            return(rateIndex);
        }