Page 10 of 13

Re: Using Quantlib

Posted: December 21st, 2017, 12:59 pm
by outrun
 He answers approx one in 20 questions.
That's way above average for these lads. 

BTW QL has Ziggurat in an experimental directory. Don't know why because Boost uses it in boost::notmal_distribution.
maybe there already before 1.57.. or to cut dependencies on other frameworks like boost?

Re: Using Quantlib

Posted: December 21st, 2017, 1:04 pm
by Billy7
 
BTW QL has Ziggurat in an experimental directory. Don't know why because Boost uses it in boost::notmal_distribution.
Why shouldn't Boost use it there. It is about normal distribution specifically.

Re: Using Quantlib

Posted: December 21st, 2017, 1:57 pm
by Cuchulainn
Did another test (E, F) in the background with NSIM = 10^7.

Price Boost: 5.84455,
Price C++11: 5.84455,
 
Price Boost: 5.84549,
Price C++11: 5.84549,
 
Price Boost: 5.84777,
Price C++11: 5.84777,
 
Price Boost: 5.84955,
Price C++11: 5.84955,
 
Price Boost: 5.84874,
Price C++11: 5.84874,
 
Price Boost: 5.84607,
Price C++11: 5.84607,
 
Price Boost: 5.84592,
Price C++11: 5.84592,
 
Price Boost: 5.84628,
Price C++11: 5.84628, 

Re: Using Quantlib

Posted: December 21st, 2017, 2:00 pm
by Cuchulainn
 He answers approx one in 20 questions.
That's way above average for these lads. 

BTW QL has Ziggurat in an experimental directory. Don't know why because Boost uses it in boost::notmal_distribution.
maybe there already before 1.57.. or to cut dependencies on other frameworks like boost?
Maybe. I only have >= 1.59 on my system.

Re: Using Quantlib

Posted: December 21st, 2017, 2:01 pm
by Cuchulainn
 
BTW QL has Ziggurat in an experimental directory. Don't know why because Boost uses it in boost::notmal_distribution.
Why shouldn't Boost use it there. It is about normal distribution specifically.
Sorry, what's  "it there"?

Re: Using Quantlib

Posted: December 21st, 2017, 2:05 pm
by Billy7
 
BTW QL has Ziggurat in an experimental directory. Don't know why because Boost uses it in boost::notmal_distribution.
Why shouldn't Boost use it there. It is about normal distribution specifically.
Sorry, what's  "it there"?
Cuch wrote: " QL has Ziggurat in an experimental directory. Don't know why because Boost uses it in boost::notmal_distribution" :-)

Re: Using Quantlib

Posted: December 21st, 2017, 2:14 pm
by Cuchulainn
Why shouldn't Boost use it there. It is about normal distribution specifically.
Sorry, what's  "it there"?
Cuch wrote: " QL has Ziggurat in an experimental directory. Don't know why because Boost uses it in boost::notmal_distribution" :-)
What I was trying to say was both Boost and QL implement Ziggurat. QL code is more compact on inspection and let coupling.

Re: Using Quantlib

Posted: December 21st, 2017, 2:16 pm
by Billy7
Duh...I just realised I had read the above as "Don't know why Boost uses it ", without the "because". That's what happens when you do 3-4 things at the same time. I still don't understand why you are wondering about QL having it in experimental (probably because they haven't had time to test it properly yet). EDIT: Oh I see, you're saying why bother implementing altogether since Boost has it and QL uses Boost. Maybe QL had implemented it in Experimental before Boost added it.

Re: Using Quantlib

Posted: December 21st, 2017, 2:53 pm
by Cuchulainn
Duh...I just realised I had read the above as "Don't know why Boost uses it ", without the "because". That's what happens when you do 3-4 things at the same time. I still don't understand why you are wondering about QL having it in experimental (probably because they haven't had time to test it properly yet). EDIT: Oh I see, you're saying why bother implementing altogether since Boost has it and QL uses Boost. Maybe QL had implemented it in Experimental before Boost added it.
:)
I'm glad I did not put kommas in there.

Re: Using Quantlib

Posted: December 21st, 2017, 3:49 pm
by Cuchulainn
BTW Boost use Ziggy stardust since 1.59. I suppose it is more intensive than MT?
This is confusing. The Ziggurat takes a uniform variate (provided by some RNG like MT) and turns it into a normal variate.
MT is an RNG. Unless of course you mean something else by MT other than Mersenne Twister?
I mean: the amount of computational effort to compute a rng versus computing N(0,1).
They I select the best combi e.g. Boost MT with C++ Normal, whatever.

MT and N() are orhogonal, of cousse.

Re: Using Quantlib

Posted: December 21st, 2017, 3:55 pm
by outrun
Why would you need to know the relative time between the two concepts?

You can time engines and distributions individually, there is no dependency in computational effort between the two.

Re: Using Quantlib

Posted: December 21st, 2017, 3:56 pm
by Cuchulainn
Why would you need to know the relative time between the two concepts?

You can time engines and distributions individually, there is no dependency in computational effort between the two.
I select the best combi e.g. Boost MT with C++ Normal, whatever.
?

Re: Using Quantlib

Posted: December 21st, 2017, 4:11 pm
by outrun
Why would you need to know the relative time between the two concepts?

You can time engines and distributions individually, there is no dependency in computational effort between the two.
I select the best combi e.g. Boost MT with C++ Normal, whatever.
?
Yes I understand. So you can time the various MTs, pick the fastest, then time the various normal_distributions, pick the faster.. there is no cross term when you combine them.

Re: Using Quantlib

Posted: December 21st, 2017, 4:26 pm
by Cuchulainn
Why would you need to know the relative time between the two concepts?

You can time engines and distributions individually, there is no dependency in computational effort between the two.
I select the best combi e.g. Boost MT with C++ Normal, whatever.
?
Yes I understand. So you can time the various MTs,  pick the fastest, then time the various normal_distributions, pick the faster.. there is no cross term when you combine them.
Yes, that's the emerging aha erlebnis. We are not forced to use _solely_ Boost or C++11.

Re: Using Quantlib

Posted: December 21st, 2017, 4:33 pm
by outrun
I select the best combi e.g. Boost MT with C++ Normal, whatever.
?
Yes I understand. So you can time the various MTs,  pick the fastest, then time the various normal_distributions, pick the faster.. there is no cross term when you combine them.
Yes, that's the emerging aha erlebnis. We are not forced to use _solely_ Boost or C++11.
As long as you stick to C++11 conforming concepts. QL has an MT, right? But can you use it with xxx::normal_distribution?