Black and Scholes

Use this forum to post questions about syntax problems or general programming issues. Questions on implementing a particular aspect of econometrics should go in "Econometrics Issues" below.
John_Val
Posts: 25
Joined: Sun May 17, 2009 2:18 pm

Black and Scholes

Unread post by John_Val »

Hello,

can you give the code to estimate the parameters of the Black and Scholes model using NLLS?

Specifically, how is the numerical integration of the standard normal curve incorporarted in the NLLS procedure?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Black and Scholes

Unread post by TomDoan »

What are you trying to estimate, and with what data?
John_Val
Posts: 25
Joined: Sun May 17, 2009 2:18 pm

Re: Black and Scholes

Unread post by John_Val »

I have data on about 25 option prices,both puts and calls, with maturities from 1 month to 9 months, and risk free rates for the same maturities. I want to estimate the volatility parameter(sigma). The formula for a call is SN(d1) - Ke^(-r(T-t))N(d2).

N(d1) is the integral of the standard normal curve from negative infinity to d1(=(ln(S/K) +(r+sigma^2/2(T-t))/sigma*sqr(T-t)).

I am having trouble with setting up the integral. I suppose you set it up numerically, but I don't know how to incorporate it into the NLLS general procedure.

If you could provide the code it would be greatly appreciated.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Black and Scholes

Unread post by TomDoan »

You just use %CDF, which is the cumulative standard Normal density. If you look at the BSOPTION.SRC procedure, it has the formulas for the prices given the other parameters. You just need to turn that into a FRML.
Post Reply