Beispiel #1
0
        public static double getCallPrice(double underlyingPrice, double strikePrice, double YTE, double riskFreeRate, double historicalVolatility, double dividendYield)
        {
            double callOption = Math.Exp(-dividendYield * YTE) * underlyingPrice * NormSDist.N(calculateDOne(underlyingPrice, strikePrice, YTE, riskFreeRate, historicalVolatility, dividendYield)) - strikePrice * Math.Exp(-riskFreeRate * YTE) *
                                NormSDist.N(calculateDOne(underlyingPrice, strikePrice, YTE, riskFreeRate, historicalVolatility, dividendYield) - historicalVolatility * Math.Sqrt(YTE));

            return(callOption);
        }
Beispiel #2
0
        public static double getDelta(double underlyingPrice, double strikePrice, double YTE, double riskFreeRate, double historicalVolatility, double dividendYield)
        {
            double delta = NormSDist.N(calculateDOne(underlyingPrice, strikePrice, YTE, riskFreeRate, historicalVolatility, dividendYield));

            return(delta);
        }
Beispiel #3
0
        private static double calculateNdTwo(double underlyingPrice, double strikePrice, double YTE, double riskFreeRate, double historicalVolatility, double dividendYield)
        {
            double NdTwo = NormSDist.N(calculateDTwo(underlyingPrice, strikePrice, YTE, riskFreeRate, historicalVolatility, dividendYield));

            return(NdTwo);
        }