March 13th, 2007, 7:09 pm
Hi,I am implementing a simple Normal Model for Swaption Pricing.I first try to price European Puts and European Calls as follows:BNCalls = normvol * sqrt(T) * (d1 * N(d1) + N'(d1))BNPuts = normvol * sqrt(T) * (d2 * N(d2) + N'(d2))where:d1 = +(F - K) / (normvol * sqrt(T))d2 = - (F - K) / (normvol * sqrt(T))F is the forward, K is the strike, T is the time to maturity.Following is a VBA code I use for the same. My problem is that I get negative values for BNPut whenever I have F > K(and similarly, negative values for BNCall whenever I have F < K). I am not able to understand what mistake I am making. Would be great if someone could advice. Thanks. Public Function Bnormcall(forward As Double, k As Double, sigma As Double, T As Double) As Double d1 = (forward - k) / (sigma * (T ^ 0.5)) Nd1 = WorksheetFunction.NormSDist(d1) Ndprimed1 = 1 / ((2 * WorksheetFunction.Pi) ^ 0.5) * Exp(-(d1 ^ 2) / 2) Bnormcall = sigma * (T ^ 0.5) * ((d1 * Nd1) + Nprimed1)End FunctionPublic Function Bnormput(forward As Double, k As Double, sigma As Double, T As Double) As Double d2 = -(forward - k) / sigma / T ^ 0.5 Nd2 = WorksheetFunction.NormSDist(d2) Ndprimed2 = 1 / ((2 * WorksheetFunction.Pi) ^ 0.5) * Exp(-(d2 ^ 2) / 2) Bnormput = sigma * T ^ 0.5 * (d2 * Nd2 + Nprimed2) End Function