Multithreaded and High-Performance Computing for Monte Carlo and Finite Difference Methods
Saying that software is vitally important for applications in Quantitative Finance should come as no surprise to most people. The software industry has grown at an amazing pace since the early 1950’s and 1960’s. No longer do we need to develop applications using punch cards, paper tape and other devices but since a number of years we have had access to powerful desktop machines and modern software tools. The performance of hardware and network communications has been increasing at a phenomenal rate and this situation is likely to continue in the coming years. However, we believe that the underlying paradigms will need to change if we wish to develop larger, faster and more reliable software systems. We are witnessing some new and important developments in the related areas of software and hardware systems for application development and they will undoubtedly influence the course of software development projects for Quantitative Finance in the coming years. First, not only are ‘sequential’ desktop computers becoming more powerful but in the not-too-distant future we shall witness the entry of multi-core computers, that is computers with several CPUs on one chip. This means that multi-threaded and shared memory applications are just around the corner as it were. This is a form of fine-grained parallelism. Second, high performance computing (HPC) methods are slowly becoming more popular in mainstream developing environments. Once belonging to the realm of rocket scientists and scientific researchers, HPC is now becoming an attractive solution for several numerical problems and applications in Quantitative Finance, for example Monte Carlo simulation, Finite Difference and Finite Volume methods and high-frequency data acquisition and analysis applications. In particular, the de-facto Message Passing Interface (MPI) library can be used to implement coarse-grained parallel applications in languages such as Fortran and C++. Finally – and perhaps crucially – software engineering is maturing to the stage where we can design and implement larger systems than in the past. In particular, the slow acceptance of design and system patterns, architectural styles and domain architectures seems to imply that developers are attempting to learn design principles before they start programming. The advantages for Quantitative Finance are:
. Performance: a multi-threaded or parallel program – if properly designed and implemented – runs faster than a single-processor program. For example, a Monte Carlo simulation on an 8-processor machine is typically 10 times faster than the same program on a single processor machine
. Accuracy: this requirement has to do with a program giving desired or correct results. A parallel program can be designed in such a way that it produces – or is able to produce – more accurate results than a sequential machine in a given amount of time. A good example is the use of domain decomposition techniques for FDM
These advantages come at a cost, however. The definition of ‘developer’ will need to be deepened and extended. Prediction is difficult (especially the future) but a precondition for success in this new paradigm is the emergence of two major functions; first, the architect who has a good knowledge of Quantitative Finance and who can translate the problem domain to a high-level architecture and second – for want of a better word – the HPC developer who can design, implement and fine-tune a HPC solution that satisfies all the given requirements.
The trend is somewhat similar to what we see in other disciplines; first analyse and design the problem, then implement the solution. I prefer to pay an architect to create a CAD drawing of a house before I order 50,000 bricks and 10,000 roof slates.
Caveat: Prediction is difficult
// Here is some response from a reader I have read you latest blog about multiCPU chips. Small problem - they are not around the corner - they are widely available now. You can buy 2 cpu desktop from Dell for about $800. They have 4 cpu servers available for just little bit more. Both Intel and AMD produce these chips. The big advantage is that they use less power, and therefore require less cooling. The ones from AMD are supposed to have slightly better memory management. The servers come in flat pizza like boxes so you can stack up as many of them as you want. Our Dell rep told us last week that one of their customers is building one that will likely be on the 100 most powerful list.
Have a look at: http://www.top500.org/list/2006/06/100 #26, #27, #28 are what you are talking about in your blog.


