MCPcopy
hub / github.com/microsoft/qlib / test_4_dump_features_simple

Method test_4_dump_features_simple

tests/test_dump_data.py:76–86  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

74 self.assertListEqual(list(df.columns), self.QLIB_FIELDS, "features columns failed")
75
76 def test_4_dump_features_simple(self):
77 stock = self.STOCK_NAMES[0]
78 dump_data = DumpDataFix(
79 data_path=SOURCE_DIR.joinpath(f"{stock.lower()}.csv"), qlib_dir=QLIB_DIR, include_fields=self.FIELDS
80 )
81 dump_data.dump()
82
83 df = D.features([stock], self.QLIB_FIELDS)
84
85 self.assertEqual(len(df), len(TestDumpData.SIMPLE_DATA), "dump features simple failed")
86 self.assertTrue(np.isclose(df.dropna(), self.SIMPLE_DATA.dropna()).all(), "dump features simple failed")
87
88
89if __name__ == "__main__":

Callers

nothing calls this directly

Calls 4

dumpMethod · 0.95
DumpDataFixClass · 0.90
featuresMethod · 0.80
allMethod · 0.45

Tested by

no test coverage detected