Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
komo135 authored Mar 8, 2022
1 parent da77c42 commit 7be3dfd
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions document/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,35 @@
# Agnet
### traderl.agent.DQN
```python
# type Class
traderl.agent.DQN(df: pd.DataFrame, model_name, lr=1e-4, pip_scale=25, n=3, use_device="cpu",
gamma=0.99, train_spread=0.2, spread=10, risk=0.01)
```
Create DQN agent.

**Example**
```python
import traderl
url = ""
agent = traderl.agent.DQN(url, "efficientnet_b0")
agent.train()

agent.plot_result()
```

| Args | |
| -- | -- |
| df | pd.DataFrame or csv file, Must contain open, low, high, close |
| model_name | str or None, If none, the model is not created. See the variable traderl.nn.available_network for available models. |
| lr | float, learning rate |
| pip_scale | int, Scales the reward value.The larger the value, the more intense the overfitting. |
| n | int, Create rewards up to n periods |
| use_device | str, "cpu" or "gpu" or "tpu", Type of device used |
| gamma | float, The larger the value, the more priority is given to rewards in the long term, and the smaller the value, the more priority is given to rewards in the short term. |
| train_spread | float, The cost you impose on a reward when you create it. |
| spread | float, Cost per trade |
| risk | float, Risk per trade |

#### Methods

#####

0 comments on commit 7be3dfd

Please sign in to comment.