Brownian Bridge™
Learn
Practice
Pricing
For employers
About
Contact
Log in
Start practicing
Quiz: Numerical Differentiation and Bump-Reval
Quick Quiz
1.
Forward differences have truncation error
O
(
h
)
O(h)
O
(
h
)
and central differences
O
(
h
2
)
O(h^2)
O
(
h
2
)
. Assuming
∣
f
′
′
∣
≈
∣
f
′
′
′
∣
|f''|\approx|f'''|
∣
f
′′
∣
≈
∣
f
′′′
∣
, for a bump
h
=
0.01
h=0.01
h
=
0.01
the central estimate is more accurate by roughly:
About
100
×
100\times
100
×
(the gap scales like
h
−
1
h^{-1}
h
−
1
)
2
×
2\times
2
×
10
×
10\times
10
×
Identical accuracy — only the leading constant differs, not the order
2.
For central differences with
∣
f
′
′
′
∣
/
∣
f
∣
≈
1
|f'''|/|f|\approx 1
∣
f
′′′
∣/∣
f
∣
≈
1
and machine epsilon
ε
mach
≈
10
−
16
\varepsilon_{\text{mach}}\approx 10^{-16}
ε
mach
≈
1
0
−
16
, the optimal step size
h
∗
h^*
h
∗
is about:
10
−
5
10^{-5}
1
0
−
5
10
−
8
10^{-8}
1
0
−
8
10
−
3
10^{-3}
1
0
−
3
10
−
16
10^{-16}
1
0
−
16
(machine epsilon itself)
3.
The complex-step method estimates
f
′
(
x
)
≈
I
m
[
f
(
x
+
i
h
)
]
/
h
f'(x)\approx\mathrm{Im}[f(x+ih)]/h
f
′
(
x
)
≈
Im
[
f
(
x
+
ih
)]
/
h
. Why can
h
h
h
be as small as
10
−
100
10^{-100}
1
0
−
100
without loss of accuracy?
No subtractive cancellation — the derivative sits in the imaginary part
Because complex arithmetic avoids all floating-point error
Because the Taylor series of an analytic function converges for any
h
h
h
Because
h
=
10
−
100
h=10^{-100}
h
=
1
0
−
100
makes the truncation error exactly zero
4.
The complex-step method works for Monte Carlo pricers whose payoff uses an indicator
1
S
T
>
K
\mathbf{1}_{S_T>K}
1
S
T
>
K
.
True
False
5.
Adjoint Algorithmic Differentiation (AAD) computes the gradient of a pricer with respect to
n
n
n
inputs. Its cost relative to one function evaluation is:
O
(
n
)
O(n)
O
(
n
)
times the function evaluation (same as bump-reval)
O
(
log
n
)
O(\log n)
O
(
lo
g
n
)
times the function evaluation
O
(
n
)
O(\sqrt{n})
O
(
n
)
times the function evaluation
Constant: about
3
-
5
×
3\text{-}5\times
3
-
5
×
one evaluation, independent of
n
n
n
6.
For a vega ladder over a
5
×
7
5\times 7
5
×
7
implied-vol surface (5 maturities, 7 strikes), how many full repricings do central differences need?
70 (an up- and a down-bump per pillar)
140 (up and down bumps plus a separate base each)
71 (70 bumped plus 1 base)
35 (one per pillar)
Submit