Options Trading, Call, Put, Monte Carlo, Tejapi Quant.
mc_options_AV(CallOrPut, K, S0, r, sigma, T, Nsteps, Nrep): SPATH1 = np.zeros((int(Nrep/2), 1 + Nsteps)) SPATH2 = np.zeros((int(Nrep/2), 1 + Nsteps)) SPATH1[:, 0], SPATH2[:, 0] = S0, S0 dt = T / Nsteps nudt = (r - 0.5 * sigma **2) * dt sidt = sigma * np.sqrt(dt) for i in range(0,int(Nrep/2)): for j