Created
December 19, 2022 12:11
-
-
Save btotr/5ac4101f25515ca8b09e5550a515cb4f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def window(slope, size=20): | |
std=[0]*round(len(slope)/(size)) | |
p = 0 | |
for i in range(0, len(slope)-size, size): | |
k=[0]*(size+1) | |
for t in (0, size): | |
k[t] = slope[i+t] | |
std[p] = np.max(k) - np.min(k) | |
print(np.max(k), np.min(k), std[p] ) | |
p = p + 1 | |
return std | |
windowSlope = np.array(window(GC.series(GC.SERIES_SLOPE),50)) | |
print(np.std(windowSlope)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment