-
Notifications
You must be signed in to change notification settings - Fork 678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
index -1 is out of bounds for axis 0 with size 0 #18
Comments
Have you tried changing 'values[-1]' to 'iat[-1]'? def is_overbought_or_oversold(self):
[symbol_a, symbol_b] = self.symbols
last_price_a = self.df_hist[symbol_a].dropna().iat[-1]
last_price_b = self.df_hist[symbol_b].dropna().iat[-1] Hope this helps, |
I am having the same problem. where can I find the member for the return type of dropna()? V:\dev\trading\High-Frequency-Trading-Model-with-IB>docker-compose up |
Changed it to iat (could not find a reference to this anywhere, caused the same issue. Attaching to high-frequency-trading-model-with-ib_hft_model_1_1 |
Found the bug. It is Saturday here in Australia (9pm). Seems that this method is too greedy.
For GBPUSD pair, it cleaned it out. |
Good work debugging and resolving it. Those sneaky timezones. KJ |
Setting the window to 4 hours instead of 1 resolved the issue for me self.moving_window_period = dt.timedelta(hours=4) |
I am getting this error:
Exception has occurred: IndexError
index -1 is out of bounds for axis 0 with size 0
in this function:
Does anybody know of a way to solve it?
Thanks
The text was updated successfully, but these errors were encountered: