1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-05 12:00:58 +08:00

QLibDataHandlerClose is renamed to Alpha158

This commit is contained in:
zhupr
2020-09-28 15:29:04 +08:00
committed by you-n-g
parent 3c9f3acf79
commit 8d76a99ee0
11 changed files with 20 additions and 20 deletions

View File

@@ -207,14 +207,14 @@ Example
Know more about how to run ``Data Handler`` with ``Estimator``, please refer to `Estimator: Workflow Management <estimator.html>`_
Qlib provides implemented data handler `QLibDataHandlerClose`. The following example shows how to run `QLibDataHandlerV1` as a single module.
Qlib provides implemented data handler `Alpha158`. The following example shows how to run `QLibDataHandlerV1` as a single module.
.. note:: Users need to initialize ``Qlib`` with `qlib.init` first, please refer to `initialization <../start/initialization.html>`_.
.. code-block:: Python
from qlib.contrib.estimator.handler import QLibDataHandlerClose
from qlib.contrib.estimator.handler import Alpha158
from qlib.contrib.model.gbdt import LGBModel
DATA_HANDLER_CONFIG = {
@@ -233,7 +233,7 @@ Qlib provides implemented data handler `QLibDataHandlerClose`. The following exa
"test_end_date": "2020-08-01",
}
exampleDataHandler = QLibDataHandlerClose(**DATA_HANDLER_CONFIG)
exampleDataHandler = Alpha158(**DATA_HANDLER_CONFIG)
# example of 'get_split_data'
x_train, y_train, x_validate, y_validate, x_test, y_test = exampleDataHandler.get_split_data(**TRAINER_CONFIG)

View File

@@ -50,7 +50,7 @@ Below is a typical config file of ``Estimator``.
num_leaves: 210
num_threads: 20
data:
class: QLibDataHandlerClose
class: Alpha158
args:
dropna_label: True
filter:
@@ -291,7 +291,7 @@ Users can use the specified data handler by config as follows.
.. code-block:: YAML
data:
class: QLibDataHandlerClose
class: Alpha158
args:
start_date: 2005-01-01
end_date: 2018-04-30

View File

@@ -121,7 +121,7 @@ Example
- Run the following code to get the `prediction score` `pred_score`
.. code-block:: Python
from qlib.contrib.estimator.handler import QLibDataHandlerClose
from qlib.contrib.estimator.handler import Alpha158
from qlib.contrib.model.gbdt import LGBModel
DATA_HANDLER_CONFIG = {
@@ -140,7 +140,7 @@ Example
"test_end_date": "2020-08-01",
}
x_train, y_train, x_validate, y_validate, x_test, y_test = QLibDataHandlerClose(
x_train, y_train, x_validate, y_validate, x_test, y_test = Alpha158(
**DATA_HANDLER_CONFIG
).get_split_data(**TRAINER_CONFIG)
@@ -163,7 +163,7 @@ Example
pred_score = pd.DataFrame(index=_pred.index)
pred_score["score"] = _pred.iloc(axis=1)[0]
.. note:: `QLibDataHandlerClose` is the data handler provided by ``Qlib``, please refer to `Data Handler <data.html#data-handler>`_.
.. note:: `Alpha158` is the data handler provided by ``Qlib``, please refer to `Data Handler <data.html#data-handler>`_.
Also, the above example has been given in ``examples/train_backtest_analyze.ipynb``.