intelligent-trading-bot icon indicating copy to clipboard operation
intelligent-trading-bot copied to clipboard

Predict rolling

Open abdellah9 opened this issue 2 years ago • 2 comments

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

abdellah9 avatar Oct 21 '22 06:10 abdellah9

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

coltac avatar Jan 02 '23 02:01 coltac

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

iploshchik avatar Apr 25 '23 17:04 iploshchik