1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-07 13:00:58 +08:00

requirements

This commit is contained in:
Yuchen Fang
2021-01-28 14:21:51 +08:00
parent 0c6cad1d7b
commit 30ad1967a2
2 changed files with 13 additions and 3 deletions

View File

@@ -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)