Skip to content

Instantly share code, notes, and snippets.

@Vayel Vayel/
Created Aug 21, 2018

What would you like to do?
import random
import json
Y0 = 100
noise = lambda: random.gauss(0, 0.01)
def run(steps):
y = [Y0] * steps
for t in range(1, steps):
y[t] = y[t-1] * (1 + noise())
return y
if __name__ == '__main__':
steps = 60
runs = 10000
data = [run(steps) for _ in range(runs)]
with open("asset.json", "w") as f:
json.dump(data, f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.