I have an old Sobol code.
Very clear implementation, but poor performance.
I tried to switch to QuantLib\'s one, as it should be better implemented.
But first, I checked they were the same (I mean, different implementation but same results).
I generated 8000 random vectors of dimension between 1 and 32 (because in my old Sobol code I can\'t use more than 32 dimensions).
All output are exactly the same except on the 18th dimension.
i.e.: the 8000 realizations of random vectors with dimension from 1 and 17 are exactly the same, while the 8000 realization of random vector of dimension between 18 and 32 differ only at the 18th component.
If I remember well (sorry but many years have passed since I deal with Sobol sequence), this may be caused from a different 18th inizialization polinomial.
I checked mine, and it is the same as publiched by Jaeckel at page 85 (table 8.3), i.e. 1101101.
Of course I\'m not sure the bug is in your library, but maybe a check can be a good idea ;-)
I attached two files for your convenience, old.txt and new.txt.
Both contain 8000 random vectors of dimension 20.
By comparing such files (for example with WinMerge) you can see the difference on the 18th dimension (the others being exactly the same).
Log in to post a comment.