Serving the Quantitative Finance Community

 
User avatar
outrun
Posts: 4573
Joined: January 1st, 1970, 12:00 am

Re: Using Quantlib

December 21st, 2017, 12:59 pm

 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?
 
User avatar
Billy7
Posts: 262
Joined: March 30th, 2016, 2:12 pm

Re: Using Quantlib

December 21st, 2017, 1:04 pm

 
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.
 
User avatar
Cuchulainn
Topic Author
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Using Quantlib

December 21st, 2017, 1:57 pm

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, 
 
User avatar
Cuchulainn
Topic Author
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Using Quantlib

December 21st, 2017, 2:00 pm

 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.
 
User avatar
Cuchulainn
Topic Author
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Using Quantlib

December 21st, 2017, 2:01 pm

 
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"?
 
User avatar
Billy7
Posts: 262
Joined: March 30th, 2016, 2:12 pm

Re: Using Quantlib

December 21st, 2017, 2:05 pm

 
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" :-)
 
User avatar
Cuchulainn
Topic Author
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Using Quantlib

December 21st, 2017, 2:14 pm

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.
Last edited by Cuchulainn on December 21st, 2017, 2:50 pm, edited 1 time in total.
 
User avatar
Billy7
Posts: 262
Joined: March 30th, 2016, 2:12 pm

Re: Using Quantlib

December 21st, 2017, 2:16 pm

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.
 
User avatar
Cuchulainn
Topic Author
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Using Quantlib

December 21st, 2017, 2:53 pm

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.
 
User avatar
Cuchulainn
Topic Author
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Using Quantlib

December 21st, 2017, 3:49 pm

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.
 
User avatar
outrun
Posts: 4573
Joined: January 1st, 1970, 12:00 am

Re: Using Quantlib

December 21st, 2017, 3:55 pm

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.
 
User avatar
Cuchulainn
Topic Author
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Using Quantlib

December 21st, 2017, 3:56 pm

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.
?
 
User avatar
outrun
Posts: 4573
Joined: January 1st, 1970, 12:00 am

Re: Using Quantlib

December 21st, 2017, 4:11 pm

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.
 
User avatar
Cuchulainn
Topic Author
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Using Quantlib

December 21st, 2017, 4:26 pm

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.
 
User avatar
outrun
Posts: 4573
Joined: January 1st, 1970, 12:00 am

Re: Using Quantlib

December 21st, 2017, 4:33 pm

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?