Take the 2-minute tour ×
Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. It's 100% free, no registration required.

At the moment I am running a Quad Core Xeon PC with 12GB of RAM doing crude MC with 10k scenarios and 1000 time steps. And using fminsearch for calibration, and it takes about half an hour to an hour to do the work.

Now, assuming MC is the only possible way for doing so (I know there are other ways from the post here, thanks to the great people at StackExchange: Other means of calibrating Heston models), is there any way I can speed this up a little? I am already using Matlabpool open for parallel computing and I would like my code to be flexible enough so that I can still run other alternatives of the Heston model (say Chan model) which does not have an easy analytical solution.

Thanks!

share|improve this question
1  
You could use the GPU, but I guess that's overkill in your situation. What to improve depends on where you are. –  Bob Jansen Jun 18 '13 at 5:37
1  
GPU is a good deal and even better you can still using matlab do deal with it OpenCL toolbox for Matlab –  Clebson Derivan Jun 18 '13 at 13:02
    
@ClebsonDerivan I'll take a look at it, thanks for your help! –  AZhu Jun 19 '13 at 17:46
add comment

1 Answer

up vote 1 down vote accepted

Different optimizations could help.

  • Parallel computing makes even worse if each computation is fast enough due to overhead. Thus it may be better to use profiler to get what can be improved. Usually it helps to send larger problems to parallel computation cores.

  • Matlab is very good at matrix operations and it could be better to treat different draws of MC as one matrix if possible. Returning to first point this multiple scenarios in one matrix can be sent for parallel computing and improve performance.

  • The main principles: use less memory allocation operations and less calls for parallel computation. Sometimes it is even faster to run several intances of nonparallel code than using parallel computation on different matlabpool cores.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.