Last active
December 20, 2019 21:51
-
-
Save 3catz/163150b9232b1ec7f0b437ad2cd4b4a1 to your computer and use it in GitHub Desktop.
Adaptive Norming
This file contains hidden or 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
| trainstock = yf.Ticker("SPY") | |
| start = "2009-01-01" | |
| end = "2016-01-01" | |
| st = trainstock.history(start = start,end = end) | |
| st = st[["Close","Open","Volume","High","Low"]] | |
| D = reconstruct(st["Close"].values, dim = 45, tau = 1) | |
| win = D[:,:-1] ; s = D[:,-1] | |
| std = np.std(win, axis = -1) | |
| mu = np.mean(win, axis = -1) | |
| print(std.shape, mu.shape) | |
| s = (s - mu)/std |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment