Tue Oct 19 11:24:30 2021 black_scholes_test(): Python version: 3.6.9 Test black_scholes(). asset_path_test(): asset_path() simulates an asset price path. The asset price at time 0, S0 = 2.000000 The asset expected growth rate MU = 0.100000 The asset volatility SIGMA = 0.300000 The expiry date T1 = 1.000000 The number of time steps N = 100 Graphics saved as "asset_path.png" Partial results: 0 2 1 1.89374 2 1.91779 3 1.98392 4 2.03887 5 2.00293 6 1.94134 7 1.85253 ...... .............. 100 2.79191 Full results written to "asset_path.txt". binomial_test(): binomial() uses the binomial method for option valuation. The asset price at time 0, S0 = 2.000000 The exercise price E = 1.000000 The interest rate R = 0.050000 The asset volatility SIGMA = 0.250000 The expiry date T1 = 3.000000 The number of intervals M = 256 The option value is 1.144756 bsf_test(): bsf() uses the Black-Scholes formula for option valuation. The asset price at time T0, S0 = 2.000000 The time T0 = 0.000000 The exercise price E = 1.000000 The interest rate R = 0.050000 The asset volatility SIGMA = 0.250000 The expiry date T1 = 3.000000 The option value C = 1.144743 forward_test(): forward() uses the forward difference method for option valuation. The exercise price E = 4 The interest rate R = 0.03 The asset volatility SIGMA = 0.5 The expiry date T1 = 1 The number of space steps NX = 11 The number of time steps NT = 29 The value of SMAX = 10 Initial Option Value Value 1 0.00139363 2 0.0373367 3 0.223638 4 0.62721 5 1.20992 6 1.91439 7 2.69543 8 3.52261 9 4.37638 10 5.24428 mc_test(): mc() uses the Monte Carlo method for option valuation. The asset price at time 0, S0 = 2.000000 The exercise price E = 1.000000 The interest rate R = 0.050000 The asset volatility SIGMA = 0.250000 The expiry date T1 = 3.000000 The number of simulations M = 1000000 The confidence interval is [ 1.143583, 1.147116 ] black_scholes_test(): Normal end of execution. Tue Oct 19 11:24:34 2021