mirror of
https://github.com/microsoft/qlib.git
synced 2026-06-06 05:51:17 +08:00
Adjust rolling api (#1594)
* Intermediate version * Fix yaml template & Successfully run rolling * Be compatible with benchmark * Get same results with previous linear model * Black formatting * Update black * Update the placeholder mechanism * Update CI * Update CI * Upgrade Black * Fix CI and simplify code * Fix CI * Move the data processing caching mechanism into utils. * Adjusting DDG-DA * Organize import
This commit is contained in:
@@ -27,7 +27,6 @@ class TestHFBacktest(TestAutoData):
|
||||
return pd.DataFrame(orders, columns=headers)
|
||||
|
||||
def test_trading(self):
|
||||
|
||||
# date = "2020-02-03"
|
||||
# inst = "SH600068"
|
||||
# pos = 2.0167
|
||||
|
||||
@@ -21,7 +21,6 @@ class TestHandler(DataHandlerLP):
|
||||
fit_end_time=None,
|
||||
drop_raw=True,
|
||||
):
|
||||
|
||||
infer_processors = check_transform_proc(infer_processors, fit_start_time, fit_end_time)
|
||||
learn_processors = check_transform_proc(learn_processors, fit_start_time, fit_end_time)
|
||||
|
||||
@@ -51,7 +50,6 @@ class TestHandler(DataHandlerLP):
|
||||
|
||||
|
||||
class TestHandlerStorage(TestAutoData):
|
||||
|
||||
market = "all"
|
||||
|
||||
start_time = "2010-01-01"
|
||||
@@ -82,7 +80,6 @@ class TestHandlerStorage(TestAutoData):
|
||||
)
|
||||
|
||||
with TimeInspector.logt("random fetch with DataFrame Storage"):
|
||||
|
||||
# single stock
|
||||
for i in range(100):
|
||||
random_index = np.random.randint(len(instruments), size=1)[0]
|
||||
@@ -96,7 +93,6 @@ class TestHandlerStorage(TestAutoData):
|
||||
data_handler.fetch(selector=(fetch_stocks, slice(fetch_start_time, fetch_end_time)), level=None)
|
||||
|
||||
with TimeInspector.logt("random fetch with HashingStock Storage"):
|
||||
|
||||
# single stock
|
||||
for i in range(100):
|
||||
random_index = np.random.randint(len(instruments), size=1)[0]
|
||||
|
||||
@@ -11,7 +11,6 @@ class SepDF(unittest.TestCase):
|
||||
return "".join(str(obj).split())
|
||||
|
||||
def test_index_data(self):
|
||||
|
||||
np.random.seed(42)
|
||||
|
||||
index = [
|
||||
|
||||
@@ -77,7 +77,6 @@ class TestRolling(TestAutoData):
|
||||
|
||||
@pytest.mark.slow
|
||||
def test_update_label(self):
|
||||
|
||||
task = copy.deepcopy(CSI300_GBDT_TASK)
|
||||
|
||||
task["record"] = {
|
||||
|
||||
@@ -22,7 +22,6 @@ QLIB_DIR.mkdir(exist_ok=True, parents=True)
|
||||
|
||||
class TestStorage(TestAutoData):
|
||||
def test_calendar_storage(self):
|
||||
|
||||
calendar = CalendarStorage(freq="day", future=False, provider_uri=self.provider_uri)
|
||||
assert isinstance(calendar[:], Iterable), f"{calendar.__class__.__name__}.__getitem__(s: slice) is not Iterable"
|
||||
assert isinstance(calendar.data, Iterable), f"{calendar.__class__.__name__}.data is not Iterable"
|
||||
|
||||
@@ -33,7 +33,6 @@ class TestGetData(unittest.TestCase):
|
||||
shutil.rmtree(str(DATA_DIR.resolve()))
|
||||
|
||||
def test_0_qlib_data(self):
|
||||
|
||||
GetData().qlib_data(
|
||||
name="qlib_data_simple", target_dir=QLIB_DIR, region="cn", interval="1d", delete_old=False, exists_skip=True
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user