0% found this document useful (0 votes)
17 views8 pages

No Title Available - 2016 - Computational Finance Using C and C

Uploaded by

sandeep222
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views8 pages

No Title Available - 2016 - Computational Finance Using C and C

Uploaded by

sandeep222
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Index

A Barrier options, 80, 82–90, 113, 307–313


down and out call, 82–84, 307–309
Absolute pricing errors, 162 Monte Carlo pricing, 86–90
American options, 57, 93–174
equity, 262–266
call options, 95–97
foreign exchange, 269, 273
Black approximation, 96, 97
up and out call, 84–86, 309–312
with cash dividends, 93–97
Base currency, 224
critical asset values, 102–104
Basis swap, 205–207
MacMillan–Barone–Adesi–Whaley
Bayes law, 18, 88
method, 100, 101, 107, 108
BBS, see binomial Black–Scholes
pricing errors, 129
method
Roll–Geske–Whaley approximation,
BBSR, see binomial Black–Scholes
93–96
method, with
implied volatility, 76
Richardson extrapolation
put options, 171
BEGKR method, 178, 181, 182
critical asset values, 104–106
Binomial Black–Scholes method, 125–
MacMillan–Barone–Adesi–Whaley
127
method, 101, 102, 107, 108
with Richardson extrapolation, 127–
pricing errors, 130
129
stochastic lattice, 162–174
Binomial lattice, 76, 108–117
asset prices, 164, 167
Monte Carlo estimate, 171, 173 backwards iteration, 118, 119
option prices, 167, 169 with BBS and BBSR, 125–129
simulation parameters, 164 computation of Greeks, 119–125
two assets, 186, 189, 191, 192 construction and use, 115–122
vanilla, 93–106 with control variate, 125
call with cash dividends, 93–97 node asset values, 115, 117
grid methods, 130–159 terminal node option payoff, 117
lattice methods, 108–129 values of constants, 115
MacMillan–Barone–Adesi–Whaley Black approximation, 96, 97
method, 97–102 Black–Scholes equation, 10, 35, 52
numerical solution of critical asset val- American options, 125
ues, 102–106 binomial, 125, 127
Amortization, 205 with Richardson extrapolation, 127,
Analytic pricing, 129
down and out call options, 82–84 continuous dividends, 69–71
up and out call options, 84–86 derivation of, 59–62
Annualized standard deviation, 73 discrete dividends, 71
Arithmetic progression, 334 equity quanto options, 232–235
Asset price index, 154 European options, 59–79, 125
Asset price movements, Brownian multiasset option, 62–64
motion, 8, 9 foreign exchange, 222–225
Asset price, stochastic lattice, 164, 167 Greeks, 71–73
Asset values, 115, 117 historical volatility, 73, 75
Avogadro’s number, 5 implied volatility, 75, 76
multiasset options, 175,
B see also grid methods; MacMillan–
Barone–Adesi–Whaley method
Back-substitution, 140 Black–Scholes finite-difference approxi-
Backwards iteration, 118, 119, 141, 145, mation, 337–339
146 general case, 337

363
364 Index

log transformation, 337–339 portfolio configuration file, 239


nonuniform grid method, 142–149 portfolio definition file, 239
uniform grid method, 133–137, 154, broad-investments, 243–247
155, 337–339 EQ-investments, 242, 243, 245, 247
Black_Scholes function, 254 portfolio driver file, 242
Boundary values, 137, 138 portfolio valuer application, 240, 242
lower asset, 137 storing/retrieving market data,
option maturity, 137, 138 247–251
upper asset, 137 CurrencyTable, 247–250
Box–Muller transformation, 40–42, 49 EquityTable and CorrelationTable,
Brownian bridge, 17–19 250, 251
alternative derivation, 341–343 Call options,
down and out call options, 86–90 American, 95–97
relation to Ornstein–Uhlenbeck bridge, Black approximation, 96, 97
27, 28 with cash dividends, 93–97
Brownian model of asset price critical asset values, 102–104
movements, 8, 9 MacMillan–Barone–Adesi–Whaley
Brownian motion, 5–8, 82 method, 100, 101, 107, 108
asset price movements, 8, 9 pricing errors, 129
drift, Roll–Geske–Whaley approximation,
changing, see Girsanov’s theorem 93–96
constant, 8 double knockout, 158–166
zero, 8 down and in, 80
geometric, 9, 11, 175 down and out, 80, 82–84, 159
Ito’s quotient rule, 16, 17 analytic pricing, 82–84
multiasset geometric, 12–14 Brownian bridge, 86–90
one source of randomness, 15, 17 Monte Carlo pricing, 86–90
proofs, 345–351 nonuniform grid method, 143, 149
properties of, 6–8 European, 58, 61, 62, 66, 70–73, 75,
scaled, 20 76, 78
time-transformed, 19–22 multiasset,
Brown, Robert, 5, 7 four assets, 198
bs_opt function, 78 three assets, 193, 196
bs_opt_barrier_downout_call two assets, 186, 189
function, 84 up and in, 80
up and out, 80, 84–86
analytic pricing, 84–86
C vanilla,
C# code, 239 American, 93–106
C# portfolio pricing, 239–273 European, 57, 66, 79, 80
equity deal classes, 254–266 Caplet, quanto, 216–218
equity barrier option, 262–266 Central limit theorem, 315
generic equity basket option, Cholesky decomposition, 45, 47, 49
258–262 Closed form solutions, 175
single equity options, 254 Conditional mean, 321, 322
two-equity option, 254–257 Constant drift, 8
foreign exchange deal classes, 266– Continuous dividends, 58, 59, 69–71
269, 273 Continuous hazard rate, 226
FX barrier option, 269–273 Continuously compounded spot rate, 203
FX forward, 266, 267 Control variate technique, 125
single FX option, 267–269 Correlated variates, 44–55
market data file, 239 correlation and covariance, 43, 44
Index 365

lognormal distribution, 53–55 vanilla European options, 302, 303


normal distribution, 48–52 Depth first procedure, 171
repairing correlation and covariance Diff swaplet, see quanto, swaplet
matrices, 45–48 Differential swaplet, see quanto, swaplet
Correlation, 44 Discrete dividends, 58–71
Correlation matrix, 12, 44 Dividends,
optimally repaired, 46–48 continuous, 58, 59, 69–71
repair of, 45–48 discrete, 58
CorrelationTable, 250, 251 Double knockout call option, 158–166
Coupon payment, 205 Greeks, 159
early, 210 Down and in call options, 80
floating leg, 205 Down and out call options, 80–84, 159
late, 210, 211 analytic pricing, 82–84
on time, 208, 209 Brownian bridge, 86–90
Covariance, 319, 320 derivation of, 307–309
estimation of, 44 DownOutEquityOption-Deal, 265
four variables, 319 Drunkard’s walk, see Brownian motion
normal distribution, 321, 322
n variables, 319, 320
three variables, 319
E
two variables, 319 Early coupon payment, 210
unconditional, 21, 22 Early exercise, 141–146
Covariance matrix, 175, 320 Eigen decomposition, 45
repair of, 45–48 Equity barrier option, 262–266
Covered interest arbitrage, 221, 222 Equity deal classes, 254–266
Cox–Rubinstein–Ross binomial model, equity barrier option, 262–266
181 generic equity basket option, 258–262
Crank–Nicolson method, 136, 152, 155, single equity options, 254
162 two-equity option, 254, 256, 257
Credit default swap, 228 Equity derivatives, 229–235
Credit derivatives, 225–229 quantos, 232–235
credit default swap, 228 equity quanto forward, 234, 235
defaultable bond, 228 quanto adjustment factor, 233, 234
hazard rate, 225, 226 total return swap, 229–232
continuous, 226 equity leg, 229, 230
estimation from market observables, equity swap, 231, 232
226, 228 floating leg, 230
total return swap, 228, 229 payer equity, 230, 231
Credit risk, 2 EquityOptionDeal, 254
Critical asset values, numerical solution, Equity quanto forward, 234, 235
102–106 EquityTable, 250, 251
CRR lattice, 108 European options, 57–90
Cumulative normal distribution function, barrier options, 80–90
333, 334 down and out call options, 82–84
CurrencyTable, 247–250 Monte Carlo pricing of down and out
Current value, 57 options, 86–90
up and out call options, 84–86
D call options, 58, 61, 62, 66, 70–73, 75,
76, 78
Defaultable bond, 228 double knockout, 158, 159, 164, 166
Delta, 71, 114, 159 down and in, 80
computation of, 119 down and out, 80–84, 143, 151, 159
366 Index

two assets, 186, 189 Fully implicit method, 136


foreign exchange, 222–225 FX, see foreign exchange
implied volatility, 75, 76 FX forward, 222, 266, 267
martingale measure, 57, 58
multiasset,
four assets, 198
G
three assets, 193, 196 Gamma, 71, 114, 159
two assets, 183–185 computation of, 119
put call parity, 58, 59 vanilla European options, 301, 302
continuous dividends, 58, 59 Gamma function, 333
discrete dividends, 58 Gaussian distribution, see normal
put options, 57 distribution
four assets, 198 General error distribution, 330, 331
three assets, 194, 196 kurtosis, 330, 331
two assets, 186, 189 shape parameter a, 331
vanilla, 57, 59–73, 75, 76, 78–80 value of λ for variance h i , 330
Black–Scholes equation, 59–62 Generic equity basket option, 258–262
call options, 57–80 GenericEquityBasketOptionDeal, 258–
Greeks for, 301–305 262
put options, 57 Geometric Brownian motion, 9, 11, 175
volatility, Geometric progression, 334
historical, 73, 75 Girsanov’s theorem, 11, 12, 65, 69
implied, 75, 76 Going short, 60, 63
Exotic options, 79, 93, 113, 125, 141, Greeks, 114,
159, 176 see also individual Greeks
Explicit method, 136 binomial lattice, 119, 121, 122, 125
Black–Scholes equation, 71–73
double knockout call option, 159
F vanilla European options, 301–305
Faure sequence, 39 Grid methods, 129–159, 162
Feynman–Kac formula, 61, 353, 354 double knockout call option, 158, 159
Filtration, 6 log transformation,
Financial derivatives, 1–3 nonuniform grids, 155–157, 162
Finite-difference approximation, see uniform grids, 151–162
Black–Scholes finite-difference nonuniform grids, 142–152
approximation down and out call option, 143, 149
Floorlet, quanto, 219 finite-difference approximation,
Foreign exchange call, 224, 225 143–149
Foreign exchange deal classes, 266–273 log transformation, 155–162
FX barrier option, 269–273 uniform grids, 130–146
FX forward, 266, 267 backwards iteration and early
single FX option, 267–269 exercise, 141–146
Foreign exchange derivatives, 221–225 boundary conditions, 137, 138
covered interest arbitrage, 221, 222 finite-difference approximation,
European option, 222–225 133–137
FX forward, 222 log transformation, 151–162
Foreign exchange forward, 1, 222 option values, 138–141
Foreign exchange option, 2, 3
Forward rate agreement, 204 H
Four asset options, 196–198
FourEquityOptionDeal, 260 Hazard rate, 225, 226
Fubini’s theorem, 24, 28 continuous, 226
Index 367

estimation from market observables, K


226, 228
Knockin options, 79
Hazard rate curve, 226
Knockout options, 79, 87
Heavy tail distributions, 176
Hedge statistics, see Greeks
L
Late coupon payment, 210, 211
I Lattice methods,
ICurve, 249, 250 binomial lattice, 76, 108–117
Implicit method, 136 backwards iteration, 118, 119
implied_volatility function, 76 with BBS and BBSR, 125–129
Implied volatility, computation of Greeks, 119–125
American options, 76 construction and use, 115–122
European options, 75, 76 with control variate, 125
Independent variates, 39–43 node asset values, 115, 117
terminal node option payoff, 117
lognormal distribution, 42, 43
values of constants, 115
normal distribution, 40, 41
multiasset options, 178–182
student’s t-distribution, 43
stochastic lattice, 161–173
Integrals, asset prices, 164, 167
barrier option, 307–313 Monte Carlo estimate, 171–173
down and out call, 307–309 option prices, 167–169
up and out call, 309–313 simulation parameters, 164
standard, 333 Law of large numbers, 315
stochastic, 30 Lockout periods, 113
Interest rate derivatives, 203–220 log transformation,
continuously compounded spot rate, nonuniform grids, 155–162
203, 204 uniform grids, 154–162
forward rate agreement, 204 Lognormal distribution, 42, 43, 52, 53,
quantos, 216–220 55, 108, 326, 327
caplet, 216–218 Lognormal mean, 108
floorlet, 219 Lognormal variance, 110
swaplet, 220 London Inter Bank Offer Rate (LIBOR),
simply compounded spot rate, 204 206
timing adjustment, 211–216 Low discrepancy sequences, 36
Interest rate swap, 205–211
amortization, 205 M
basis swap, 205–207
MacMillan–Barone–Adesi–Whaley
coupon payment, 208–211
method, 97–102, 107, 108,
floating leg, 205
see also Black–Scholes equation
general payment timing, 209, 210
Main currency, 207
swap rate, 205 MarketDataDictionaries, 247, 248, 250,
vanilla, 205 251
Ito’s formula, 9–11 Market data file, 239
multiasset geometric Brownian Market data, storing/retrieving, 247–251
motion, 12–14 CurrencyTable, 247–250
two-dimensional, 64 EquityTable and CorrelationTable,
Ito’s isometry, 24, 29 250, 251
Ito’s product rule, 14, 15 Market observables, 226, 228
n dimensions, 17 Market rate dictionaries, 243
Ito’s quotient rule, 15–17, 233 Markov process, 6
368 Index

Martingale measure, 6, 57, 58 mean, 325


Maturation, 57 variance, 325, 326
Mean, 23 Numeraire, 58, 211–215
Ornstein–Uhlenbeck process, 23
unconditional, 21 O
Microsoft Excel,
CALCULATE OPTIONS, 79 Obligation, 1
NORMDIST, 79 Option payoff, 117
pricing options, 78, 79 Option prices, 167, 169
Moment generating functions, 322, 323 Option values, 138–141
Monte Carlo pricing, 86–90 Ornstein–Uhlenbeck bridge, 25–28
nonuniform grid method, 143, 149 relation to Brownian bridge, 27, 28
Monte Carlo simulation, 35, 161 Ornstein–Uhlenbeck process, 20–25
American option, 171, 173 mean, 23
down and out options, 86–90 unconditional mean, 21, 23
multiasset options, 176–178 unconditional variance/covariance, 21,
with random numbers, 37, 39 22
Multiasset geometric Brownian motion, variance, 23, 24
12–14
Multiasset options, 175–198 P
Black–Scholes equation, 62–64, 175
Payer equity total return swap, 230, 231
four assets, 196–198
Payer interest rate swap, 205
lattices, 178–182
Payment timing, 209, 210
Monte Carlo methods, 176–178
Payoff, 57
three assets, 193–196
Portfolio configuration file, 239
two assets, 183–193
Portfolio definition file, 239
American options, 186–192
broad-investments, 243, 245–247
European exchange options, 183–185
EQ-investments, 242, 243, 245, 247
European options on maximum or min- Portfolio driver file, 242
imum, 185–186 Present value, 58
Multivariate distributions, 39–43 Pricing errors, 129, 130
generation of, 44–55 Pricing options, Microsoft Excel, 78, 79
lognormal distribution, 42, 43, 52–55, PricingUtils, 254
108, 326, 327 Principal exchange, 207
normal distribution, see normal distri- Pseudo-random sequences, 36–39
bution Put call parity, 73
Student’s t-distribution, 43, 328, 329 continuous dividends, 58, 59
discrete dividends, 58
N Put options,
American, 171
Neiderreiter sequence, 36, 37 critical asset values, 104–106
Newton’s method, 75, 76, 93 MacMillan–Barone–Adesi–Whaley
Nonuniform grids, 143, 146–152 method, 101, 102, 107, 108
down and out call option, 143, 149 pricing errors, 130
finite-difference approximation, European, 57
143, 145–149 four assets, 198
log transformation, 155–162 three assets, 194, 196
Normal distribution, 10, 19, 40–41, 48– two assets, 186, 189
52, 325, 326 multiasset,
conditional mean, 321, 322 four assets, 198
covariance, 321, 322 three assets, 193, 196
cumulative function, 333, 334 two assets, 186, 189
Index 369

Q Single FX option, 267–269


Sobol sequences, 36, 39, 177, 178
Quantos,
Spot rate,
equity, 232–235
continuously compounded, 203
equity quanto forward, 234, 235
simply compounded, 204
quanto adjustment factor, 233, 234
Standard deviation, annualized, 73
interest rate, 216–220
Standard integrals, 333
caplet, 216–218
Stochastic integral, expectation of, 30
floorlet, 219
Stochastic lattice, 161–173
swaplet, 220
asset prices, 164, 167
Quasirandom_Normal_LogNormal_Correlated
Monte Carlo estimate, 171–173
function, 50–52
option prices, 167–169
Quasi-random sequences, 36–39
simulation parameters, 164
Stochastic processes, 5–32
R Brownian bridge, 17–19
Brownian model of asset price move-
Radon–Nikodym derivative, 11
ments, 8, 9
Random variates, 35–55
Brownian
correlated variates, 44–55
motion, 5–8
independent, 39–43
time-transformed, 19–22
lognormal distribution, 42, 43
Girsanov’s theorem, 11, 12
normal distribution, 40, 41
student’s t-distribution, 43 Ito’s formula, 9–11
pseudo-random/quasi-random multiasset geometric Brownian
sequences, 36–39 motion, 12–14
Random walk, see Brownian motion Ito’s product,
Rate swap, 205–211 in n dimensions, 17
amortization, 205 and quotient rules, 14–17
basis swap, 205–207 Ornstein–Uhlenbeck bridge, 25–28
coupon payment, Ornstein–Uhlenbeck process, 20–25
early, 210 Strike price, 57
late, 210, 211 Structured deal, 231
on time, 208, 209 Student’s t-distribution, 43, 328, 329
floating leg, 205 Swaplets, 205
general payment timing, 209, 210 quanto, 220
payer, 205 Swap rate, 205
receiver, 205
swap rate, 205 T
vanilla, 205
Receiver interest rate swap, 205 Taylor expansion, 9, 13, 148
Return, 8 Theta, 71, 114, 159
Rho, 71 computation of, 119, 121
vanilla European options, 304 vanilla European options, 303, 304
RiskFreeRate, 249 Three asset options, 193–196
Roll–Geske–Whaley approximation, Time-transformed Brownian motion,
93–98 19–22
Timing adjustment, 211–216
Total return swap,
S credit, 228, 229
Scaled Brownian motion, 20 equity, 229–232
Siedentopf, Henry, 5 equity leg, 229, 230
Simply compounded spot rate, 204 equity swap, 231, 232
Single equity options, 254 floating leg, 230
370

payer equity, 230, 231 call, 57, 66, 79, 80


Trading days, 73 Greeks for, 301–305
Two asset options, 183–193 put, 57
American, 186–192 grid methods, 129–162
European, 183–185 double knockout call option, 158, 159
maximum or minimum, 185 nonuniform grids, 142–152
Two-equity option, 254, 256, 257 uniform grids, 130–146
interest rate swap, 205
U Variance, 23, 24, 317–319
n variables, 317, 319
Unconditional mean, 21 one variable, 317
Unconditional variance, 21, 22 Ornstein–Uhlenbeck process, 23, 24
Uniform grids, 130–146 three variables, 317
backwards iteration and early exercise, two variables, 317
141–146 unconditional, 21, 22
boundary conditions, 137, 138 Vega, 72
finite-difference approximation, computation of, 121
133–137 vanilla European options, 305
log transformation, 151–162 Visual Basic, 78–80
option values, 138–141 bs_opt, 80
Up and in call options, 82 bs_opt_barrier_downout_call, 84
Up and out call options, 79, 84–86 Volatility, 7
analytic pricing, 84–86 historical, 73, 75
derivation of, 309–313 implied, 75, 76
Volatility smile, 75
V
Vanilla options, W
American, 93–106
call with cash dividends, 93–97 Wiener, Norbert, 5
grid methods, 129–162 Wiener process, see Brownian motion
lattice methods, 108–129
MacMillan–Barone–Adesi–Whaley Y
method, 97–102
numerical solution of critical asset val- YieldCurve, 249
ues, 102–106
binomial lattice, 76, 108–117 Z
with BBS and BBSR, 125–129
construction and use, 115–122 Zero coupon rate, 249
with control variate, 125 Zero drift, 8
European, 57, 59–80 Zsigmondy, Richard, 5

You might also like