SERVING THE QUANTITATIVE FINANCE COMMUNITY

 
User avatar
chhu
Topic Author
Posts: 70
Joined: May 7th, 2008, 7:49 am

I have a c code for Sobol sequence generation

May 29th, 2008, 4:30 pm

I downloaded a C program for generating Sobol sequence, it is valid fordimension <= 385. The program is very small, but there is no commentsand no docs. I hope if someone find it is useful, could you please tell mehow to use it. It is really hard for me to understand the usage of thefunctions.please see the attachment for the code, I tried to compile it usingcygwin, it works! I also tried to build a *.lib so that it can be usedunder MSVC, it seems that it works. But I do not understand the program.
Attachments
sobol.zip
(58.64 KiB) Downloaded 20 times
 
User avatar
MCarreira
Posts: 1724
Joined: July 14th, 2002, 3:00 am

I have a c code for Sobol sequence generation

May 29th, 2008, 5:12 pm

You could read one of the following:Monte Carlo methods in finance - Peter JäckelMonte Carlo Methods in Financial Engineering - Paul GlassermanNumerical Recipes in C (2nd edition) - Press et al.
 
User avatar
mj
Posts: 3449
Joined: December 20th, 2001, 12:32 pm

I have a c code for Sobol sequence generation

June 12th, 2008, 6:45 am

the quantlib sobol generator is pretty comprehensive and may be easier to follow
 
User avatar
AvH
Posts: 21
Joined: March 3rd, 2008, 11:45 am

I have a c code for Sobol sequence generation

June 13th, 2008, 10:35 am

mj,how do the newly added initialization numbers (in QL-SobolGenerator) of Joe and Kuo compared those of Jäckel, is this difference noticeable ?
 
User avatar
mj
Posts: 3449
Joined: December 20th, 2001, 12:32 pm

I have a c code for Sobol sequence generation

June 14th, 2008, 4:20 am

i haven't done extensive tests but I reckon that JoeKuo D7 are the best. In one test the order of convergences were as followsMersenne 0.5Jackel 0.68JoeKuoD7 0.72The biggest advantage seems to be in the robustness -- even if you do a poor job of allocating variates the convergence is good. This was for pricing a TARN in the LIBOR market model.
Last edited by mj on June 13th, 2008, 10:00 pm, edited 1 time in total.
 
User avatar
AvH
Posts: 21
Joined: March 3rd, 2008, 11:45 am

I have a c code for Sobol sequence generation

June 20th, 2008, 7:33 pm

Ok thanks: that is pretty clear ... since it might indeed be hard to align the variates, JoeKuo07 might indeed be the better option if these results hold in general.
 
User avatar
Dostoevsky
Posts: 80
Joined: August 13th, 2001, 12:59 pm

I have a c code for Sobol sequence generation

October 12th, 2014, 11:04 am

Quotei haven't done extensive tests but I reckon that JoeKuo D7 are the best. For comparison of various Sobol' sequence generators used in the industry ( including Joe&Kuo ) read I. Sobol', D. Asotsky, A. Kreinin, S. Kucherenko. Construction and Comparison of High-Dimensional Sobol' Generators, 2011, Wilmott Journal, Nov, pp. 64-79 hereand the winner is.. I am afraid it's not Joe&Kuo
Last edited by Dostoevsky on October 12th, 2014, 10:00 pm, edited 1 time in total.
 
User avatar
Dostoevsky
Posts: 80
Joined: August 13th, 2001, 12:59 pm

I have a c code for Sobol sequence generation

October 12th, 2014, 12:24 pm

Difficult to tell why there is a saturation for many SobolSeq generators at low dimensions ( Dim = 8 ) at Fig. 1. I would be interested to see other similar comparisons with other discrepancy measures ( not just 0.0 anchored L2 discrepancy ).
 
User avatar
mj
Posts: 3449
Joined: December 20th, 2001, 12:32 pm

I have a c code for Sobol sequence generation

October 14th, 2014, 10:12 pm

have done any tests for the LMM? eg a TARN cf the examples in More Mathematical Finance.Are the Sobol 16384 numbers available? it would be good to get them in QuantLibNB Joe and Kuo corrected their numbers at some point. I think the ones in QuantLib are the pre-correction ones.
 
User avatar
Dostoevsky
Posts: 80
Joined: August 13th, 2001, 12:59 pm

I have a c code for Sobol sequence generation

October 15th, 2014, 8:37 am

Quotehave done any tests for the LMM? eg a TARN cf the examples in More Mathematical Finance.No, we haven't done such tests but we would like to do them. Would you be interested in doing them together ?With colleagues we've done recently a work ( Marco Bianchetti, Sergei Kucherenko, Stefano Scoleri, Better Pricing and Risk Management with High Dimensional Quasi Monte Carlo, WBS 10th Fixed Income Conference, Barcelona , September, 2014) on application of QMC using SobolSeq16384 for computing market and counterparty risk measures of derivatives? portfolios in high dimensions and we've got a dramatic acceleration in comparison with MC but it's another topic. We are still working on explanation why there problemshave low effective dimensions. QuoteAre the Sobol 16384 numbers available? it would be good to get them in QuantLibBoth SobolSeq16384 and SobolSeq32000 ( max dim 32000 ) from BRODA are commercial but we can discuss the terms on including them in QuantLib. QuoteNB Joe and Kuo corrected their numbers at some point. I think the ones in QuantLib are the pre-correction onesWe did these tests I believe after Joe and Kuo corrected their numbers but I'll double check that. I showed the results to Francis Kuo and she was going to look into the details of the comparison but nothing has happened so far...
 
User avatar
pimpel
Posts: 363
Joined: May 12th, 2006, 5:26 pm
Location: Warsaw

I have a c code for Sobol sequence generation

October 16th, 2014, 7:42 am

For those interested in Java implementation, Joe&Kuo is available in Apach Commons Math:https://commons.apache.org/proper/commo ... rator.html
 
User avatar
DevonFangs
Posts: 3004
Joined: November 9th, 2009, 1:49 pm

I have a c code for Sobol sequence generation

October 16th, 2014, 4:05 pm

QuoteOriginally posted by: DostoevskyQuotehave done any tests for the LMM? eg a TARN cf the examples in More Mathematical Finance.No, we haven't done such tests but we would like to do them. Would you be interested in doing them together ?With colleagues we've done recently a work I saw bianchetti at global deriv this year presenting this. Would be interesting to pin down exactly the cases where the brownian bridge discretisation works less well than the standard one (you claim cliquets?) as basically I've always found sobol unusable without bb. Also, have you tried the spectral construction of the wiener process? Should probably be similar to bb, I guess.
 
User avatar
Dostoevsky
Posts: 80
Joined: August 13th, 2001, 12:59 pm

I have a c code for Sobol sequence generation

October 16th, 2014, 4:53 pm

Quote Would be interesting to pin down exactly the cases where the brownian bridge discretisation works less well than the standard one (you claim cliquets?) as basically I've always found sobol unusable without bb. Also, have you tried the spectral construction of the wiener process? Should probably be similar to bb, I guess.Yes, cliquets. Computation of effective dimensions in our paper shows why. Papageorgiou ( "The Brownian Bridge Does Not Offer a Consistent Advantage in Quasi-Monte Carlo Integration" ) showed that for ratchet options BB is not better than Standard. Yes, the spectral construction should be similar to BB.
Last edited by Dostoevsky on October 15th, 2014, 10:00 pm, edited 1 time in total.
ABOUT WILMOTT

PW by JB

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...


Twitter LinkedIn Instagram

JOBS BOARD

JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...


GZIP: On