AI4Finance-Foundation / AI4Finance-Foundation/FinRL-Tutorials

Facing an error on Trade/Test set while using Covariance matrix as per the tutorial

未关闭
#85 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Jupyter Notebook
星标
1.2k
派生
435
PR 合并指标
30 天内没有已合并 PR

描述

[ValueError](Screenshot 2024-05-04 at 14 32 30) Traceback (most recent call last)
[](https://hxhvmrs903e-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab_20240430-060123_RC00_629368006#) in ()
96
97 e_trade_gym = StockTradingEnv(df = processed_trade,**env_kwargs)
---> 98 env_trade, obs_trade = e_trade_gym.get_sb_env()
99
100 df_account_value_sac, df_actions_sac = DRLAgent.DRL_prediction(

2 frames
[/usr/local/lib/python3.10/dist-packages/stable_baselines3/common/vec_env/dummy_vec_env.py](https://hxhvmrs903e-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab_20240430-060123_RC00_629368006#) in _save_obs(self, env_idx, obs)
106 for key in self.keys:
107 if key is None:
--> 108 self.buf_obs[key][env_idx] = obs
109 else:
110 self.buf_obs[key][env_idx] = obs[key] # type: ignore[call-overload]

ValueError: setting an array element with a sequence. The requested array would exceed the maximum number of dimension of 1.

Screenshot 2024-05-04 at 14 32 30

Screenshot shows how the cov_list feature looks on my testing/trading set. Please help

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。