mirror of
https://github.com/wassname/rl-portfolio-management.git
synced 2026-08-20 07:30:15 +08:00
show env plotting
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 77 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 233 KiB |
@@ -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')
|
||||
```
|
||||

|
||||

|
||||
|
||||
|
||||
# Tests
|
||||
|
||||
Reference in New Issue
Block a user