Towards efficient option pricing in incomplete markets GPU - - PowerPoint PPT Presentation

towards efficient option pricing in incomplete markets
SMART_READER_LITE
LIVE PREVIEW

Towards efficient option pricing in incomplete markets GPU - - PowerPoint PPT Presentation

Towards efficient option pricing in incomplete markets GPU TECHNOLOGY CONFERENCE 2016 Shih-Hau Tan 1 2 1 Marie Curie Research Project STRIKE 2 University of Greenwich Apr. 6, 2016 (University of Greenwich) Towards efficient option pricing


slide-1
SLIDE 1

Towards efficient option pricing in incomplete markets

GPU TECHNOLOGY CONFERENCE 2016 Shih-Hau Tan 1 2

1Marie Curie Research Project ”STRIKE” 2University of Greenwich

  • Apr. 6, 2016

(University of Greenwich) Towards efficient option pricing

  • Apr. 6, 2016

1 / 25

slide-2
SLIDE 2

Outline

1 Motivation 2 Newton-based solver 3 GPU Computing Implementation 4 Conclusion

(University of Greenwich) Towards efficient option pricing

  • Apr. 6, 2016

2 / 25

slide-3
SLIDE 3

Motivation

Incomplete Market

(University of Greenwich) Towards efficient option pricing

  • Apr. 6, 2016

3 / 25

slide-4
SLIDE 4

Motivation

Nonlinear Option Pricing

❼ Advantages

❼ More reasonable and accurate option price ❼ Easier to do model calibration ❼ Can be used to design better hedging strategies

❼ Types of problems

❼ Nonlinear Black-Scholes Equation ❼ Hamilton-Jacobi-Bellman (HJB) Equation ❼ Backward Stochastic Differential Equation

❼ Challenge

❼ Complicated to solve a single problem

(University of Greenwich) Towards efficient option pricing

  • Apr. 6, 2016

4 / 25

slide-5
SLIDE 5

Motivation

Nonlinear Black-Scholes Equation

∂V ∂t + 1 2σ2S2 ∂2V ∂S2 + rS ∂V ∂S − rV = 0, S > 0, t ∈ [0,T) with

❼ σ = σ0(1 + Le sign(VSS))1/2 (Leland model (1985)) ❼ σ = φ(x) (Barles and Soner model (1998)) ❼ σ = σ0(1 − ρSVSS)−1 (Frey-Patie model (2002)) ❼ σ ∈ [σmin,σmax] (Uncertain volatility model (1995))

where VSS = ∂2V ∂S2

(University of Greenwich) Towards efficient option pricing

  • Apr. 6, 2016

5 / 25

slide-6
SLIDE 6

Motivation

Large-Scale Problems

(University of Greenwich) Towards efficient option pricing

  • Apr. 6, 2016

6 / 25

slide-7
SLIDE 7

Motivation

Objective

❼ Single nonlinear option pricing problem ❼ Large-scale nonlinear option pricing problems

(University of Greenwich) Towards efficient option pricing

  • Apr. 6, 2016

7 / 25

slide-8
SLIDE 8

Newton-based solver

Finite Difference Method

∂V ∂t + 1 2σ2S2 ∂2V ∂S2 + rS ∂V ∂S − rV = 0, S > 0, t ∈ [0,T) (1) with σ = σ(Vt,VS,VSS,V ). Apply finite difference implicit scheme on equation (1)

V n+1

i

− V n

i

∆t + 1 2(σn+1

i

)2S2

i

V n+1

i+1 − 2V n+1 i

+ V n+1

i−1

(∆S)2 + rSi V n+1

i+1 − V n+1 i−1

2∆S − rV n+1

i

= 0, which can be simplified as

aiV n+1

i−1 + biV n+1 i

+ ciV n+1

i+1 = V n i ,

(2) where i represents the spatial discretization and n represents the temporal discretization.

(University of Greenwich) Towards efficient option pricing

  • Apr. 6, 2016

8 / 25

slide-9
SLIDE 9

Newton-based solver

Root-finding Problem

Equation (2) can be simplified as H(V n+1)V n+1 = V n, where H is a tridiagonal matrix. Introduce G(V n+1) = H(V n+1)V n+1 − V n = 0, then the problem becomes to use Newton’s method to solve the root-finding problem of the function G.

(University of Greenwich) Towards efficient option pricing

  • Apr. 6, 2016

9 / 25

slide-10
SLIDE 10

Newton-based solver

Features

❼ Can be applied to different cases with different schemes ❼ Complexity = #iterations×(linear model) + evaluation of Jacobian

matrix

❼ Quadratic convergent rate

(University of Greenwich) Towards efficient option pricing

  • Apr. 6, 2016

10 / 25

slide-11
SLIDE 11

Newton-based solver

Complexity Analysis

G(V n+1) = H(V n+1)V n+1 − V n = 0

❼ Evaluate ai,bi,ci for H at each iteration and time step ❼ Consider H(V n+1) = Σn+1H1 + H2, Σn+1 = Diag((σn+1

i

)2), then

Jac(G(V n+1)) = ∂[H(V n+1)V n+1] ∂V n+1 = H(V n+1) + Diag(H1V n+1)∇(Σn+1) ❼ Tridiagonal solver for (Jac(G))−1

(University of Greenwich) Towards efficient option pricing

  • Apr. 6, 2016

11 / 25

slide-12
SLIDE 12

Newton-based solver

Parallel Computing

At each time step, we have the Newton’s iteration as:

(University of Greenwich) Towards efficient option pricing

  • Apr. 6, 2016

12 / 25

slide-13
SLIDE 13

Newton-based solver

Batch Operation

❼ Different option pricing problems such as different r,T,K,σ0 ❼ Combine all problems together

(University of Greenwich) Towards efficient option pricing

  • Apr. 6, 2016

13 / 25

slide-14
SLIDE 14

GPU Computing Implementation

Implementation

❼ OpenACC

❼ easier to start ❼ need to be careful on data construct and clauses

❼ CUDA libraries

❼ different libraries for different applications ❼ enable users to get good performance without writing too many codes

❼ Kernel functions

❼ for specific applications ❼ more flexibility to modify ❼ need to write the codes and do memory allocation

(University of Greenwich) Towards efficient option pricing

  • Apr. 6, 2016

14 / 25

slide-15
SLIDE 15

GPU Computing Implementation

OpenACC

❼ Find parallelism of the algorithm

❼ #pragma acc kernels

{ Jacobian() }

❼ #pragma acc parallel loop

❼ Data movement

❼ copyin(), copyout(), present()

(University of Greenwich) Towards efficient option pricing

  • Apr. 6, 2016

15 / 25

slide-16
SLIDE 16

GPU Computing Implementation

CUDA Libraries

❼ cuBLAS

❼ cublasSgbmv for matrix-vector calculation ❼ cublasSnrm2 for Euclidean norm

❼ cuSPARSE

❼ cusparseSgtsv for tridiagonal solver ❼ has problem on cudaFree and cudaMalloc

(University of Greenwich) Towards efficient option pricing

  • Apr. 6, 2016

16 / 25

slide-17
SLIDE 17

GPU Computing Implementation

Kernel Functions

❼ Tridiagonal matrix construction

❼ evaluate a[i],b[i],c[i]

❼ Sparse matrix calculation

❼ evaluate A + B,A × b where A,B are tridiagonal matrices

❼ Jacobian matrix

❼ Jac(G(V n+1)) = H(V n+1) + Diag(H1V n+1)∇(Σn+1) ❼ contains 2 matrix constructions and 2 level-2 function evaluations

(University of Greenwich) Towards efficient option pricing

  • Apr. 6, 2016

17 / 25

slide-18
SLIDE 18

GPU Computing Implementation

Numerical Experiment

Consider Frey-Patie model with nonlinear volatility σ = σ0(1 − ρSVSS)−1. Parameters are chosen to be S ∈ [0,300], K = 100, T = 1/12,σ0 = 0.4, ρ = 0.01, r = 0.03, and tolerance for Newton’s iteration is tol = 10−3 for single precision and tol = 10−8 for double precision. The grid points for space and time are M = N = 1000. We calculate 64,128,256 option pricing problems. System information: Processor: Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz Memory: 4096MB RAM Compiler: gcc 4.7, CUDA 7.0, PGI 15.9 Graphic card : Quadro K2100M (Kepler microarchitecture, compute capability 3.0)

(University of Greenwich) Towards efficient option pricing

  • Apr. 6, 2016

18 / 25

slide-19
SLIDE 19

GPU Computing Implementation

Table: Computation time (s) for single precision. ∗ means only estimate the time for calling cudaFree and cudaMalloc once. #Options CPU OpenACC Library Library∗ Kernel Kernel∗ n = 64 16.0 6.29 5.70 2.11 7.66 3.42 n = 128 32.5 16.3 7.99 3.61 8.77 3.52 n = 256 64.8 24.8 13.2 6.46 11.6 3.78 Table: Speed up for single precision. #Options CPU OpenACC Library Library∗ Kernel Kernel∗ n = 64 1.0x 2.5x 2.8x 7.5x 2.0x 4.6x n = 128 1.0x 1.9x 4.0x 2.9x 3.7x 9.2x n = 256 1.0x 2.6x 4.9x 10x 5.5x 17x

(University of Greenwich) Towards efficient option pricing

  • Apr. 6, 2016

19 / 25

slide-20
SLIDE 20

GPU Computing Implementation (University of Greenwich) Towards efficient option pricing

  • Apr. 6, 2016

20 / 25

slide-21
SLIDE 21

GPU Computing Implementation

Table: Computation time (s) for double precision. ∗ means only estimate the time for calling cudaFree and cudaMalloc once. #Options CPU OpenACC Library Library∗ Kernel Kernel∗ n = 64 24.8 13.5 10.2 3.03 10.9 4.19 n = 128 49.7 25.5 14.7 6.49 13.0 4.55 n = 256 122 66.5 23.9 9.56 17.0 5.15 Table: Speed up for double precision. #Options CPU OpenACC Library Library∗ Kernel Kernel∗ n = 64 1.0x 1.8x 2.4x 8.2x 2.2x 5.9x n = 128 1.0x 1.9x 3.3x 7.6x 3.8x 10x n = 256 1.0x 1.8x 5.1x 12x 7.2x 23x

(University of Greenwich) Towards efficient option pricing

  • Apr. 6, 2016

21 / 25

slide-22
SLIDE 22

GPU Computing Implementation (University of Greenwich) Towards efficient option pricing

  • Apr. 6, 2016

22 / 25

slide-23
SLIDE 23

Conclusion

Summarize

❼ Newton-based solver for nonlinear option pricing ❼ Batch operation for dealing with large-scale problems ❼ Comparison of using different implementations of doing GPU

Computing

❼ Work in progress

❼ multi-asset problems with Alternating Direction Implicit (ADI) method ❼ Asian option pricing problem with semi-Lagrangian scheme ❼ Multiple GPUs computing

(University of Greenwich) Towards efficient option pricing

  • Apr. 6, 2016

23 / 25

slide-24
SLIDE 24

Conclusion

❼ Reference [1] M. Ehrhardt (edt): Nonlinear Models in Mathematical Finance, Nova Science Publishers, Inc. New York, 2008. [2] J. Guyon, P. Henry-Labord` ere, Nonlinear Option Pricing, CRC Press, 2013. [3] M.B. Giles, E. Laszlo, I. Reguly, J. Appleyard, J. Demouth, GPU implementation of finite difference solvers, Seventh Workshop on High Performance Computational Finance (WHPCF’14), IEEE, 2014. ❼ Acknowledgement

Special thanks to

❼ Mr. Lung-Sheng Chien from NVIDIA, USA. ❼ Mr. Alvaro Leitao from CWI, the Netherlands.

(University of Greenwich) Towards efficient option pricing

  • Apr. 6, 2016

24 / 25

slide-25
SLIDE 25

Conclusion

Shih-Hau Tan email: shihhau.tan@gmail.com web: http://staffweb.cms.gre.ac.uk/∼ts73/

Thank you very much!

(University of Greenwich) Towards efficient option pricing

  • Apr. 6, 2016

25 / 25