1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-06 20:41:09 +08:00

nested data loader

This commit is contained in:
Young
2024-07-04 10:09:43 +00:00
parent 5190332c7e
commit 13768d1dac
4 changed files with 367 additions and 276 deletions

View File

@@ -0,0 +1,35 @@
# TODO:
# dump alpha 360 to dataframe and merge it with Alpha158
import unittest
from qlib.data.dataset.loader import NestedDataLoader
class TestDataLoader(unittest.TestCase):
def test_nested_data_loader(self):
nd = NestedDataLoader(
dataloader_l=[
{
"class": "qlib.contrib.data.loader.Alpha158DL",
}, {
"class": "qlib.contrib.data.loader.Alpha360DL",
"kwargs": {
"config": {
"label": ( ["Ref($close, -2)/Ref($close, -1) - 1"], ["LABEL0"])
}
}
}
]
)
nd.load
...
if __name__ == "__main__":
unittest.main()