SERVING THE QUANTITATIVE FINANCE COMMUNITY

 
User avatar
Cuchulainn
Posts: 59088
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

The ultimate Monte Carlo framework

October 13th, 2012, 8:52 am

QuoteOriginally posted by: outrunIt's not ambitions: all I'm saying is put things where they belong, group them, and make code that works on all element in a group.Eg I would try to glue a SDE, numerical discretization scheme and payoff together into something that that has the same interface as a random distribution: just like you can sample a Gamma distribution with a random engine, you would sample a payoff.The benefit is that the code is reusable in other contexts outside this framework.I agree completely. But how can I do this? The problem is there are deeply nested and dependent assemblies to configure in MC1. (and all large systems for that matter). It's all about interfaces IMO.And I suspect no one has done at the level Milo is at. Again, it's an open issue IMO. Maybe C++ was built for speed not for comfort??Random is OK but too small to serve as an exemplar.The closest I have seen is Signals' template parameters. In general, you won't get it mathematically water-tight, because of parameters, eg. FDM<double, SDE<int>>, ouch.
Last edited by Cuchulainn on October 12th, 2012, 10:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 59088
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

The ultimate Monte Carlo framework

October 13th, 2012, 9:29 am

IMO the crux here is that C++ does not have run-time Reflection. All attempts to emulate it will be less than optimal. Compare with C# dynamic
Last edited by Cuchulainn on October 12th, 2012, 10:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 59088
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

The ultimate Monte Carlo framework

October 13th, 2012, 10:48 am

To be honest, I don't have a mental model, technique or defined process. What I would like is 'uit de mouw schudden', i.e. an automatisme. QuoteSo you're saying that we can't fix the interfaces yet in the design? No. Interfaces are no problem. It's the configuration that's difficult.
Last edited by Cuchulainn on October 12th, 2012, 10:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 59088
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

The ultimate Monte Carlo framework

October 18th, 2012, 4:42 pm

I have been thinking a bit about this but I think native C++ is not up the job because it is a "Dynamic Configuration Problem" (yes?). Basically, we are missing Reflection in C++.One solution is to use COM/ATL components with standardised interfaces in .dlls that can be dynamically loaded. Works on Windows.I only see one other solution using subtype polymorphism but it has no dynamic loading.Generics and TMP are not an obvious solution IMO. One good counterexample will dispel any doubts.
Last edited by Cuchulainn on October 17th, 2012, 10:00 pm, edited 1 time in total.
 
User avatar
Polter
Posts: 2526
Joined: April 29th, 2008, 4:55 pm

The ultimate Monte Carlo framework

October 19th, 2012, 1:08 am

Cuch, if you need it, take a look: http://www.cpgf.org/ // in case you have any questions: http://www.cpgf.org/support.htmlOn a side note, I have an impression (perhaps wrong) of this discussion being a bit vague at the moment, it would be nice to see an example of where or how this "Dynamic Configuration Problem" is an issue more precisely. Just thinking out loud... perhaps several iterations of throw-away code (subject to complete redesign / total rewrite) / software prototyping approach could be more illustrative than a relatively codeless considerations / BDUF approach?
 
User avatar
Cuchulainn
Posts: 59088
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

The ultimate Monte Carlo framework

October 19th, 2012, 6:29 am

I think programming languages are too constricting. Ideally, ADL would free things up.The requirements of the problem are clear but too general. edit: as maths would say: this is an open problem?
Last edited by Cuchulainn on October 18th, 2012, 10:00 pm, edited 1 time in total.
 
User avatar
MiloRambaldi
Posts: 273
Joined: July 26th, 2010, 12:27 am

The ultimate Monte Carlo framework

October 19th, 2012, 3:40 pm

QuoteOriginally posted by: outrunMilo: Just look at e.g. random engine concept. It should provide amongst other things an operator() -i.e. it's conforming to an interface-. Then you write a function template or class template that works with all engine types (the template parameter) because it uses the operator() that all engine types provide. Simple, orthogonal, well defined.This is not relevant to the problem at hand ...QuoteThe cartesian idea sounds very wrong, *and* there is no need for a base class to implement a standard interface or concept either. Those ideas are unnecessary bloat / design freaking.Yes, my point is exactly that we should not need a common abstract base class, but the question is how to handle the type explosion without them. I will clarify in further posts ...
 
User avatar
MiloRambaldi
Posts: 273
Joined: July 26th, 2010, 12:27 am

The ultimate Monte Carlo framework

October 19th, 2012, 5:12 pm

QuoteOriginally posted by: CuchulainnI have not seen any papers/books/people on this so I doubt if it has been done/can be done.QuoteAnd I suspect no one has done at the level Milo is at.I would be very surprised that this has not been done, because it seems like such a standard design issue.It would also be very surprising if I have exceeded everyone else here, since I am still a beginner at TMP.However, if my solution (I do believe I have one) really is original then perhaps a paper should be written ...
 
User avatar
MiloRambaldi
Posts: 273
Joined: July 26th, 2010, 12:27 am

The ultimate Monte Carlo framework

October 19th, 2012, 5:14 pm

QuoteOriginally posted by: outrunI'm also having a problem understand the DCP (dynamic configuration problem) issue. An example would indeed be welcome! So it's a specific runtime instead of compiletime configuration issue?Yes. It is actually a sub-problem of the configuration issue (at least that is what I have been talking about). I already have written a simple prototype, as Polter has suggested. I will post it soon, probably tomorrow.
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