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

I've just downloaded quantlib and started playing around with it, and it looks like it's designed primarily to use Euler discretizations for everything -- so far as I can tell, there's not even a method provided to exactly simulate geometric Brownian motion. Am I missing an obvious feature? If not, is there a fundamental reason why you wouldn't (ever) want to use exact numerics instead of approximate ones?

share|improve this question
up vote 12 down vote accepted

Well, actually it's designed to use whatever discretization you throw at it---but for the time being only Euler discretization is implemented, mostly for lack of time or interest on the part of contributors. If you want to use exact numerics with a process, you can just code the corresponding discretization class (you'll have to inherit from StochasticProcess::discretization) and pass an instance of your class to the process upon instantiation. The whole design is described in more detail in chapter 6 at http://implementingquantlib.blogspot.com/p/the-book.html, or rather, the half of chapter 6 I've written so far.

Needless to say, if you do write exact discretization, send a patch our way and we'll include it in the library.

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.