Tech Tip: Black-Scholes Solvers & Thread Safety in the Fortran Library

Black-Scholes solvers

The Fortran Library, Mark 20 saw the release of three new routines for solving the Black-Scholes equations for financial derivative pricing. D03NCF computes a finite difference solution of the Black-Scholes equation, while D03NDF and D03NEF provide analytic solutions where these are available. A discussion of the development and testing strategy adopted for these routines can be found in the article "Derivative Pricing - Validation of Results" in Issue 23 of Financial Engineering News (http://www.fenews.com/fen23/derivativepricing.html).

Thread Safety

A few of the Fortran Library routines at Mark 19 are not safe to use in multi-threaded applications. So at Mark 20 we have added routines that are functionally equivalent to existing routines, but which are safe to use in multi-threaded applications, provided that relevant compiler options have been used. The main areas covered by these new additions are optimization, partial differential equations and random numbers.

Advice on thread safety is given in the Thread Safety document that can be found at http://www.nag.co.uk/numeric/FL/manual/html/genint/FLthreadsafety.asp.

Tech Tip Update: The relevant thread safe compiler options need to be used on the NAG implementation. The penalty for doing this is that single threaded programs usually run slower and that often the ordinary user cannot use the compiler default settings.


For specific technical advice in using NAG's products, please contact our technical experts.

Return to Technical Tips & Hints index page.

Website Feedback

If you would like to see any changes on the current page, feel free to leave us a message.

(If you're a human, don't change the following field)
Your first name.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.