Пример #1
0
        public void CreateSabrCapFloorEngineTest()
        {
            const string engineHandle = "ATM Bootstrap Engine";
            var          settings     = CreateSabrCapFloorBootstrapSettings();

            settings.Set("EngineHandle", engineHandle);
            string[] types = { "AUD-IRCAP-1Y", "AUD-IRCAP-2Y", "AUD-IRCAP-3Y", "AUD-IRCAP-4Y", "AUD-IRCAP-5Y" };
            decimal[,] vols = { { .1966m }, { .1909m }, { .1965m }, { .1941m }, { .1882m } };
            DateTime[] dates =
            {
                new DateTime(2010, 09, 10),
                new DateTime(2011, 09, 10),
                new DateTime(2012, 09, 10),
                new DateTime(2013, 09, 10),
                new DateTime(2014, 09, 10)
            };
            decimal[] discounts = { .999877m, 0.951649m, 0.905211m, 0.860439m, 0.816905m };
            string    result    = SABRCapFloorInterface.Instance().CreateCapFloorCurve(Engine.Logger, Engine.Cache,
                                                                                       Engine.NameSpace, settings, types, vols, dates, discounts);

            Assert.AreEqual(engineHandle, result);
        }
Пример #2
0
        private NamedValueSet CreateSabrCapFloorBootstrapSettings()
        {
            var settings = new object[, ]
            {
                { "Instrument", "AUD-Xibor-3M" },
                { "PricingStructureType", "CapVolatilityCurve" },
                { "BaseDate", new DateTime(2007, 11, 29) },
                { "ValuationDate", new DateTime(2007, 11, 29) },
                { "IndexTenor", "3M" },
                { "IndexName", "AUD-BBR-BBSW" },
                { "MarketName", "Test" },
                { "Currency", "AUD" },
                { "StrikeQuoteUnits", StrikeQuoteUnitsEnum.ATMFlatMoneyness.ToString() },
                { "MeasureType", MeasureTypesEnum.Volatility.ToString() },
                { "QuoteUnits", QuoteUnitsEnum.LogNormalVolatility.ToString() },
                { "Algorithm", "Default" },
                { "EngineHandle", "AUD ATM Bootstrap Engine" },
                { "SettingsHandle", "ATM Bootstrap Settings" }
            };
            SABRCapFloorInterface cfInterface = SABRCapFloorInterface.Instance();
            var properties = cfInterface.CreateCapFloorProperties(settings);

            return(properties);
        }