Пример #1
0
        public void TestYieldCurveSpotYields()
        {
            yieldCurveSpot.BootstrapSpotYields();

            var expectedValues = new[] { 0d, 0.08d, 0.09045445071809799d, 0.10139519558712839d, 0.11301161161266693d };

            for (var i = 0; i < expectedValues.Length; ++i)
            {
                Assert.AreEqual(expectedValues[i], yieldCurveSpot.SpotYields[i], Mathematics.Error, "Test calculation of Bootstrapped Spot Yields");
            }
        }
Пример #2
0
        static void Main()
        {
            var cashflowPricer = new CashflowPricer();

            cashflowPricer.Calculate();
            Console.WriteLine(cashflowPricer);

            var bondPricer = new BondPricer();

            bondPricer.Calculate();
            Console.WriteLine(bondPricer);

            var yieldCurve = new YieldCurve();

            yieldCurve.BootstrapSpotYields();
            Console.WriteLine(yieldCurve);

            var depositCertificate = new CertificateDeposit();

            depositCertificate.Calculate();
            Console.WriteLine(depositCertificate);

            var discountPaper = new DiscountPaper();

            discountPaper.Calculate();
            Console.WriteLine(discountPaper);

            var fixedDeposit = new FixedDeposit();

            fixedDeposit.Calculate();
            Console.WriteLine(fixedDeposit);

            var fxQuote = new FXQuote();

            Console.WriteLine(fxQuote);

            Console.ReadKey();
        }