mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-15 16:56:54 +08:00
requirements
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
from joblib import Parallel, delayed
|
|
||||||
from numba import njit, prange
|
|
||||||
from tianshou.policy import BasePolicy
|
from tianshou.policy import BasePolicy
|
||||||
from tianshou.data import Batch
|
from tianshou.data import Batch
|
||||||
import numpy as np
|
import numpy as np
|
||||||
@@ -67,5 +65,7 @@ class AC(VWAP):
|
|||||||
t = t + 1
|
t = t + 1
|
||||||
k_tild = self.lamb / self.eta * sig * sig
|
k_tild = self.lamb / self.eta * sig * sig
|
||||||
k = np.arccosh(k_tild / 2 + 1)
|
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)
|
return Batch(act=act, state=state)
|
||||||
|
|||||||
10
examples/trade/requirements.txt
Normal file
10
examples/trade/requirements.txt
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user