I'm plotting Stock prices that evolve according to geometric Brownian motion. You don't need to understand the mathematics, I've taken care of it all. But, my plots are not what I want them to be. They are too bunched up together
and for some reason it's adding these straight lines which I think might be lines of best fit, but I can't see at all where it comes from my code.
Here is my python code. Any suggestions to help me distinguish the paths better, and get rid of those straight lines?
from scipy.stats import norm
from scipy import sqrt
import matplotlib.pyplot as plt
def Euler_disc(S0, mu, sigma, T, n):
times = [0]
stocks = [S0]
dt = ((float(T)/n))
for i in range(0, 10):
for x in range(0, n):
times.append(times[x] + dt)
stocks.append(stocks[x] + mu * stocks[x] * dt \
+ sigma * stocks[x] * sqrt(dt) * norm.rvs(0, 1, 1))
plt.plot(times, stocks)

0, 0after the last point, there will be a line from your last point straight back to0, 0.iloop for?