示例#1
0
        public static double BlackScholes(double putCallFactor, double forward, double strike,
                                          double volatility, double deltaTime)
        {
            double d1, d2;

            if (deltaTime == 0)
            {
                return(putCallFactor * (forward - strike));
            }

            BlackScholesD1D2Parameters(forward, strike, volatility, deltaTime, out d1, out d2);

            var nd1 = Normal.CumulativePDF(putCallFactor * d1);
            var nd2 = Normal.CumulativePDF(putCallFactor * d2);

            return(putCallFactor * (forward * nd1 - strike * nd2));
        }