show env plotting

This commit is contained in:
wassname
2017-10-30 15:29:46 +08:00
parent 4e5df66088
commit 4813fa382c
3 changed files with 13 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 KiB

+13
View File
@@ -92,7 +92,20 @@ env = PortfolioEnv(
output_mode='mlp'
)
# Let run it with random actions then plot
for _ in tqdm(range(50)):
action = env.action_space.sample()
action /= action.sum()
state, reward, done, info = env.step(action)
if done:
break
env.render('notebook')
```
![](docs/img/price_performance.png)
![](docs/img/weights.png)
# Tests