machine learning for quantitative finance€¦ · machine learning for quantitative finance: fast...
Post on 02-Oct-2020
14 Views
Preview:
TRANSCRIPT
Fast derivative pricing
Machine Learningfor Quantitative Finance
Sofie Reyners
Joint work with Jan De Spiegeleer, Dilip Madan andWim Schoutens
Derivative pricing is time-consuming...
I Vanilla option pricing• European-type→ Fast Fourier transform
• American-type→ Tree methods
I Exotic option pricing→ Monte Carlo simulations
1 Machine Learning for Quantitative Finance
... but time is money!
time-consuming algorithms
continuously moving markets
→ prices are outdated when available, overnight calculationscannot be performed in one night, ...
2 Machine Learning for Quantitative Finance
Let a machine learn the pricing function
product, market andmodel parameters model price
time-consuming method
machine learning
Expensive pricing function is summarized with machine learning.
3 Machine Learning for Quantitative Finance
Let a machine learn the pricing function
product, market andmodel parameters model price
time-consuming method
machine learning
When training is completed, prediction is extremely fast!
3 Machine Learning for Quantitative Finance
Gaussian process regression (GPR)
Consider a training set
(X,y) = {(xi, yi) | i = 1, . . . , n}.
Find a relation between inputs and outputs:
yi = f(xi) + εi
where f(x) is a Gaussian process and εi ∼ N (0, σ2n) are i.i.d. random
variables representing the noise in the data.
4 Machine Learning for Quantitative Finance
Gaussian process
A Gaussian process f(x) is a, possibly infinite, collection of randomvariables, any finite subset of it having a joint Gaussian distribution.
I Mean function: m(x) = E[f(x)
]I Kernel function: k(x,x′) = Cov(f(x), f(x′))
=⇒ f(x) ∼ GP (m(x), k(x,x′))
5 Machine Learning for Quantitative Finance
Gaussian process
If f(x) ∼ GP (0, k(x,x′)), then
f ∼ N (0,K(X,X))
where (X,f) = {(xi, fi) | i = 1, . . . , n} is a sample from f(x) and
K(X,X) =
k(x1,x1) . . . k(x1,xn)... . . . ...
k(xn,x1) . . . k(xn,xn)
6 Machine Learning for Quantitative Finance
GPR: a Bayesian method
I Don’t model the relation as one function, but as a distributionover functions.
I Procedure:
1 Start from a prior GP→ prior knowledge: smooth function, periodic function, ...→ prior distribution over functions
2 Include observed data points
3 Compute a posterior GP
7 Machine Learning for Quantitative Finance
Posterior distribution
Only consider functions that agree with the data.
I Take new inputs X∗, with corresponding (unknown) functionvalues f∗
I Joint distribution of training outputs and function values:[yf∗
]∼ N
(0 ,
[K(X,X) + σ2
nI K(X,X∗)K(X∗, X) K(X∗, X∗)
])
8 Machine Learning for Quantitative Finance
Posterior distribution
I Condition on the observations:
f∗|X∗, X,y ∼ N(µ,Σ
)with
µ = K(X∗, X)[K(X,X) + σ2
nI]−1y
Σ = K(X∗, X∗)−K(X∗, X)[K(X,X) + σ2
nI]−1
K(X,X∗)
9 Machine Learning for Quantitative Finance
Kernel function
Squared exponential kernel function
k(x,x′) = σ2f exp
(−|x− x′|2
2`2
)
with hyperparameters σf and `:I σ2
f = signal varianceI ` = length-scale parameter
→ Hyperparameters (including σn) are estimated from the trainingdata, usually with MLE.
10 Machine Learning for Quantitative Finance
Mean function
Often set to zero, but can be modelled using basis functions h(x).
g(x) = f(x) + h(x)Tβ ∼ GP (h(x)Tβ, k(x,x′))
whereI f(x) ∼ GP (0, k(x,x′))I β should be estimated from the training data
Common choice:h(x) = (1, x, x2)
11 Machine Learning for Quantitative Finance
Application set-up
I Construct a training set:
product, market andmodel parameters model price
sample n randomcombinations xi
compute ncorresponding prices yi
time-consuming method
I Fit a Gaussian process regression (GPR) model.
I Fast prediction of new model prices.
12 Machine Learning for Quantitative Finance
Pricing European call options
Training set:
Product/market VG Heston
K ∈ [40%, 160%] σ ∈ [0.05, 0.45] κ ∈ [1.4, 2.6]T ∈ [11M, 1Y ] ν ∈ [0.55, 0.95] ρ ∈ [−0.85,−0.55]r ∈ [1.5%, 2.5%] θ ∈ [−0.35,−0.05] θ ∈ [0.45, 0.75]q ∈ [0%, 5%] η ∈ [0.01, 0.1]
v0 ∈ [0.01, 0.1]
→ sample n values of each parameter→ calculate n FFT-based model prices
13 Machine Learning for Quantitative Finance
Pricing European call options
I Fit the GPR model
K, T , r − q,model parameters
FFTmodel price
GPR
I Construct a test set:• Similarly as training set• Slightly smaller parameter intervals
14 Machine Learning for Quantitative Finance
Out-of-sample prediction
(a) Variance Gamma (b) Heston
→ model trained on 10 000 points, tested on 100 000 points.
15 Machine Learning for Quantitative Finance
Performance summary
VG Heston
Size of training set 5000 10 000 20 000 5000 10 000 20 000
In-sample predictionMAE 0.0016 0.0017 0.0013 0.0036 0.0027 0.0033AAE 2.5763e-04 1.9627e-04 1.4747e-04 5.2260e-04 4.0347e-04 3.4524e-04
Out-of-sample predictionMAE 0.0028 0.0022 0.0016 0.0060 0.0054 0.0048AAE 2.2508e-04 1.6942e-04 1.2828e-04 5.8991e-04 4.4112e-04 3.6623e-04
Speed-up × 30 × 15 × 7 × 40 × 20 × 10
withMAE = max {|ECF F T (i)− ECGP R(i)|, i = 1, . . . , n}
AAE = 1n
n∑i=1
|ECF F T (i)− ECGP R(i)|
16 Machine Learning for Quantitative Finance
Pricing American options
I Put options with strike K and maturity T
I Use binomial tree model (daily steps) with volatility
σ ∈ [0.05, 0.55]
K, T , r, q, σ binomial treemodel price
GPR
17 Machine Learning for Quantitative Finance
Out-of-sample performance
MAE 0.0086
AAE 9.1684e-04
Speed-up ×70
→ model trained on 10 000 points, tested on 100 000 points.
18 Machine Learning for Quantitative Finance
Pricing barrier options
I Down-and-out barrier put options with barrier level H, strike Kand maturity T with
H ∈ [55%, 99%]
I Use Monte Carlo simulation, according to Heston’s model
H, K, T , r, q,κ, ρ, θ, η, v0
MC Hestonmodel price
GPR
19 Machine Learning for Quantitative Finance
Out-of-sample performance
MAE 0.0086
AAE 6.7386e-04
Speed-up ×5850
→ model trained and tested on 10 000 points.
20 Machine Learning for Quantitative Finance
Conclusion
I Time-consuming pricing methods
I Gaussian process regression• Matrix inversion• Hyperparameter optimization
I Apply GPR on existing methods• Speed-up of several orders of magnitude• Some trade-off with accuracy
21 Machine Learning for Quantitative Finance
Thank you!
More information:
De Spiegeleer, J., Madan, D. B., Reyners, S. and Schoutens, W. (2018),Machine Learning for Quantitative Finance: Fast Derivative Pricing, Hedgingand Fitting, Quantitative Finance, forthcoming.
22 Machine Learning for Quantitative Finance
top related