Option Explicit Function bscholes(rf As Double, so As Double, X As Double, sd As Double) As Double Dim d1 As Double, d2 As Double, nd1 As Double, nd2 As Double, c As Double d1 = (Log(so / X) + (rf + 0.5 * sd * sd) * 0.25) / (sd * Sqr(0.25)) d2 = d1 - (sd * Sqr(0.25)) nd1 = WorksheetFunction.Norm_S_Dist(d1, True) nd2 = WorksheetFunction.Norm_S_Dist(d2, True) c = so * nd1 - X * Exp(-rf * 0.25) * nd2 bscholes = c End Function
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter