Exemplo n.º 1
0
        public void getCallTest1()
        {
            double stockPrice        = 50;
            double strikePrice       = 55;
            double timeToMaturity    = 1;
            double standardDeviation = 0.2;
            double risk = 0.09;

            Pricer p = new Pricer(stockPrice, strikePrice, timeToMaturity, standardDeviation, risk);

            Assert.AreEqual(3.8617, p.getCall());
        }
Exemplo n.º 2
0
        public void getCallTest2()
        {
            double stockPrice        = 64;
            double strikePrice       = 60;
            double timeToMaturity    = 180 / 365;
            double standardDeviation = 0.27;
            double risk = 0.045;

            Pricer p = new Pricer(stockPrice, strikePrice, timeToMaturity, standardDeviation, risk);

            Assert.AreEqual(7.7661, p.getCall());
        }