Commodity Futures Curve Interpolation – Parallel Matlab

Matlab 2010a has been recently released, and finally the student version has the Parallel Computing Toolbox available for purchase as an option. I’ve been waiting to play with this for several years.

I document in the PDF below my initial experiments with the toolbox. Specifically, I look into a simple, parallelizable task, that of interpolating commodity futures curves, when we often want to interpolate many days’ curves. Each can be processed independently of the others.

I document a basic way of parallelising this algorithm in Matlab, what kind of speedups to expect using the ‘parfor’ syntax, and the risk of significant slowdown if care is not taken.

I also manage to make the software completely backwards compatible, so it can be shared with those who don’t have the parallel computing toolbox.

Finally, I show a way of making intelligent libraries. For small sized problems, they will execute in serial, because the parallel method imposes big overheads. For larger problem sizes, they will switch to parallel mode.

The PDF includes all the nececessary Matlab software (‘codes’) for others to duplicates these results.

Any comments would be very welcome. I am going to be using the parallel features of Matlab more in coming weeks. It’s good practise, as we seem mainstream 4, 8 and soon 12 core desktops. I have also been experimenting with using CUDA on Matlab, and can recommend the ‘gp-you’ toolbox, which makes CUDA on Matlab easy to learn. It’s yet to be a full-power toolbox though, and is missing things like random number generation on the GPU, essential for monte-carlo simulations.

Download full article (PDF)

Advertisements

One Response to Commodity Futures Curve Interpolation – Parallel Matlab

  1. Nice post… Good to hear that PCT is now available with the student version of MATLAB. You mention GPUs in the post and just wanted to point you to Jacket (http://www.accelereyes.com). It has random number generation, gfor for parallel loops on the GPU, and many other things that are applicable for your financial analysis. And there is a $100 student version available which includes all those features, so it might be something of interest to you. BTW, check out the recent article in AutomatedTrader about Jacket: http://www.automatedtrader.net/articles/software-review/31723/matlabs-racing-jacket (requires subscription)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: