timeSeries = {
const runs = []
for (let r = 0; r < numberOfRuns; r = r+1) {
const run = []
run[0] = {time: timeSteps[0], value: initialValue }
const noiseSteps = Array.from({length: numberOfSamples}, d3.randomNormal(0, Math.sqrt(timeStepDuration)))
for(let i = 1;i < numberOfSamples+1;i = i + 1){
const previousValue = run[i-1]['value']
run[i] = {time: timeSteps[i], value: (muStep * previousValue) + (previousValue * sigma * noiseSteps[i-1]) }
}
runs.push(run)
}
return runs
}