diff --git a/examples/trade/agent/basic.py b/examples/trade/agent/basic.py index 48cc2901b..f6adc19ca 100644 --- a/examples/trade/agent/basic.py +++ b/examples/trade/agent/basic.py @@ -1,5 +1,3 @@ -from joblib import Parallel, delayed -from numba import njit, prange from tianshou.policy import BasePolicy from tianshou.data import Batch import numpy as np @@ -67,5 +65,7 @@ class AC(VWAP): t = t + 1 k_tild = self.lamb / self.eta * sig * sig k = np.arccosh(k_tild / 2 + 1) - act = (np.sinh(k * (self.T - t)) - np.sinh(k * (self.T - t - 1))) / np.sinh(k * self.T) + act = (np.sinh(k * (self.T - t)) - np.sinh(k * (self.T - t - 1))) / np.sinh( + k * self.T + ) return Batch(act=act, state=state) diff --git a/examples/trade/requirements.txt b/examples/trade/requirements.txt new file mode 100644 index 000000000..ce27c2306 --- /dev/null +++ b/examples/trade/requirements.txt @@ -0,0 +1,10 @@ +tianshou==0.3.0.post1 +torch==1.6.0 +numba==0.51.2 +pandas==1.1.3 +tqdm==4.50.2 +numpy==1.19.1 +gym==0.17.3 +env==0.1.0 +PyYAML==5.4.1 +redis==3.5.3