Skip to content

Commit 154e0e7

Browse files
Update to make a package
1 parent 322e35d commit 154e0e7

9 files changed

+38
-2
lines changed

.gitignore

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
__pycache__
2+
dist
23
.ipynbcheckpoints
3-
my_example.py
4+
5+
my_example.py
6+
pyproject.toml
7+
.pypirc
8+
*.egg-info

LICENSE.txt

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) [year] [fullname]
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ while not truncated:
9393
action = env.action_space.sample()
9494
observation, reward, done, truncated, info = env.step(action)
9595
```
96+
- ```observation``` returns a dict with items :
97+
- ```features``` : Contains the features created. If windows is None, it contains the features of the current step (shape = (n_features,)). If windows is i (int), it contains the features the last i steps (shape = (5, n_features)).
98+
- ```position``` : The last position of the environments. It can be useful to include this to the features, so the agent knows which position he is holding and gains stability and continuity.
99+
- ```reward``` : The step reward following the action taken.
100+
- ```done```: Always False.
101+
- ```truncated``` : Is true if we reached the end of the DataFrame.
102+
- ```info``` : Return the last history step of the object "history" presented above (in "3 - Create your own reward function")
96103
**(Optional) 6 - Render**
97104

98105
Performed with Dash Plotly (local app).
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/__init__.py

Whitespace-only changes.
File renamed without changes.

example.py test/example.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
import sys
2+
sys.path.append("./")
3+
14
import pandas as pd
25
import numpy as np
3-
from environments import TradingEnv
6+
from src.environments import TradingEnv
47
import time
58

69
# Import your datas

0 commit comments

Comments
 (0)