Skip to content
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

Predict rolling #15

Open
abdellah9 opened this issue Oct 21, 2022 · 2 comments
Open

Predict rolling #15

abdellah9 opened this issue Oct 21, 2022 · 2 comments

Comments

@abdellah9
Copy link

PytzUsageWarning: The localize method is no longer necessary, as this time zone supports the fold attribute (PEP 495). For more details on migrating to a PEP 495-compliant implementation, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
date_obj = stz.localize(date_obj)
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/root/intelligent-trading-bot/scripts/predict_rolling.py", line 281, in
main()
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1130,
in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1055,
in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1404,
in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/root/intelligent-trading-bot/scripts/predict_rolling.py", line 100, in main
prediction_start = find_index(df, P.prediction_start_str)
File "/root/intelligent-trading-bot/common/utils.py", line 135, in find_index
id = res.index[0]
File "/usr/local/lib/python3.8/dist-packages/pandas/core/indexes/base.py", line 5358, in getitem
return getitem(key)
IndexError: index 0 is out of bounds for axis 0 with size 0

@coltac
Copy link

coltac commented Jan 2, 2023

I get the same error runnin the predictrolling. Any hints?

@iploshchik
Copy link

the issue is related to initial starting point being outside the main window. the default setting of "2017-08-01" will be set outside the main feature matrix range, which is set by default to 3 years back in time (3 * 525600). so the prediction start can be either set manually to something closer or one can implement dynamic padding to automatically follow the latest date

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants