vectorbt
vectorbt copied to clipboard
For the same precision data, there is an accuracy error in the results.
x = pd.read_csv('x.csv').to_numpy().flatten()
n1 = pd.DataFrame(x).rolling(window=4000, min_periods=1).std().to_numpy().flatten()
n2 = rolling_std(x, 4000, 1)
for x, (i, j) in enumerate(zip(n1, n2)):
if x<1000:
print(x, i, j)
else:
break