Python for Finance: Analyze Big Financial Data

(Elle) #1

expect the numerical estimate to lie under the true value in any numerically realistic case.


Alternative dual estimators can provide upper bounds as well.


[ 79 ]

Taken together, two such


different estimators then define an interval for the true American option value.


The main stated goal of this use case is to replicate all American option values of Table 1


in the original paper. To this end, we only need to combine the valuation object with a


nested loop. During the innermost loop, the valuation object has to be updated according


to the then-current parameterization:


In  [ 34 ]: %%time
ls_table = []
for initial_value in (36., 38., 40., 42., 44.):
for volatility in (0.2, 0.4):
for maturity in (dt.datetime( 2015 , 12 , 31 ),
dt.datetime( 2016 , 12 , 31 )):
am_put.update(initial_value=initial_value,
volatility=volatility,
maturity=maturity)
ls_table.append([initial_value,
volatility,
maturity,
am_put.present_value(bf= 5 )])
Out[34]: CPU times: user 31.1 s, sys: 3.22 s, total: 34.3 s
Wall time: 33.9 s

Following is our simplified version of Table 1 in the paper by Longstaff and Schwartz


(2001). Overall, our numerical values come pretty close to those reported in the paper,


where some different parameters have been used (they use, for example, double the


number of paths):


In  [ 35 ]: print “S0       |   Vola    |   T   |   Value”
print 22 * “-”
for r in ls_table:
print “%d | %3.1f | %d | %5.3f” % \
(r[ 0 ], r[ 1 ], r[ 2 ].year - 2014 , r[ 3 ])
Out[35]: S0 | Vola | T | Value
–––––––-
36 | 0.2 | 1 | 4.444
36 | 0.2 | 2 | 4.769
36 | 0.4 | 1 | 7.000
36 | 0.4 | 2 | 8.378
38 | 0.2 | 1 | 3.210
38 | 0.2 | 2 | 3.645
38 | 0.4 | 1 | 6.066
38 | 0.4 | 2 | 7.535
40 | 0.2 | 1 | 2.267
40 | 0.2 | 2 | 2.778
40 | 0.4 | 1 | 5.203
40 | 0.4 | 2 | 6.753
42 | 0.2 | 1 | 1.554
42 | 0.2 | 2 | 2.099
42 | 0.4 | 1 | 4.459
42 | 0.4 | 2 | 6.046
44 | 0.2 | 1 | 1.056
44 | 0.2 | 2 | 1.618
44 | 0.4 | 1 | 3.846
44 | 0.4 | 2 | 5.494

To conclude the use case, note that the estimation of Greeks for American options is


formally the same as for European options — a major advantage of our approach over


alternative numerical methods (like the binomial model):


In  [ 36 ]: am_put.update(initial_value=36.)
am_put.delta()
Out[36]: -0.4655
In [ 37 ]: am_put.vega()
Out[37]: 17.3411
Free download pdf