Serving the Quantitative Finance Community

 
User avatar
Cuchulainn
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

The ultimate Monte Carlo framework

January 18th, 2012, 8:53 am

QuoteOriginally posted by: outrunQuoteOriginally posted by: CuchulainnQuoteOriginally posted by: outrunGood! You feed the path to the black box? Can it be a function or functor? And does the result of that black box get fed as input to some sort of result aggregator ?Yes, on all counts. It is just a function signature (no OOP class hierarchy needed).That sounds perfect!I just love not having to define pointers to base classes edit: funny thing is, I need to write some less than optimal code to see my way forward and then the penny drops.
Last edited by Cuchulainn on January 17th, 2012, 11:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

The ultimate Monte Carlo framework

January 18th, 2012, 9:11 am

QuoteOriginally posted by: outrunQuoteOriginally posted by: Cuchulainnedit: funny thing is, I need to write some less than optimal code to see my way forward and then the penny drops.You're doing a good thing with short release cycles instead of getting anal and frozen on detail! I'm going to try that too.I employ the Spiral Model; I like the kind of numbers-based input for challenging examples (like Alan's CIR SDE). level 1: new bottom-up code to test the ARCH modellevel 2: top-down. Modify the model if/when the results from 1 show where it needs to modified
Last edited by Cuchulainn on January 17th, 2012, 11:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

The ultimate Monte Carlo framework

January 19th, 2012, 7:46 pm

QuoteA number of years ago, we talked about creating a buffered serial RNG that created and buffered RNs for use by parallel path/price calculators. One processor core would spend up to 100% of it's time creating RNs and storing them. A second dispatch process would deal the buffered FIFO buffer of RNs to the N-1 cores that consume RNs. As long as one core can create enough RNs to feed N-1 cores of path, price, and aggregation calculations, then the approach would be efficient. And here is the prototype; at some stage we can monitor arrival and service rates and get a finely-tuned load balance.
Last edited by Cuchulainn on January 18th, 2012, 11:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

The ultimate Monte Carlo framework

January 19th, 2012, 8:15 pm

QuoteOriginally posted by: outrunCool.hoe does it work? I see multiple random number generators in parallel, multiple MCSolvers? How are things linked (the data-flow)?TPL data flowI can post the code if you like to play with. It works pretty well. the queue is safe + it has built-in wait/notify synch stuff. It's very easy to use.Robert helped me with the join and stop code at the end.Do you have VS2010?
Last edited by Cuchulainn on January 18th, 2012, 11:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

The ultimate Monte Carlo framework

January 20th, 2012, 11:12 am

Unfortuntely, Boost has no libs for concurrent containers nor parallel design. So1. Make your own (it's 2012)2. Use PPL, TPL, MKL etc.3. .. PPL QuoteTPL v.s. boost threadTPL/PPL have patterns; Boost thread not. Huge gap.
Last edited by Cuchulainn on January 19th, 2012, 11:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

The ultimate Monte Carlo framework

January 20th, 2012, 12:29 pm

QuoteOriginally posted by: outrunThat makes sense (build a container free MC engine ).. But not now (for me) ! boost thread as a basis would probably be the most platform portable approach.But the perfomance would probably not be optimal and it is not shipping.
 
User avatar
Cuchulainn
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

The ultimate Monte Carlo framework

January 20th, 2012, 1:52 pm

Quoteand I guess there is demand for a homogenous / cross-platform C++ version running on Linux (and windows).For the desktop quants, my guess is Windows/VS is dominant (let us not forget Excel).
Last edited by Cuchulainn on January 19th, 2012, 11:00 pm, edited 1 time in total.