From 78bc2c874891b567e10740b9573f4a9e4c06f003 Mon Sep 17 00:00:00 2001 From: Jactus Date: Tue, 9 Mar 2021 17:31:27 +0800 Subject: [PATCH] Update Filter doc --- docs/component/data.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/component/data.rst b/docs/component/data.rst index 4b0962d49..9e5d7de2f 100644 --- a/docs/component/data.rst +++ b/docs/component/data.rst @@ -218,6 +218,25 @@ Filter - `cross-sectional features filter` \: rule_expression = '$rank($close)<10' - `time-sequence features filter`: rule_expression = '$Ref($close, 3)>100' +Here is a simple example showing how to use filter in a basic ``Qlib`` workflow configuration file: + +.. code-block:: yaml + + filter: &filter + filter_type: ExpressionDFilter + rule_expression: "Ref($close, -2) / Ref($close, -1) > 1" + filter_start_time: 2010-01-01 + filter_end_time: 2010-01-07 + keep: False + + data_handler_config: &data_handler_config + start_time: 2010-01-01 + end_time: 2021-01-22 + fit_start_time: 2010-01-01 + fit_end_time: 2015-12-31 + instruments: *market + filter_pipe: [*filter] + To know more about ``Filter``, please refer to `Filter API <../reference/api.html#module-qlib.data.filter>`_. Reference