From 65a009acb2850abcae59ad6633c265c3c4bcfe2c Mon Sep 17 00:00:00 2001 From: Young Date: Thu, 5 Nov 2020 12:30:43 +0000 Subject: [PATCH] remove vwap related feature --- qlib/contrib/data/handler.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/qlib/contrib/data/handler.py b/qlib/contrib/data/handler.py index 2e7f2febc..bd07fff7e 100644 --- a/qlib/contrib/data/handler.py +++ b/qlib/contrib/data/handler.py @@ -90,7 +90,7 @@ class Alpha158(DataHandlerLP): "kbar": {}, "price": { "windows": [0], - "feature": ["OPEN", "HIGH", "LOW", "VWAP"], + "feature": ["OPEN", "HIGH", "LOW"], }, "rolling": {}, } @@ -281,5 +281,17 @@ class Alpha158(DataHandlerLP): class Alpha158vwap(Alpha158): + + def get_feature_config(self): + conf = { + "kbar": {}, + "price": { + "windows": [0], + "feature": ["OPEN", "HIGH", "LOW", "VWAP"], + }, + "rolling": {}, + } + return self.parse_config_to_fields(conf) + def get_label_config(self): return (["Ref($vwap, -2)/Ref($vwap, -1) - 1"], ["LABEL0"])