Пример #1
0
        public static FloatingRateCalculation Create(string floatingRateIndex, string indexTenor, decimal spreadInitialValue)
        {
            FloatingRateCalculation result = new FloatingRateCalculation();

            result.floatingRateIndex = FloatingRateIndexHelper.Parse(floatingRateIndex);
            result.indexTenor        = PeriodHelper.Parse(indexTenor);
            result.spreadSchedule    = new SpreadSchedule[] { SpreadScheduleFactory.Create(spreadInitialValue) };
            return(result);
        }
Пример #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);
        }
Пример #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);
        }