Derivative-free Optimization Solver for Calibration Problems
J. Fiala, B. Marteau (Numerical Algorithm Group)
L. Roberts, C. Cartis (University of Oxford)

Why derivative-free optimization (DFO)?

Typical sources of noise in financeClassical optimization relies on provided derivatives:

Advantages of derivative-free optimization• explicitly written derivatives• black box models – AD is not possible∂f• finite differencing (FD, bumping), ∂x≈
if (x+hei)−f (x) • noisy models – FD are inaccurate or wrongh• expensive models – FD are impractical• algorithmic differentiation (see NAG AD tools)• if high-accuracy is not required, DFO requires fewer
function evaluations
NAG implements a DFO solver (e04ff) able to exploit the structure of calibration problems.

• Objective funtion F might be evaluated in the interest of speed with low precision algorithms (such as lowprecision quadrature) which generate noise.
• Sometimes F is computed via Monte Carlo (for example hybrid models): as paths move in and out of themoney, noise is introduced into the objective function.
• Often the market prices yi have finite precision, for example prices are quoted to one basis point. Calibration
is not performed to high accuracy: it can be stopped when model prices are within one basis point (1BP) ofobserved prices.
The third case is often acceptable when calibrating the Heston stochastic volatility model with term structure forEuropean options.

Robust noisy calibration
Noise can have undesired effects for optimization solvers. Model-based DFO solvers naturally present someresilience to noise, further enhanced in the NAG Library by:

A use case in finance: the Heston model calibration
Let C model (ρt, αt, σt, λt) represent the market price of a European option estimated by a Heston model with thefollowing piecewise-constant time-dependant internal parameters:• Specific choice of algorithmic parameters
ρt, correlation parameters of Brownian motions in the Heston model• Automatic detection of early convergence and smart “soft” restart procedures

αt, volatility of the scaled volatility
Ilustration. A noisy calibration via nonlinear least squares with uniform noise  ∈ [−ν, ν]minx∈RnmX

σt, scaling parameterλt, mean reversion rate(ri(x) + )2

Under some assumptions, λt can be discarded from the calibration and set to a constant value.

i=1Comparison between quasi-Newton method combined with finite differences (e04fc) and the new derivative-freesolver (e04ff) on the Rosenbrock test function:

We defined seven time intervals on which the parameters (ρt, αt, σt) are constant and must be fitted to real market quotes Cimarket. Calibrating the model therefore amounts to sequentially solving seven three-dimensional
nonlinear least squares problems with box constraints:

Level of noise ν 0.0e00 1.0e-10 1.0e-08 1.0e-06 1.0e-04 1.0e-02 1.0e-01
Finite differences 89
92
221∞
∞
∞
∞
DFO
28
2121
21
21
31
∞

minm
X

(Cimodel (ρt, αt, σt) − Cimarket)2

i=1s.t. − 1 ≤ ρt ≤ 1, αt ≥ 0, σt ≥ 0

Table 1: Number of objective evaluations required to reach a point within 10−5 of the solution without noise

The table below shows a calibration of the Heston with term structure model to an accuracy of one basis point.
DFO-based solution delivers on average a 31% speedup.
Average number Average CPUof evaluations
time(s)Finite differences
331
15.2
DFO
223
10.5
Table 2: Comparison of DFO (e04ff) and derivative based solvers (e04un) on 1355 Heston calibrations

Evaluations to reach F (x) ≤ 10−5 w.r.t noise level

Avg. number of evaluations needed to reach given precision over
20 runs. Error bars represent the proportion of runs that fail.

April 2019

DFO clearly outperforms derivative-based solvers when exact derivatives are lacking,or a high-accuracy calibration is not required. DFO is absolutely essential when theobjective function evaluations are noisy.

support@nag.co.uk

www.nag.com