
for s
imp
. It is known that such equation has no analytic solution, so to solve
it someone has to implement a numerical root-finding algorithm. The most
well known root finding algorithm for the implied volatility problem is the
Newton-Raphson method.
The Newton method is very simple and quite fast method. It can be
summarized in three steps:
• Step #1: give an initial guess for
imp
s
(e.g. 10
0
.s
imp
= )
• Step #2: perform an algorithm iteration, k, based on the following
formula:
⇒
∂
−
−
−=−=
−−
c
cc
s
)e('g
)e(g
ss
BSM
BSMmrk
k
imp
k
imp
k
imp
11
c
cc
ss
BSM
BSMmrk
k
imp
k
imp
∂
−
+=
−1
for k=1,2,3,….
• Step #3: If |g(e)|<e then stop and return
k
imp
s , otherwise go to Step
#2 and perform one more iteration, k, of the algorithm (the e is the
desire accuracy, usually set to a very small quantity)
Write a function with the following calling syntax:
“[ImpliedVol]=
B
B
S
S
M
M
i
i
m
m
p
p
l
l
i
i
e
e
d
d
V
V
o
o
l
l(Qmrk, S, X, T, r, Index, dv, maxNumIter, tol)”
where “Qmrk” is the market quote of a call or put option. “maxNumIter”
represents the number of iterations and “tol” the desire accuracy (it is a
stopping criterion related with the absolute difference of market option value
and BSM estimate). “Index” is a single string with values “CALL” and “PUT”
(or any other combination that delivers the required word meaning) that is
used to distinguish between calls and puts as before. Note that all input
Komentáře k této Příručce