diff --git a/README.md b/README.md index 09c64988a..09a91b678 100644 --- a/README.md +++ b/README.md @@ -176,6 +176,19 @@ Also, users can install the latest dev version ``Qlib`` by the source code accor ## Data Preparation Load and prepare data by running the following code: + +### Get with module + ```bash + # get 1d data + python -m qlib.run.get_data qlib_data --target_dir ~/.qlib/qlib_data/cn_data --region cn + + # get 1min data + python -m qlib.run.get_data qlib_data --target_dir ~/.qlib/qlib_data/cn_data_1min --region cn --interval 1min + + ``` + +### Get from source + ```bash # get 1d data python scripts/get_data.py qlib_data --target_dir ~/.qlib/qlib_data/cn_data --region cn diff --git a/qlib/run/__init__.py b/qlib/run/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/qlib/run/get_data.py b/qlib/run/get_data.py new file mode 100644 index 000000000..3710816ce --- /dev/null +++ b/qlib/run/get_data.py @@ -0,0 +1,9 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + +import fire +from qlib.tests.data import GetData + + +if __name__ == "__main__": + fire.Fire(GetData)