<jupyter_start><jupyter_text><jupyter_code>import numpy as np
import matplotlib.pyplot as plt
import math
import itertools
import scipy.stats as st
# Standard Brownian Motion
N = 10 # number of simul
T= 20 #time steps

random_walks = [1,-1] # heads/tails

plt.figure(1)
for i in range(N):
  steps = np.random.choice(random_walks,size=T).T  
  origin = np.zeros(1)
  path = np.concatenate([origin,steps]).cumsum(axis=0) 
  plt.plot(path)
plt.grid()
plt.title("Standard Brownian Motion")
plt.xlabel("t")
plt.ylabel("Move(s)")
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1400709219858156, 'fraction_numerical': 0.015957446808510637, 'mean_word_length': 5.420454545454546, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '649226', 'license': 'MIT', 'n_tokens_mistral': 234, 'n_tokens_neox': 216, 'n_words': 50, 'path': 'BrownianMotion.ipynb', 'repo_name': 'bkgsur/FinanceModelingComputation', 'size': '564'}