From 54ef18ec4e94fe02764a7f7e0e70776cb45be799 Mon Sep 17 00:00:00 2001 From: you-n-g Date: Fri, 26 Nov 2021 18:15:44 +0800 Subject: [PATCH] Update the docs ops.py (#718) * Update ops.py * Update ops.py --- qlib/data/ops.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/qlib/data/ops.py b/qlib/data/ops.py index fa467a54f..f6b7a1fbe 100644 --- a/qlib/data/ops.py +++ b/qlib/data/ops.py @@ -689,6 +689,9 @@ class If(ExpressionOps): class Rolling(ExpressionOps): """Rolling Operator + The meaning of rolling and expanding is the same in pandas. + When the window is set to 0, the behaviour of the operator should follow `expanding` + Otherwise, it follows `rolling` Parameters ---------- @@ -1194,6 +1197,14 @@ class Delta(Rolling): # support pair-wise rolling like `Slope(A, B, N)` class Slope(Rolling): """Rolling Slope + This operator calculate the slope between `idx` and `feature`. + (e.g. [, , ] and [1, 2, 3]) + + Usage Example: + - "Slope($close, %d)/$close" + + # TODO: + # Some users may want pair-wise rolling like `Slope(A, B, N)` Parameters ----------