Options Trading, Call, Put, Monte Carlo, Tejapi Quant.
sidt = sigma * np.sqrt(dt) for i in range(0,Npilot): for j in range(0,Nsteps): SPATH[i,j+1] = SPATH[i,j] * np.exp(nudt + sidt * np.random.normal()) Sn = SPATH[:, -1] if CallOrPut == 'call': Cn = np.maximum(SPATH[:,-1] - K, 0) * np.exp(-r*T) MatCov = np.cov(Sn, Cn)[0,1] VarY = S0 ** 2 * np.exp(2 * r