Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is the fastest way to numerically compute Black-Scholes-Merton option prices?

I'm trying to find fastest and still precise method. Currently I'm using numerical approximation of Normal cdf with 10-9 precision and standard formulae.

Is there another way to compute them numerically using any programming language without built-in libraries for option pricing and cdf computation? If any what is the speed of the algorithm in comparison with standard method and what is precision of an answer?

There is a question about approximations to the Black-Scholes formula, but there are aproximations for ATM options. And it is not obvious that this methods would show better results.

share|improve this question
Make sure you do not over-engineer things. In the end nobody cares about implied vols beyond a single decimal digit and 2 for the option price. – Matt Wolf Jun 25 '13 at 8:21
@MattWolf Your warning is reasonable, but there are cases where precision is still valuable. For instance when using these prices/vols as inputs to more complicated models. If you round early, the effect is magnified by further calculations. So it depends on how the OP is going to be using the answers. – RaveTheTadpole Jun 25 '13 at 17:40
Can you elaborate on what data you have given and what you intend to do with it? I don't really see need for a numerical method yet, but perhaps I'm just looking from the wrong angle here... – phi Jun 25 '13 at 21:33
@phi It is used in real time computatoin of option prices, as a part of implied volatility calibration etc. Performance is crucial. For example there is no analytical representarion of Normal cdf, that can be computed easily. Thus we use approximations with some polynomials rather then compute integrals each time. Thus I'm testing the fastest way to compute OP. – Ilya Jun 26 '13 at 6:11

Fastest method is a pre-generated lookup table with carefully selected in-memory structure so you don't get too many CPU cache misses (avoiding the memory latency).

If you want an absolute speed, you also can go for a hardware specific implementation (GPU, FPGA).

share|improve this answer
Thank you for your comment. It would dramatically improve performance if done correctly, but the algorithm used to compute this table should be still optimized. – Ilya Jun 26 '13 at 11:25
@Ilya You need to compute this table only once. Then you can store it in a file and load on the start of application. – Alexey Kalmykov Jun 26 '13 at 12:40
Even if the table is simplified to time-IV-underlying-OPspace it is necessary to compute it once a day or more frequently if, for example, underlying had large shock. And if it is made not for one option, but for tenths or hundreds. – Ilya Jun 26 '13 at 19:41
@Ilya, I thought we are talking about the normal cdf here. Why would you have to generate such lookup table more than once? – Matt Wolf Jun 27 '13 at 3:54

The only special function needed for computing Black-Scholes option prices is the cumulative normal function ("N" or "Phi") or equivalently the error function ("erf"). These are very widely available with good standard library implementations. The erf function in single and double precision is part of the c99 and c++11 math standard libraries. For your favorite language, search for "error function" possibly in a "special functions" library. Generally there is no need to trade speed vs. accuracy; the library functions here give full precision with timing in the 10s or 100s of processor cycles. In almost any application the math expense is completely negligible.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.