ElegantRL
ElegantRL copied to clipboard
Notebook eRL_demo_StockTrading.ipynb doen't work
Hi,
It seems that notebook eRL_demo_StockTrading.ipynb is deprecated and broken. It throughs the following error:
Traceback (most recent call last): File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap self.run() File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.7/dist-packages/elegantrl/run.py", line 340, in run agent.states = [env.reset(), ] File "/usr/local/lib/python3.7/dist-packages/elegantrl/envs/FinRL/StockTrading.py", line 47, in reset self.amount = self.initial_capital * rd.uniform(0.95, 1.05) - (self.stocks * price).sum() ValueError: operands could not be broadcast together with shapes (74,) (73,)
Hi @StefosGeo ,
You've to remove from tickers: 'ALXN' (from logs data for this ticker is no longer available) - then shapes will be correct. After this you'll probably encounter this: https://github.com/AI4Finance-Foundation/ElegantRL/issues/45