1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-01 18:11:18 +08:00

Update the docs ops.py (#718)

* Update ops.py

* Update ops.py
This commit is contained in:
you-n-g
2021-11-26 18:15:44 +08:00
committed by GitHub
parent 0dfbf8c413
commit 54ef18ec4e

View File

@@ -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. [<feature_t1>, <feature_t2>, <feature_t3>] and [1, 2, 3])
Usage Example:
- "Slope($close, %d)/$close"
# TODO:
# Some users may want pair-wise rolling like `Slope(A, B, N)`
Parameters
----------