MATLAB FINANCIAL DERIVATIVES TOOLBOX Bedienungsanleitung Seite 101

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 119
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 100
100
a function) named as “options_data.txt” in which the columns should contain
S, X, T, s, r, d. The data values are given below:
},,,,,,,,{S
120
115
110
105
100
95
90
85
80
=
,
}.,.,.,.{T
25
0
20
0
15
0
1
0
=
}.,.,.{s
3
0
2
0
1
0
=
and,
02
0
05
0
100
.d,.r,X
=
=
=
After creating the text file, you should have a 108-by-6 table since for each
value of T and s you have nine different possible values for S.
Note that the function:
Should check if the correct number of input arguments is supplied
and display an error massage otherwise (to do so, use the build-in
function
n
n
a
a
r
r
g
g
i
i
n
n; see the help facilities for understanding its use).
Set dividends equal to zero automatically if no dividend input is
supplied or if the dividend input argument is set to be an empty array
(use the build in function
e
e
x
x
i
i
s
s
t
t).
In order to prevent an error, the function should check whether the
input parameters are all positive or non-negative (elaborate on the
BSM formula to see which inputs should be >=0 and which only >0; d
and especially r with negative values can exist but do not have any
economical implication).
If “Index” takes a different value other than those explained before, an
error message should be returned and the program execution should
break. Additionally, an error should be returned and program
execution should stop if “Index” is a string matrix and not a string
vector (“Index” should be either 1-by-4 string vector in the case of a
'CALL' or a 1-by-3 in the case of a 'PUT').
Seitenansicht 100
1 2 ... 96 97 98 99 100 101 102 103 104 105 106 ... 118 119

Kommentare zu diesen Handbüchern

Keine Kommentare