wbaik / gym-stock-exchange

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error in demo_exchange.py

opened this issue · comments

Hello,

When I tried your code demo_exchange.py, I got:

stable_baselines\common\vec_env\dummy_vec_env.py", line 75, in _save_obs
self.buf_obs[key][env_idx] = obs
ValueError: could not broadcast input array from shape (20,52) into shape (20,13)

Thanks for your help!

@cubicgate Hi, sorry for the inconvenience. It was due to my ignorance, enabled a portfolio feature while not updating this demo file (this version and my other project had some design difference, which I didn't reflect on here).

It works now for a single stock, though some work needs to be done to incorporate a portfolio type of trading.

Thanks @wbaik! It works now.

Hi @wbaik,

Could you provide an example for the discrete environment? Thanks!

@cubicgate Sure, though it's gonna take a long time... In a busy season, sorry.

Thanks @wbaik !