Trading, Finance, Stock Market, Quantitative Finance, Technical Analysis.
paths[t-1] * np.exp((r - 0.5 * sigma ** 2) * dt + sigma * np.sqrt(dt) * rand) return paths paths = generate_paths(100, 0.05, 0.2, 1, 252, 1000) Plotted Paths The above gives a good visual representation of what adding a drift term (mu) and diffusion term (sigma) to a random variable will do. We are