mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-10 06:20:57 +08:00
Qlib simulator refinement (redo of PR 1244) (#1262)
* Use dict-like configuration * Rename from_neutrader to integration * SAOE strategy * Optimize file structure * Optimize code * Format code * create_state_maintainer_recursive * Remove explicit time_per_step * CI test passed * Resolve PR comments * Pass all CI * Minor test issue * Refine SAOE adapter logic * Minor bugfix * Cherry pick updates * Resolve PR comments * CI issues * Refine adapter & saoe_data logic * Resolve PR comments * Resolve PR comments * Rename ONE_SEC to EPS_T; complete backtest loop * CI issue * Resolve Yuge's PR comments
This commit is contained in:
@@ -2,6 +2,11 @@
|
||||
# Licensed under the MIT License.
|
||||
|
||||
# REGION CONST
|
||||
from typing import TypeVar
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
|
||||
REG_CN = "cn"
|
||||
REG_US = "us"
|
||||
REG_TW = "tw"
|
||||
@@ -10,4 +15,8 @@ REG_TW = "tw"
|
||||
EPS = 1e-12
|
||||
|
||||
# Infinity in integer
|
||||
INF = 10**18
|
||||
INF = int(1e18)
|
||||
ONE_DAY = pd.Timedelta("1day")
|
||||
ONE_MIN = pd.Timedelta("1min")
|
||||
EPS_T = pd.Timedelta("1s") # use 1 second to exclude the right interval point
|
||||
float_or_ndarray = TypeVar("float_or_ndarray", float, np.ndarray)
|
||||
|
||||
Reference in New Issue
Block a user