MATLAB FINANCIAL DERIVATIVES TOOLBOX Uživatelský manuál Strana 102

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 119
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 101
101
8.1.2 BSM Derivatives
From the same script as above, call a function with the name:
B
B
S
S
M
M
d
d
e
e
r
r
i
i
v
v
a
a
t
t
i
i
v
v
e
e
s
s
that returns the partial derivatives of the BSM formula (known as the Greek
letters) for both the call and the put value. The partial derivatives are:
delta:
Td
e)d(NS/c
=
1
,
Td
e)d(NS/p
=
1
theta:
)d(NrXe
?
sS)d(n
T/c
rT
2
1
2
=
)d(NrXe
?
sS)d(n
T/p
rT
2
1
2
+=
gamma:
TsS
)d(n
S/c
1
22
=
,
TsS
)d(n
S/p
1
22
=
vega: )d(nTSs/c
1
= , )d(nTSs/p
1
=
rho: )d(NXTer/c
rT
2
= , )d(NXTer/p
rT
2
=
where,
2
2
2
1
/z
e
p
)z(n
=
represents the normal probability density function with mean zero and unity
standard deviation (the build in function is named as
n
n
o
o
r
r
m
m
p
p
d
d
f
f). The
B
B
S
S
M
M
d
d
e
e
r
r
i
i
v
v
a
a
t
t
i
i
v
v
e
e
s
s calling syntax should be:
“[Derivatives] =
B
B
S
S
M
M
d
d
e
e
r
r
i
i
v
v
a
a
t
t
i
i
v
v
e
e
s
s(S, X, T, vol, r, Index, dv)”
The function should make similar checks as before. The output of the
function
B
B
S
S
M
M
d
d
e
e
r
r
i
i
v
v
a
a
t
t
i
i
v
v
e
e
s
s should be a row vector if the input arguments are
single values or a two dimensional array if the input arguments are vectors
with the following format:
“Derivatives=[Delta, Theta, Gamma, Vega, Rho]”
Zobrazit stránku 101
1 2 ... 97 98 99 100 101 102 103 104 105 106 107 ... 118 119

Komentáře k této Příručce

Žádné komentáře