MATLAB FINANCIAL DERIVATIVES TOOLBOX Manual do Utilizador Página 100

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 119
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 99
99
dze
p
)z(N
x
z
=
2
2
1
2
1
represents the cumulative normal distribution function with mean zero and
unity standard deviation (the Matlab build in function is named as:
n
n
o
o
r
r
m
m
c
c
d
d
f
f).
The value of a European put option can also be defined via the BSM as:
)d(NSe)d(NXep
TdrTBSM
1
2 =
8.1.1 Implementation of the BSM Formula
We want to create a script named as OptionsBSM.m that calls the user
created function
B
B
S
S
M
M
p
p
r
r
i
i
c
c
e
e to price European call, c, and European put, p,
options using the Black, Scholes and Merton model (BSM). The function
B
B
S
S
M
M
p
p
r
r
i
i
c
c
e
e should take seven (at least six) input parameters (as single values
or in the form of a vector) and should return the value (or the vector) of a
European call or put. Its calling syntax should look like:
“[Price] =
B
B
S
S
M
M
p
p
r
r
i
i
c
c
e
e(S, X, T, vol, r, Index, dv)”
“Index” is a string input argument that is set as an additional input
argument that takes the values: 'CALL' (or any other spelling of the 'CALL'
such as 'Call', 'CaLL', etc), or 'PUT' (or any other spelling of the 'PUT' such as
'Put', 'PuT', etc) and should be used to define the kind of option type (use the
build in function
l
l
o
o
w
w
e
e
r
r to convert the “Index” to lower case). Note the “Index”
precedes “dv” because “dv” should be an optional input (will come back to
this in a while).
To validate the formula, via the script create a table that tabulates the call
and put values against the moneyness ratio, S, and maturity, T. The data
should be loaded from a text file (that the user creates either by hand or via
Vista de página 99
1 2 ... 95 96 97 98 99 100 101 102 103 104 105 ... 118 119

Comentários a estes Manuais

Sem comentários