Bachelier model in terms of normal distribution to simulate price

Bachelier Model is $$dS_t = rdt + 𝜎dW_t$$ and can also write to $$S_t = S_0 + 𝜎W_t$$ How can write $$W_t$$ in terms of normal distribution?

Basically I want to simulated the underlying asset in the Bachelier Model. Thank you.

import numpy as np
from matplotlib import pyplot as plt

def terminal_value(S0, sigma, M):
S = np.zeros(M)
S[0] = S0
for i in range(1, M):
S[i] = S[i-1] + sigma * np.random.standard_normal() * np.sqrt(1/M)
return S

for i in range(10):
series = terminal_value(100, 10, 100)
plt.plot(series)


It works now and produces the following:

• Thank you for your answer, but I am not asking about coding. I am not sure whether the formula that I used to produce St is correct or not. I want to ask about how to write St's formula in terms of normal distribution. Oct 8 '20 at 0:51
• Your code is correct. $\sigma W_t$ is normally distributed, with mean 0 and variance $\sigma^2 t$ Oct 8 '20 at 0:56
• Ok. Thank you so much! Oct 8 '20 at 1:00
• @user50317: What StackG is implying is that, if you want to simulate the continuous trajectory of $W$ from time $t$ to time $t+\triangle t$, then a good discrete approximation is N(0, $\triangle t$). Oct 8 '20 at 1:02
• @markleeds it is more than just a good approximation, as in this case this Euler-Maruyama update is a sample from the exact distribution, and so has no bias. Oct 8 '20 at 6:08