Esempio n. 1
0
 public void CreateRateIndex_Facts()
 {
     Assert.Equal("Could not parse fixed daycount - ffff", FundingInstrumentFunctions.CreateRateIndex("haarrrr", "USD", "3m", "flfl", "ffff", "3m", "NYC", "2b", "F"));
     Assert.Equal("Could not parse float daycount - flfl", FundingInstrumentFunctions.CreateRateIndex("haarrrr", "USD", "3m", "flfl", "Act365F", "3m", "NYC", "2b", "F"));
     Assert.Equal("Could not parse roll convention - FmFm", FundingInstrumentFunctions.CreateRateIndex("haarrrr", "USD", "3m", "Act365F", "Act365F", "3m", "NYC", "2b", "FmFm"));
     Assert.Equal("Calendar Jozi not found in cache", FundingInstrumentFunctions.CreateRateIndex("haarrrr", "USD", "3m", "Act365F", "Act365F", "3m", "Jozi", "2b", "F"));
     Assert.Equal("haarrrr¬0", FundingInstrumentFunctions.CreateRateIndex("haarrrr", "USD", "3m", "Act365F", "Act365F", "3m", "NYC", "2b", "F"));
 }
Esempio n. 2
0
        public void CreateIRS_Facts()
        {
            Assert.Equal("Rate index yarrrh not found in cache", FundingInstrumentFunctions.CreateIRS("gleughh", DateTime.Today, "3y", "yarrrh", 0.05, 1e6, "F.USD", "D.USD", Value, Value, Value));
            var z = FundingInstrumentFunctions.CreateRateIndex("yarrrh", "USD", "3m", "Act365F", "Act365F", "3m", "NYC", "2b", "F");

            Assert.Equal("Could not parse pay/rec - waaah", FundingInstrumentFunctions.CreateIRS("gleughh", DateTime.Today, "3y", "yarrrh", 0.05, 1e6, "F.USD", "D.USD", "waaah", Value, Value));
            Assert.Equal("gleughh¬0", FundingInstrumentFunctions.CreateIRS("gleughh", DateTime.Today, "3y", "yarrrh", 0.05, 1e6, "F.USD", "D.USD", Value, Value, Value));
        }
Esempio n. 3
0
        public void CreateIRBasisSwap_Facts()
        {
            Assert.Equal("Rate index harrP not found in cache", FundingInstrumentFunctions.CreateIRBasisSwap("glooop", DateTime.Today, "8y", "harrP", "harrR", 0.05, Value, 1e6, "F.PAY", "F.REC", "DISCO", Value, Value));
            var z = FundingInstrumentFunctions.CreateRateIndex("harrP", "USD", "3m", "Act365F", "Act365F", "3m", "NYC", "2b", "F");

            Assert.Equal("Rate index harrR not found in cache", FundingInstrumentFunctions.CreateIRBasisSwap("glooop", DateTime.Today, "8y", "harrP", "harrR", 0.05, Value, 1e6, "F.PAY", "F.REC", "DISCO", Value, Value));
            z = FundingInstrumentFunctions.CreateRateIndex("harrR", "USD", "3m", "Act365F", "Act365F", "3m", "NYC", "2b", "F");
            Assert.Equal("glooop¬0", FundingInstrumentFunctions.CreateIRBasisSwap("glooop", DateTime.Today, "8y", "harrP", "harrR", 0.05, Value, 1e6, "F.PAY", "F.REC", "DISCO", Value, Value));
        }
Esempio n. 4
0
        public void CreateFRA_Facts()
        {
            Assert.Equal("Rate index yarrr not found in cache", FundingInstrumentFunctions.CreateFRA("gleugh", DateTime.Today, "3x6", "yarrr", "USD", 0.05, 1e6, "F.USD", "D.USD", Value, Value, Value, Value));
            var z = FundingInstrumentFunctions.CreateRateIndex("yarrr", "USD", "3m", "Act365F", "Act365F", "3m", "NYC", "2b", "F");

            Assert.Equal("Could not parse pay/rec - waaah", FundingInstrumentFunctions.CreateFRA("gleugh", DateTime.Today, "3x6", "yarrr", "USD", 0.05, 1e6, "F.USD", "D.USD", Value, "waaah", Value, Value));
            Assert.Equal("Could not parse FRA discounting type - waaah", FundingInstrumentFunctions.CreateFRA("gleugh", DateTime.Today, "3x6", "yarrr", "USD", 0.05, 1e6, "F.USD", "D.USD", "waaah", "Pay", Value, Value));
            Assert.Equal("gleugh¬0", FundingInstrumentFunctions.CreateFRA("gleugh", DateTime.Today, "3x6", "yarrr", "USD", 0.05, 1e6, "F.USD", "D.USD", "Isda", "Pay", Value, Value));
        }