The data-driven COS method Á. Leitao, C. W. Oosterlee, L. Ortiz-Gracia and S. M. Bohte Delft University of Technology - Centrum Wiskunde & Informatica CMMSE 2017, July 6, 2017 Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 1 / 39
Outline 1 The COS method 2 Learning densities 3 The data-driven COS (ddcos) method 4 Applications of the ddcos method 5 Conclusions Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 2 / 39
The COS method Well known and established method: [FO08], [FO09], etc. Fourier-based method to price financial options. Starting point is risk-neutral valuation formula: v(x, t) = e r(t t) E [v(y, T ) x] = e r(t t) v(y, T )f (y x)dy, where r is the risk-free rate and f (y x) is the density of the underlying process. Typically, we have: ( ) ( ) S(0) S(T ) x := log and y := log, K K f (y x) is unknown in most of cases. However, characteristic function available for many models. Exploit the relation between the density and the characteristic function (Fourier pair). Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 3 / 39 R
The COS method - European options f (y x) is approximated, on a finite interval [a, b], by a cosine series ( f (y x) = 1 ( A 0 + 2 A k (x) cos kπ y a ) ), b a b a k=1 b ( A 0 = 1, A k (x) = f (y x) cos kπ y a ) dy, k = 1, 2,.... b a a Interchanging the summation and integration and introducing the definition V k := 2 b ( v(y, T ) cos kπ y a ) dy, b a a b a we find that the option value is given by v(x, t) e r(t t) A k (x)v k, k=0 where indicates that the first term is divided by two. Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 4 / 39
Pricing European options with the COS method Coefficients A k can be computed from the ChF. Coefficients V k are known analytically (for many types of options). Closed-form expressions for the option Greeks and Γ = v(x, t) S Γ = 2 v(x, t) S 2 = 1 v(x, t) S(0) x = exp( r(t t)) exp( r(t t)) k=0 A k (x) x V k S(0), k=0 ( A k(x) + 2 A k (x) x) x 2 ) ) Vk S 2 (0) Due to the rapid decay of the coefficients, v(x, t), and Γ can be approximated with high accuracy by truncating to N terms. Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 5 / 39
Learning densities Statistical learning theory: deals with the problem of finding a predictive function based on data. We follow the analysis about the problem of density estimation proposed by Vapnik in [Vap98]. Given independent and identically distributed samples X 1, X 2,..., X n. By definition, density f (x) is related to the cumulative distribution function, F (x), by means of the expression x f (y)dy = F (x). Function F (x) is approximated by the empirical approximation F n (x) = 1 n n η(x X i ), i=1 where η( ) is the step-function. Convergence O(1/ n). Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 6 / 39
Regularization approach The previous equation can be rewritten as a linear operator equation Cf = F F n, where the operator Ch := x h(z)dz. Stochastic ill-posed problem. Regularization method (Vapnik). Given a lower semi-continuous functional W (f ) such that: Solution of Cf = Fn belongs to D, the domain of definition of W (f ). The functional W (f ) takes real non-negative values in D. The set M c = {f : W (f ) c} is compact in H (the space where the solution exits and is unique). Then we can construct the functional R γn (f, F n ) = L 2 H(Cf, F n ) + γ n W (f ), where L H is a metric of the space H (loss function) and γ n is the parameter of regularization satisfying that γ n 0 as n. Under these conditions, a function f n minimizing the functional converges almost surely to the desired one. Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 7 / 39
Regularization and Fourier-based density estimators Assume f (x) belongs to the functions whose p-th derivatives belong to L 2 (0, π), the kernel K(z x) and ( 2 W (f ) = K(z x)f (x)dx) dz, R R The risk functional ( x ) 2 ( 2 R γn (f, F n ) = f (y)dy F n (x) dx+γ n K(z x)f (x)dx) dz. R 0 R R Denoting by ˆf (u), ˆF n (u) and ˆK(u) the Fourier transforms, by definition ˆF n (u) = 1 F n (x)e iux dx 2π R = 1 n η(x X j )e iux dx = 1 n exp( iux j ), 2nπ n iu R j=1 where i = 1 is the imaginary unit. Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 8 / 39 j=1
Regularization and Fourier-based density estimators By employing the convolution theorem and Parseval s identity ˆf (u) 1 n n j=1 R γn (f, F n ) = exp( iux j) 2 + γ n iu ˆK(u)ˆf (u) 2. L 2 L 2 The condition to minimize R γn (f, F n ) is given by, ˆf (u) u 2 1 nu 2 which gives us, n exp( iux j ) + γ n ˆK(u) ˆK( u)ˆf (u) = 0, j=1 ( ) 1 1 ˆf n (u) = 1 + γ n u 2 ˆK(u) ˆK( u) n n exp( iux j ). j=1 Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 9 / 39
Regularization and Fourier-based density estimators K(x) = δ (p) (x), and the desired PDF, f (x) and its p-th derivative (p 0) belongs to L 2 (0, π), the risk functional becomes π ( x ) 2 π ( 2 R γn (f, F n ) = f (y)dy F n (x) dx + γ n f (x)) (p) dx. 0 0 Given orthonormal functions, ψ 1 (θ),..., ψ k (θ),... f n (θ) = 1 π + 2 à k ψ k (θ), π k=1 with à 0, à 1,..., à k,... expansion coefficients, à k =< f n, ψ k >. The coefficients à k cannot be directly computed from f n, but à k =< f n, ψ k >=< ˆf n, ˆψ k > π ( ) = 1 1 1 + γ n u 2 ˆK(u) ˆK( u) n 0 0 n exp( iuθ j ) ˆψ k (u)du. j=1 Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 10 / 39
Regularization and Fourier-based density estimators Using cosine series expansions, i.e., ψ k (θ) = cos(kθ), it is well-known that ˆψ k (u) = 1 (δ(u k) + δ(u + k)). 2 This facilitates the computation of à k avoiding the calculation of the integral. Thus, the minimum of R γn à k = 1 ( ) n 1 2n 1 + γ n ( k) 2 ˆK( k) exp(ikθ j ) ˆK(k) j=1 ( ) n 1 + 1 + γ n k 2 ˆK(k) exp( ikθ j ) ˆK( k) 1 1 = 1 + γ n k 2 ˆK(k) ˆK( k) n j=1 j=1 n 1 1 cos(kθ j ) = 1 + γ n k 2(p+1) n n cos(kθ j ), where θ j (0, π) are given samples of the unknown distribution. In the last step, ˆK(u) = (iu) p is used. Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 11 / 39 j=1
The data-driven COS method Employ the solution of the regularization problem for density estimation in the COS framework. In both, the density is assumed to be in the form of a cosine series expansion. The minimum of the functional is in terms of the expansion coefficients. Take advantage of the COS machinery: pricing options, Greeks, etc. The samples must follow risk-neutral measure (Monte Carlo paths). Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 12 / 39
The data-driven COS method Key idea: Ã k approximates A k. Risk neutral samples from an asset at time T, S 1 (t), S 2 (t),..., S n (t). With a logarithmic transformation, we have ( ) Sj (T ) Y j := log. K The regularization solution is defined in (0, π), by transformation θ j = π Y j a b a, The boundaries a and b are defined as a := min 1 j n (Y j), b := max 1 j n (Y j). Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 13 / 39
The data-driven COS method - European options The A k coefficients are replaced by the data-driven Ãk 1 ) n n j=1 (kπ cos Y j a b a A k à k = 1 + γ n k 2(p+1). The ddcos pricing formula for European options ṽ(x, t) = e r(t t) k=0 1 n = e r(t t) à k V k. k=0 ) n j=1 (kπ cos Y j a b a 1 + γ n k 2(p+1) V k As in the original COS method, we must truncate the infinite sum to a finite number of terms N N ṽ(x, t) = e r(t t) à k V k, Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 14 / 39 k=0
The data-driven COS method - Greeks Data-driven expressions for the and Γ sensitivities. Define the corresponding sine coefficients as B k := 1 n ) n j=1 (kπ sin Y j a b a 1 + γ n k 2(p+1). Taking derivatives of the ddcos pricing formulat w.r.t the samples, Y j, the data-driven Greeks, and Γ, can be obtained by = e r(t t) N k=0 N ( Γ = e r(t t) B k k=0 ( B k kπ b a ) V k S(0), ( ) ) kπ kπ 2 b a Ãk b a V k S 2 (0). Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 15 / 39
The data-driven COS method - Variance reduction Here, we show how to apply antithetic variates (AV) to our method. Since the samples must be i.i.d., an immediate application of AV is not possible. Assume antithetic samples, Y i, that can be computed without extra computational effort, a new estimator is defined as Ā k := 1 ) (Ãk + 2 à k, where à k are antithetic coefficients, obtained from Y i. It can be proved that the use of Āk results in a variance reduction. Additional information to reduce the variance. For example, the martingale property S(T ) = S(T ) 1 n S j (T ) + E[S(T )], n = S(T ) 1 n j=1 n S j (T ) + S(0) exp(rt ). j=1 Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 16 / 39
Choice of parameters in ddcos method The choice of optimal values of γ n and p. There is no rule or procedure to obtain an optimal p. As a rule of thumb, p = 0 seems to be the most appropriate value. 0.4 0.3 0.2 True p = 0 p = 1 p = 2 p = 3 0.1 0-4 -2 0 2 4 For the regularization parameter γ n, a rule that ensures asymptotic convergence log log n γ n =. n Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 17 / 39
Applications of the ddcos method Pricing options (no better than Monte Carlo). Sensitivities or Greeks. Models without analytic characteristic function. SABR model. Risk measures: VaR and Expected shortfall. Combinations. Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 18 / 39
Applications of the ddcos - Option pricing 10 1 ddcos ddcos, AV MC 10 0 MC, AV 10 1 ddcos ddcos, AV MC 10 0 MC, AV 10-1 10-1 10-2 10 1 10 2 10 3 10 4 10 5 10-2 10 1 10 2 10 3 10 4 10 5 (a) Call: Strike K = 100. (b) Put: Strike K = 100. Figure: Convergence in prices of the ddcos method: Antithetic Variates (AV); GBM, S(0) = 100, r = 0.1, σ = 0.3 and T = 2. Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 19 / 39
Applications of the ddcos - Greeks estimation 10-1 ddcos ddcos MCFD 10-2 MCFD, AV, AV 10-2 ddcos ddcos, AV MCFD MCFD, AV 10-3 10-3 10-4 10 1 10 2 10 3 10 4 10 5 10-4 10 1 10 2 10 3 10 4 10 5 (a) (Call): Strike K = 100. (b) Γ: Strike K = 100. Figure: Convergence in Greeks of the ddcos method: Antithetic Variates (AV); GBM, S(0) = 100, r = 0.1, σ = 0.3 and T = 2. Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 20 / 39
Applications of the ddcos - Greeks estimation K (% of S(0)) 80% 90% 100% 110% 120% 0.1 Ref. 0.8868 0.8243 0.7529 0.6768 0.6002 ddcos 0.8867 0.8240 0.7528 0.6769 0.6002 RE 1.1012 10 4 MCFD 0.8876 0.8247 0.7534 0.6773 0.6006 RE 7.5168 10 4 Γ Ref. 0.0045 0.0061 0.0074 0.0085 0.0091 ddcos 0.0045 0.0062 0.0075 0.0084 0.0090 RE 8.5423 10 3 MCFD 0.0045 0.0059 0.0071 0.0079 0.0083 RE 4.9554 10 2 Table: GBM call option Greeks: S(0) = 100, r = 0.1, σ = 0.3 and T = 2. Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 21 / 39
Applications of the ddcos - Greeks estimation K (% of S(0)) 80% 90% 100% 110% 120% Ref. 0.8385 0.8114 0.7847 0.7584 0.7328 ddcos 0.8383 0.8113 0.7846 0.7585 0.7333 RE 2.7155 10 4 MCFD 0.8387 0.8118 0.7850 0.7586 0.7330 RE 3.1265 10 4 Γ Ref. 0.0022 0.0024 0.0027 0.0029 0.0030 ddcos 0.0022 0.0024 0.0027 0.0029 0.0030 RE 8.2711 10 3 MCFD 0.0023 0.0026 0.0028 0.0031 0.0033 RE 6.118 10 2 Table: Merton jump-diffusion call option Greeks: S(0) = 100, r = 0.1, σ = 0.3, µ j = 0.2, σ j = 0.2 and λ = 8 and T = 2. Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 22 / 39
Applications of the ddcos - Greeks estimation K (% of S(0)) 80% 90% 100% 110% 120% Ref. 0.9914 0.9284 0.5371 0.0720 0.0058 ddcos 0.9916 0.9282 0.5363 0.0732 0.0058 RE 5.2775 10 3 MCFD 0.9911 0.9279 0.5368 0.0737 0.0058 RE 5.5039 10 3 Table: Call option Greek under the SABR model: S(0) = 100, r = 0, σ 0 = 0.3, α = 0.4, β = 0.6, ρ = 0.25 and T = 2. Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 23 / 39
Applications of the ddcos - Greeks estimation K (% of S(0)) 80% 90% 100% 110% 120% Ref. 0.8384 0.7728 0.6931 0.6027 0.5086 ddcos 0.8364 0.7703 0.6902 0.6006 0.5084 RE 2.7855 10 3 Hagan 0.8577 0.7955 0.7170 0.6249 0.5265 RE 3.1751 10 2 Table: under SABR model. Setting: Call, S(0) = 0.04, r = 0.0, σ 0 = 0.4, α = 0.8, β = 1.0, ρ = 0.5 and T = 2. Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 24 / 39
Applications of the ddcos - Risk measures In the context of the Delta-Gamma approach (COS in [OGO14]). The change in a portfolio value is defined: L := V = V (S, t) V (S + S, t + t). The formal definition of the VaR reads P( V < VaR(q)) = 1 F L (VaR(q)) = q, with q a predefined confidence level. Given the VaR, the ES measure is computed as ES := E[ V V > VaR(q)]. Two portfolios with the same composition: one European call and half a European put on the same asset, maturity 60 days and K = 101. Different time horizons: 1 day (Portfolio 1) and 10 days (Portfolio 2). The asset follows a GBM with S(0) = 100, r = 0.1 and σ = 0.3. Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 25 / 39
Applications of the ddcos - Risk measures 1 0.8 ddcos COS 2 1.5 ddcos COS 0.6 1 0.4 0.2 0-2 -1 0 1 2 0.5 0-2 0 2 4 (a) Density Portfolio 1. (b) Density Portfolio 2. Figure: Recovered densities of L: ddcos vs. COS. Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 26 / 39
Applications of the ddcos - Risk measures 10 0 VaR ES 10-1 10 1 VaR ES 10 0 10-2 10-1 10-3 10 1 10 2 10 3 10 4 10 5 10-2 10 1 10 2 10 3 10 4 10 5 (a) Portfolio 1: q = 99%. (b) Portfolio 2: q = 90%. Figure: VaR and ES convergence in n. Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 27 / 39
Applications of the ddcos - Risk measures The oscillations can be removed. Two options: smoothing parameter or filters [RVO14]. 1 0.8 COS ddcos, p=1 ddcos, filter 2 1.5 COS ddcos, p=1 ddcos, filter 0.6 1 0.4 0.2 0-2 -1 0 1 2 0.5 0-2 0 2 4 (a) Density Portfolio 1. (b) Density Portfolio 2. Figure: Smoothed densities of L. Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 28 / 39
Applications of the ddcos - Risk measures and SABR 3 2.5 2 1.5 ddcos VaR ddcos ES 1 10 1 10 2 10 3 10 4 10 5 1 0.8 0.6 0.4 0.2 0 ddcos f L ddcos F L ddcos f L, filter ddcos F L, filter -4-2 0 2 4 (a) VaR and ES: q = 99%. (b) F L and f L. Figure: Delta-Gamma approach under the SABR model. Setting: S(0) = 100, K = 100, r = 0.0, σ 0 = 0.4, α = 0.8, β = 1.0, ρ = 0.5, T = 2, q = 99% and t = 1/365. Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 29 / 39
Applications of the ddcos - Risk measures and SABR q 10% 30% 50% 70% 90% VaR 1.4742 0.5917 0.0022 0.5789 1.3862 ES 0.1972 0.5345 0.8644 1.2517 1.8744 Table: VaR and ES under SABR model. Setting: S(0) = 100, K = 100, r = 0.0, σ 0 = 0.4, α = 0.8, β = 1.0, ρ = 0.5, T = 2, and t = 1/365. Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 30 / 39
Conclusions The ddcos method extends the COS method applicability to cases when only data samples of the underlying are available. The method exploits a closed-form solution, in terms of Fourier cosine expansions, of a regularization problem. It allows to develop a data-driven method which can be employed for option pricing and risk management. The ddcos method particularly results in an efficient method for the and Γ sensitivities computation, based solely on the samples. It can be employed within the Delta-Gamma approximation for calculating risk measures. Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 31 / 39
References Fang Fang and Cornelis W. Oosterlee. A novel pricing method for European options based on Fourier-cosine series expansions. SIAM Journal on Scientific Computing, 31:826 848, 2008. Fang Fang and Cornelis W. Oosterlee. Pricing early-exercise and discrete barrier options by Fourier-cosine series expansions. Numerische Mathematik, 114(1):27 62, 2009. Luis Ortiz-Gracia and Cornelis W. Oosterlee. Efficient VaR and Expected Shortfall computations for nonlinear portfolios within the delta-gamma approach. Applied Mathematics and Computation, 244:16 31, 2014. Maria J. Ruijter, Mark Versteegh, and Cornelis W. Oosterlee. On the application of spectral filters in a Fourier option pricing technique. Journal of Computational Finance, 19(1):75 106, 2014. Vladimir N. Vapnik. Statistical learning theory. Wiley-Interscience, 1998. Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 32 / 39
Suggestions, comments & questions Thank you for your attention Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 33 / 39
Choice of γ n γ n impacts the efficiency of the ddcos method: it is related to the number of samples, n, and number of terms, N. For the regularization parameter γ n, a rule that ensures asymptotic convergence log log n γ n =. n In practical situations: not optimal. Exploit the relation between the empirical and real (unknown) CDFs. Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 34 / 39
Choice of γ n This relation can be modeled by statistical laws or statistics: Kolmogorov-Smirnov, Anderson-Darling, Smirnov-Cramér von Mises. Preferable: a measure of the distance between the F n (x) and F (x) follows a known distribution. We have chosen Smirnov-Cramér von Mises(SCvM): ω 2 = n (F (x) F n (x)) 2 df (x). i=1 R Assume we have an approximation, F γn (which depends on γ n ). An almost optimal γ n is computed by solving the equation n ( F γn ( X i ) i 0.5 ) 2 = m S i n 12n, where X 1, X 2,..., X n is the ordered array of samples X 1, X 2,..., X n and m S the mean of the ω 2. Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 35 / 39
Influence of γ n To assess the impact of γ n : Mean integrated Squared Error (MiSE): [ ] [ ] E f n f 2 2 = E (f n (x) f (x)) 2 dx. R A formula for the MiSE formula is derived in our context: MISE = 1 n N k=1 ( 1 1 ( 1 + γn k 2(p+1)) 2 2 + 1 ) 2 A 2k A 2 k + k=n+1 Two main aspects influenced γ n : accuracy in n and stability in N. The quality of the approximated density can be also affected. A 2 k. Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 36 / 39
Influence of γ n 10 2 n "rule" 10 0 A k real 10 1 10 0 10-1 10-2 n SCvM n = 0 10-1 10-2 10-3 A k rule A k rule, n =0 A k SCvM A k SCvM, n =0 10-3 10-4 10-4 10 1 10 2 10 3 10 4 10 5 10-5 0 50 100 150 200 (a) Convergence in terms of n (b) Convergence in terms of N Figure: Influence of γ n :. Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 37 / 39
Optimal number of terms N Try to find a minimum optimal value of N. N considerably affects the performance. We wish to avoid the computation of any  k. We define a proxy for the MiSE and follow: MiSE 1 n N k=1 1 2 ( 1 + γn k 2(p+1)) 2. 10 0 n rule 10-1 10-2 10-3 rule - addend 1 n rule - proxy n n SCvM SCvM - addend 1 n SCvM - proxy n 10-4 10-5 0 50 100 150 200 Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 38 / 39
Optimal number of terms N Data: n, γ n N min = 5 N max = ɛ = 1 n MiSE prev = for N = N min : N max do MiSE N = 1 n N k=1 ɛ N = MiSE N MiSE prev MiSE N if ɛ N > ɛ then N op = N else Break 1 2 (1+γ nk 2(p+1) ) 2 N 18 16 14 12 10 8 6 4 10 1 10 2 10 3 n Figure: Almost optimal N. MiSE prev = MiSE N Álvaro Leitao (CWI & TUDelft) The ddcos method CMMSE 2017, July 6, 2017 39 / 39