07-Jan-2022 16:01:29 black_scholes_test(): MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 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 Partial results: 1 2 2 2.03272 3 2.14791 4 2.00738 5 2.06018 6 2.08018 7 2.00036 8 1.9747 ...... .............. 101 2.92239 Data saved as "asset_path.txt". binomial_test(): binomial() applies 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() applies 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.144742 forward_test(): forward() applies 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.000000 0.001394 2.000000 0.037337 3.000000 0.223638 4.000000 0.627210 5.000000 1.209924 6.000000 1.914388 7.000000 2.695426 8.000000 3.522607 9.000000 4.376385 10.000000 5.244276 mc_test(): mc() applies 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.143670, 1.147202 ] black_scholes_test(): Normal end of execution. 07-Jan-2022 16:01:41