1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-17 17:34:35 +08:00

update docs

This commit is contained in:
Young
2020-11-28 05:56:01 +00:00
parent 80b01cb6a6
commit 22c3806672
6 changed files with 19 additions and 12 deletions

View File

@@ -228,8 +228,11 @@ Your PR of new Quant models is highly welcomed.
# Quant Dataset Zoo # Quant Dataset Zoo
Dataset plays a very important role in Quant. Here is a list of the datasets built on `Qlib`. 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`. [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. Your PR to build new Quant dataset is highly welcomed.

View File

@@ -19,9 +19,10 @@ With ``qrun``, user can easily run an `experiment`, which includes the following
- Processing - Processing
- Slicing - Slicing
- Model - Model
- Training and inference (static or rolling) - Training and inference
- Saving & loading - Saving & loading
- Evaluation - Evaluation
- Forecast signal analysis
- Backtest - 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>`_. 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: kwargs:
config: *port_analysis_config 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>`_. For more information about the ``Record`` module in ``Qlib``, user can refer to the related document: `Record <../component/recorder.html#record-template>`_.

View File

@@ -61,7 +61,7 @@ Auto Quant Research Workflow
- Workflow result - 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 .. code-block:: python
@@ -91,4 +91,4 @@ Auto Quant Research Workflow
Custom Model Integration 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>`_.

View File

@@ -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. 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` - `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>`_. 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 <specific folder>, you can initialize qlib below
qlib.init(provider_uri=provider_uri, region=REG_CN, exp_manager= {
"class": "MLflowExpManager", "class": "MLflowExpManager",
"module_path": "qlib.workflow.expm", "module_path": "qlib.workflow.expm",
"kwargs": { "kwargs": {
"uri": "python_execution_path/mlruns"), "uri": "python_execution_path/mlruns",
"default_exp_name": "Experiment", "default_exp_name": "Experiment",
} }
} })

View File

@@ -5,7 +5,7 @@ Custom Model Integration
Introduction 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. 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 .. code-block:: Python
def finetune(self, dataset: DatasetH, num_boost_round=10, verbose_eval=20): 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) dtrain, _ = self._prepare_data(dataset)
self.model = lgb.train( self.model = lgb.train(
self.params, self.params,
@@ -101,7 +102,7 @@ The Custom models need to inherit `qlib.model.base.Model <../reference/api.html#
Configuration File 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`. - 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`.

View File

@@ -80,6 +80,7 @@ class LGBModel(ModelFT):
verbose_eval : int verbose_eval : int
verbose level verbose level
""" """
# Based on existing model and finetune by train more rounds
dtrain, _ = self._prepare_data(dataset) dtrain, _ = self._prepare_data(dataset)
self.model = lgb.train( self.model = lgb.train(
self.params, self.params,