ChatGPT_Trading_Bot
ChatGPT_Trading_Bot copied to clipboard
Error on get df_sumary
On execute this code:
df_summary = ensemble_agent.run_ensemble_strategy(A2C_model_kwargs,
PPO_model_kwargs,
DDPG_model_kwargs,
timesteps_dict)
I get this error:
============Start Ensemble Strategy============
============================================
turbulence_threshold: 234.1933647436273
======Model training from: 2013-01-01 to 2022-05-02
======A2C Training========
{'n_steps': 5, 'ent_coef': 0.005, 'learning_rate': 0.0007}
Using cuda device
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[34], line 1
----> 1 df_summary = ensemble_agent.run_ensemble_strategy(A2C_model_kwargs,
2 PPO_model_kwargs,
3 DDPG_model_kwargs,
4 timesteps_dict)
File [~/.local/lib/python3.10/site-packages/finrl/agents/stablebaselines3/models.py:469](https://file+.vscode-resource.vscode-cdn.net/home/pczin/Documents/projects/ChatGPT_Trading_Bot/~/.local/lib/python3.10/site-packages/finrl/agents/stablebaselines3/models.py:469), in DRLEnsembleAgent.run_ensemble_strategy(self, A2C_model_kwargs, PPO_model_kwargs, DDPG_model_kwargs, timesteps_dict)
465 print("======A2C Training========")
466 model_a2c = self.get_model(
467 "a2c", self.train_env, policy="MlpPolicy", model_kwargs=A2C_model_kwargs
468 )
--> 469 model_a2c = self.train_model(
470 model_a2c,
471 "a2c",
472 tb_log_name=f"a2c_{i}",
473 iter_num=i,
474 total_timesteps=timesteps_dict["a2c"],
475 ) # 100_000
477 print(
478 "======A2C Validation from: ",
479 validation_start_date,
480 "to ",
481 validation_end_date,
...
---> 76 obs, self.reset_infos[env_idx] = self.envs[env_idx].reset(seed=self._seeds[env_idx])
77 self._save_obs(env_idx, obs)
78 # Seeds are only used once
TypeError: StockTradingEnv.reset() got an unexpected keyword argument 'seed'
Any solution?
Same. Any progress on this?
heres a solution
https://github.com/AI4Finance-Foundation/FinRL/issues/1202#issuecomment-2043427069