Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
Klaus Spanderen
E.ON Global Commodities
November 14, 2013
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
Beyond Simple Monte-Carlo: Parallel Computing with QuantLib Klaus - - PowerPoint PPT Presentation
Beyond Simple Monte-Carlo: Parallel Computing with QuantLib Klaus Spanderen E.ON Global Commodities November 14, 2013 Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib Symmetric Multi-Processing Graphical Processing
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
# Processes GFlops
0.5 1 2 5 10 20 50 1 2 4 8 16 32 64 128 256
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
◮ Joesph Wang is working with Open Multi-Processing
◮ Situation is not too bad as long as objects are not shared
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
◮ QuantLib enforces that all observers are instantiated as boost
◮ The preprocessor directive
◮ if the shared object is an observer then use the thread-safe
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
◮ cuSPARSE: basic linear algebra subroutines used for sparse
◮ cusp: general template library for sparse iterative solvers.
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
2 4 6 8 10 12 14
Heston−Hull−White Model: GTX560 vs. Core i7
Speed−Up GPU vs CPU 20x50x20x10 20x50x20x20 50x100x50x10 50x100x50x20 50x200x100x10 50x200x100x20 50x400x100x20 Grid Size (t,x,v,r) GPU single precision GPU double precision
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
5 10 15 20
Heston Model: GTX560 vs. Core i7
Speed−Up GPU vs CPU 50x200x100 100x200x100 100x500x100 100x500x200 100x1000x500 100x2000x500 100x2000x1000 Grid Size (t, x, v) GPU single precision GPU double precision
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
1 5 10 50 100 500 1000
GTX560@0.8/1.6GHz vs. Core i5@3.0Ghz
Grid Size (x,y,u,s) Calculation Time
20x20x10x6 40x20x20x6 80x40x20x6 100x50x40x6
GPU BiCGStab+nonsym Bridson GPU BiCGStab GPU BicgStab+Diag CPU Douglas Scheme CPU BiCGStab+Tridiag Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
Accelerating Exotic Option Pricing and Model Calibration Using GPUs, Bernemann et al in High Performance Computational Finance (WHPCF), 2010, IEEE Workshop on, pages 17, Nov. 2010.
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
40 60 80 Sobol Brownian Bridge GPU vs CPU Path Lengths Speed−up GPU vs CPU 101 102 103 104
single precision, four factors double precision, one factor
Comparison GPU (GTX 560@0.8/1.6Ghz) vs. CPU (i5@3.0GHz)
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
RMSE for a benchmark portfolio of Asian options.
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
Parallel Heston−Hull−White Calibration on 2x4 Cores
#Processes Speed−up 1 2 4 8 16 1 2 3 4 5 6 Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib
◮ Do not share QuantLib objects between different threads. ◮ Working solution for languages with parallel garbage collector.
Klaus Spanderen Beyond Simple Monte-Carlo: Parallel Computing with QuantLib