1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-11 14:56:55 +08:00
This commit is contained in:
bxdd
2021-01-26 07:32:06 +00:00
parent 06dbd02b99
commit 6a145df87c
11 changed files with 118 additions and 71 deletions

View File

@@ -29,8 +29,8 @@ class HighFreqHandler(DataHandlerLP):
new_l.append(p)
return new_l
infer_processors = []
learn_processors = []
infer_processors = check_transform_proc(infer_processors)
learn_processors = check_transform_proc(learn_processors)
data_loader = {
"class": "QlibDataLoader",
@@ -179,8 +179,6 @@ class HighFreqBacktestHandler(DataHandler):
end_time=None,
freq="1min",
):
infer_processors = check_transform_proc(infer_processors)
learn_processors = check_transform_proc(learn_processors)
data_loader = {
"class": "QlibDataLoader",
"kwargs": {
@@ -207,7 +205,7 @@ class HighFreqBacktestHandler(DataHandler):
fields += [
template_fillnan.format(template_paused.format("$close")),
]
names += ["$close0"]
names += ["$vwap0"]
fields += [
"If(Eq({1}, np.nan), 0, If(Or(Gt({2}, Mul(1.001, {4})), Lt({2}, Mul(0.999, {3}))), 0, {1}))".format(
template_fillnan.format(template_paused.format("$close")),