diff --git a/README.md b/README.md index c890afaca..4f2509188 100644 --- a/README.md +++ b/README.md @@ -228,8 +228,11 @@ Your PR of new Quant models is highly welcomed. # Quant Dataset Zoo Dataset plays a very important role in Quant. Here is a list of the datasets built on `Qlib`. -- [Alpha360](./qlib/contrib/data/handler.py) -- [Alpha158](./qlib/contrib/data/handler.py) + +| Dataset | US Market | China Market | +| -- | -- | -- | +| [Alpha360](./qlib/contrib/data/handler.py) | √ | √ | +| [Alpha158](./qlib/contrib/data/handler.py) | √ | √ | [Here](https://qlib.readthedocs.io/en/latest/advanced/alpha.html) is a tutorial to build dataset with `Qlib`. Your PR to build new Quant dataset is highly welcomed. diff --git a/docs/component/workflow.rst b/docs/component/workflow.rst index 4ca010851..c44f1100f 100644 --- a/docs/component/workflow.rst +++ b/docs/component/workflow.rst @@ -19,9 +19,10 @@ With ``qrun``, user can easily run an `experiment`, which includes the following - Processing - Slicing - Model - - Training and inference (static or rolling) + - Training and inference - Saving & loading - Evaluation + - Forecast signal analysis - Backtest For each `experiment`, ``Qlib`` has a complete system to tracking all the information as well as artifacts generated during training, inference and evaluation phase. For more information about how Qlib handles `experiment`, please refer to the related document: `Recorder: Experiment Management <../component/recorder.html>`_. @@ -276,4 +277,4 @@ Here is the configuration details of different `Record Template` such as ``Signa kwargs: config: *port_analysis_config -For more information about the ``Record`` module in ``Qlib``, user can refer to the related document: `Record <../component/recorder.html#record-template>`_. \ No newline at end of file +For more information about the ``Record`` module in ``Qlib``, user can refer to the related document: `Record <../component/recorder.html#record-template>`_. diff --git a/docs/introduction/quick.rst b/docs/introduction/quick.rst index 32752fd83..ee906b6f6 100644 --- a/docs/introduction/quick.rst +++ b/docs/introduction/quick.rst @@ -61,7 +61,7 @@ Auto Quant Research Workflow - Workflow result - The result of ``qrun`` is as follows, which is also the result of ``Intraday Trading``. Please refer to `Intraday Trading <../component/backtest.html>`_. for more details about the result. + The result of ``qrun`` is as follows, which is also the typical result of ``Forecast model(alpha)``. Please refer to `Intraday Trading <../component/backtest.html>`_. for more details about the result. .. code-block:: python @@ -91,4 +91,4 @@ Auto Quant Research Workflow Custom Model Integration =============================================== -``Qlib`` provides several models such as ``lightGBM`` and ``DNN`` model as the baseline of ``Interday Model``. In addition to the default model, users can integrate their own custom models into ``Qlib``. If users are interested in the custom model, please refer to `Custom Model Integration <../start/integration.html>`_. +``Qlib`` provides a batch of models (such as ``lightGBM`` and ``DNN`` models) as examples of ``Interday Model``. In addition to the default model, users can integrate their own custom models into ``Qlib``. If users are interested in the custom model, please refer to `Custom Model Integration <../start/integration.html>`_. diff --git a/docs/start/initialization.rst b/docs/start/initialization.rst index 423d7edf8..05a329df7 100644 --- a/docs/start/initialization.rst +++ b/docs/start/initialization.rst @@ -63,13 +63,14 @@ Besides `provider_uri` and `region`, `qlib.init` has other parameters. The follo If Qlib fails to connect redis via `redis_host` and `redis_port`, cache mechanism will not be used! Please refer to `Cache <../component/data.html#cache>`_ for details. - `exp_manager` Type: dict, optional parameter, the setting of `experiment manager` to be used in qlib. Users can specify an experiment manager class, as well as the tracking URI for all the experiments. However, please be aware that we only support input of a dictionary in the following style for `exp_manager`. For more information about `exp_manager`, users can refer to `Recorder: Experiment Management <../component/recorder.html>`_. - :: + .. code-block:: Python - { + # For example, if you want to set your tracking_uri to a , you can initialize qlib below + qlib.init(provider_uri=provider_uri, region=REG_CN, exp_manager= { "class": "MLflowExpManager", "module_path": "qlib.workflow.expm", "kwargs": { - "uri": "python_execution_path/mlruns"), + "uri": "python_execution_path/mlruns", "default_exp_name": "Experiment", } - } \ No newline at end of file + }) diff --git a/docs/start/integration.rst b/docs/start/integration.rst index 102d88425..09e8648f7 100644 --- a/docs/start/integration.rst +++ b/docs/start/integration.rst @@ -5,7 +5,7 @@ Custom Model Integration Introduction =================== -``Qlib``'s `Model Zoo` includes models such as ``LightGBM``, ``DNN``, ``LSTM``, etc.. These models are treated as the baselines of ``Interday Model``. In addition to the default models ``Qlib`` provide, users can integrate their own custom models into ``Qlib``. +``Qlib``'s `Model Zoo` includes models such as ``LightGBM``, ``DNN``, ``LSTM``, etc.. These models are examples of ``Interday Model``. In addition to the default models ``Qlib`` provide, users can integrate their own custom models into ``Qlib``. Users can integrate their own custom models according to the following steps. @@ -87,6 +87,7 @@ The Custom models need to inherit `qlib.model.base.Model <../reference/api.html# .. code-block:: Python def finetune(self, dataset: DatasetH, num_boost_round=10, verbose_eval=20): + # Based on existing model and finetune by train more rounds dtrain, _ = self._prepare_data(dataset) self.model = lgb.train( self.params, @@ -101,7 +102,7 @@ The Custom models need to inherit `qlib.model.base.Model <../reference/api.html# Configuration File ======================= -The configuration file is described in detail in the `Workflow <../component/workflow.html#complete-example>`_ document. In order to integrate the custom model into ``Qlib``, users need to modify the "model" field in the configuration file. +The configuration file is described in detail in the `Workflow <../component/workflow.html#complete-example>`_ document. In order to integrate the custom model into ``Qlib``, users need to modify the "model" field in the configuration file. The configuration describes which models to use and how we can initialize it. - Example: The following example describes the `model` field of configuration file about the custom lightgbm model mentioned above, where `module_path` is the module path, `class` is the class name, and `args` is the hyperparameter passed into the __init__ method. All parameters in the field is passed to `self._params` by `\*\*kwargs` in `__init__` except `loss = mse`. diff --git a/qlib/contrib/model/gbdt.py b/qlib/contrib/model/gbdt.py index e52c05906..058d9a0e3 100644 --- a/qlib/contrib/model/gbdt.py +++ b/qlib/contrib/model/gbdt.py @@ -80,6 +80,7 @@ class LGBModel(ModelFT): verbose_eval : int verbose level """ + # Based on existing model and finetune by train more rounds dtrain, _ = self._prepare_data(dataset) self.model = lgb.train( self.params,