12-Oct-2022 08:16:15 black_scholes_test(): MATLAB/Octave version 4.2.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: 2.0000 2.0019 2.0598 2.1292 2.1322 2.2470 2.0935 2.0361 2.1242 2.1381 ... 1.2783 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.142991, 1.146526 ] black_scholes_test(): Normal end of execution. 12-Oct-2022 08:16:25