In [1]:
import numpy as np
import pandas as pd
import options.lsm as lsm

table = lsm.price_table(100000, 50)
np.transpose(pd.DataFrame.from_dict(table))
Out[1]:
European Price LSM American Price LSM American SE Simulated European Price Simulated European SE
36 0.2 1 3.844308 4.473337 0.009876 3.841138 0.013635
36 0.2 2 3.763001 4.827320 0.011893 3.982655 0.016281
36 0.4 1 6.711399 7.104770 0.019679 6.711362 0.023006
36 0.4 2 7.700040 8.465423 0.024178 8.184778 0.028316
38 0.2 1 2.851932 3.256599 0.009656 2.855663 0.012149
38 0.2 2 2.990557 3.728441 0.011645 3.155735 0.014785
38 0.4 1 5.834321 6.154242 0.019369 5.837305 0.021935
38 0.4 2 6.978802 7.637595 0.023774 7.442247 0.027542
40 0.2 1 2.066401 2.322347 0.008958 2.079413 0.010584
40 0.2 2 2.355866 2.877937 0.010946 2.501114 0.013323
40 0.4 1 5.059623 5.323717 0.018379 5.057777 0.020805
40 0.4 2 6.325999 6.903202 0.022808 6.719609 0.026494
42 0.2 1 1.464504 1.613934 0.007747 1.456605 0.008882
42 0.2 2 1.841354 2.205585 0.009963 1.960058 0.011901
42 0.4 1 4.378718 4.572274 0.017662 4.386564 0.019659
42 0.4 2 5.735618 6.222996 0.022171 6.062861 0.025483
44 0.2 1 1.016915 1.110343 0.006563 1.011694 0.007398
44 0.2 2 1.429215 1.689388 0.009085 1.528936 0.010495
44 0.4 1 3.782799 3.949719 0.016644 3.776469 0.018460
44 0.4 2 5.201995 5.652219 0.021964 5.572470 0.024679
In [ ]: