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.

Black and Scholes

Postby John_Val » Thu Aug 27, 2009 3:39 pm

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?
John_Val
 
Posts: 25
Joined: Sun May 17, 2009 2:18 pm

Re: Black and Scholes

Postby TomDoan » Thu Aug 27, 2009 6:17 pm

What are you trying to estimate, and with what data?
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Re: Black and Scholes

Postby John_Val » Fri Aug 28, 2009 9:59 am

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.
John_Val
 
Posts: 25
Joined: Sun May 17, 2009 2:18 pm

Re: Black and Scholes

Postby TomDoan » Fri Aug 28, 2009 11:34 am

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.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm


Return to Help With Programming

Who is online

Users browsing this forum: No registered users and 1 guest