But as said I need to do it w/ QuantLib. GBM is just a minor part. Excel is the biggest BS for such a task, b/c slow. I need to generate multi-millions of such GBM generated prices for a Monte Carlo simulation.
Why bother? You'll find the math will come out all wrong and you'll start a new thread about it, whining to anyone who will listen that you have a better way.
As posted some weeks ago here, I'm doing a research. I now just wanted to include also QuantLib into my research. It indeed could be that the GBM in QuantLib is as buggy as most of the GBMs I so far have tested.
Just an update: Using the above said QuantLib GBM code I get very very weired results. IMO the GBM in QuantLib can never ever be correct. WIll continue my tests tomorrow. Will also post the code here for verification & reproduction of the results by others.
Exactly, he could not even articulate why it must be in QuantLib. Probably some homework, lol. Not worth the effort.
@ph1l, thx, can you or your BingChat perform the said test here? The devil is in the detail: timeSteps (in above link it's called N) must be as small as possible to see the error, ie. 1 to about 25 or so. In QuantLib the practical minimum possible seems to be 2 since the first of the generated values is always the passed initial price. Ie. the challenge is: Does your GBM algorithm pass the "68–95–99.7 rule test"? They are 3 tests, but the first (ie. the 68.27% test) just suffices to pass.