SERVING THE QUANTITATIVE FINANCE COMMUNITY

  • 1
  • 2
  • 3
  • 4
  • 5
  • 18
 
User avatar
renorm
Posts: 886
Joined: February 11th, 2010, 10:20 pm

The ultimate Monte Carlo framework

October 6th, 2011, 12:56 am

CPU dispatching not used. Users can add CPU specific flags to their make file, but in my experience it doesn't make much difference.First, a big chunk of heavy duty number crunching is delegated to optimized libs. I think both MKL and ACML do CPU dispatching internally.Second, I observed that straightforward SIMD implementation doesn't benefit much from CPU specific optimizations beyond "-O2 -mss2".
 
User avatar
Polter
Posts: 2526
Joined: April 29th, 2008, 4:55 pm

The ultimate Monte Carlo framework

October 6th, 2011, 1:15 am

renorm: a question regarding "the ability to gracefully fall back to SIMD=1" -- what's the mechanism that determines the decision whether to use "a scalar version (that is simpler implementation with SIMD=1)"?
 
User avatar
madmax
Posts: 1093
Joined: October 31st, 2003, 9:56 am

The ultimate Monte Carlo framework

October 6th, 2011, 7:05 am

QuoteOriginally posted by: AlanQuoteOriginally posted by: madmaxQuoteOriginally posted by: AlanI think there are some nice commercial possibilities with the Monte Carlo that should be considered.For example, say the library painlessly supports a remote connection to a GPU server, and some company provides the serverat some reasonable hourly rate. Something like this, but I compile the C/C++I would use it. Anyway, treat it as a feature request.Amazon's EC2 has GPU instances. Also, there is Penguin On Demand without virtualization, higher specs.Thanks. Is there a tutorial somewhere for dummies on Windows, say with Visual Studio, showing how to create such AWS GPU instances and link a CUDA C/C++ program to them?I think at the moment AWS GPU instances are Linux only.
 
User avatar
madmax
Posts: 1093
Joined: October 31st, 2003, 9:56 am

The ultimate Monte Carlo framework

October 6th, 2011, 7:15 am

I stand corrected, it seems they introduced Windows instances with GPU in middle of last month.I will check it out over the week-end and report back.
 
User avatar
FinancialAlex
Posts: 81
Joined: April 11th, 2005, 10:34 pm

The ultimate Monte Carlo framework

October 7th, 2011, 4:54 am

One other possibility for great speed improvement is to compute Monte Carlo Greeks using adjoint methodology combined with automatic differentiation. As soon as there is a tested framework for Monte Carlo Greeks, I can contribute by trying to obtain an adjoint automatic differentiation implementation of original code.
 
User avatar
FinancialAlex
Posts: 81
Joined: April 11th, 2005, 10:34 pm

The ultimate Monte Carlo framework

October 19th, 2011, 6:35 am

It would be also useful to have multilevel approach implemented in Monte Carlo library. It is very powerful (convergence speedup by one or more orders of magnitude) and generic enough to be considered.For more on this topic one can study the papers written by Mike Giles and collaborators and described here
 
User avatar
Cuchulainn
Posts: 59705
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

The ultimate Monte Carlo framework

October 19th, 2011, 6:42 am

QuoteOriginally posted by: FinancialAlexIt would be also useful to have multilevel approach implemented in Monte Carlo library. It is very powerful (convergence speedup by one or more orders of magnitude) and generic enough to be considered.For more on this topic one can study the papers written by Mike Giles and collaborators and described hereI have a software architecture based on domain architectures, patterns and Boost that I am writing up and can try to use it to accommodate bespoke MC functionality. The basic design is described in chap 0 of the book by Kienitz and myself but we wish to extend it to n-factor cases. In order to satisfy all domain and s/w requiremnents, I think you will need to address the problem at 2 levels:A. Technology-independentDecompose system into cohesive, loosely coupled subsystems; determine inter-system services.B. Technology-dependentMap subsystems and services to a particular s/w paradigm (OOP, GP) and technology (C++, boost, C#, Matlab). Regarding authors of MC s/w, a requirement is that you can give a black box I/O description of your modules, ideally at both A and B levels.
Last edited by Cuchulainn on October 18th, 2011, 10:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 59705
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

The ultimate Monte Carlo framework

October 19th, 2011, 12:48 pm

The basic architecture is shown here for the 1-factor case (DUKIChapter0.pdf, figures 0.1, 0.2, 0.3).
 
User avatar
Cuchulainn
Posts: 59705
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

The ultimate Monte Carlo framework

October 23rd, 2011, 10:58 am

Can someone draw up a list of features that MC system should support? Ideally, a requirements document.
Last edited by Cuchulainn on October 22nd, 2011, 10:00 pm, edited 1 time in total.
 
User avatar
Alan
Posts: 9785
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

The ultimate Monte Carlo framework

November 15th, 2011, 7:21 pm

A current discussion in the Student Forum suggests one:1. If the Monte Carlo problem being solved has one or more continuously observed barriers, the MC method should allow for an optional (local) Brownian Bridge barrier-crossing test,if that is compatible with the process evolution. Compatible processes includeall diffusions: BM, GBM, local volatility, and any stochastic volatility process. (If there are underlying price jumps, this needs more thought). There are various test problems for this (models with both a barrier and exact solns): 1-factor: (i) GBM with one or two barriers; (ii) CEV model with one barrier.2-factor: (i) Heston double barrier with rho=0 and no cost-of-carry; (ii) SABR hitting of S=0 (beta=0)
Last edited by Alan on November 14th, 2011, 11:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 59705
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

The ultimate Monte Carlo framework

November 17th, 2011, 6:38 am

QuoteOriginally posted by: DevonFangsHey all.This thread is aimed at collecting ideas about the Monte Carlo framework we are going to adopt. Guru renorm recently offered to share his code, so we could also start a discussion on that when it comes.I suggest also we have a look at the framework currently implemented in Quantlib -- even if to make it parallel we're probably going towards something quite different.This thread till now has focused mostly on the tools to implement an MC Engine. But the scope of the engine and the requirements have yet to be agreed upon. renorm, quartz,any input? If we wish to have a customisable and effiicent (multi-threaded?) engine then a component-based design using patterns and the higher-order functions in Boost (especially signals(2)) should be used instead of Observer. As renom has noted, this is 10 times slower than his own serial code. Parallel and current OO approach will be messy and probably unworkable, so a more task or data-driven driven design is needed imo.I see two roles here; the algo builder and the software designer/architect who integrates the algo into the engine.I have a reference design in C++ that we could use as initial benchmark. We could use C++ 11 Random (boost) in this version?
Last edited by Cuchulainn on November 16th, 2011, 11:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 59705
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

The ultimate Monte Carlo framework

November 17th, 2011, 12:58 pm

QuoteIs there a need for using signals over a simple template with an agreed interface?Absolutely!With signals you can configure the engine to suit any user needs. I have written an article November Wilmott 2011 on this very topic by creating a BS pricer that gets it data from a slot.In general, I now know how to design these loosely coupled systems using signals and integrate them with s/w architectures. Robert and myself have even mapped GOF and POSA patterns to signals, e.g. Observer. And they can be run as is.
Last edited by Cuchulainn on November 16th, 2011, 11: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