Exemplo n.º 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);
        }
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);
        }