Skip to content

Commit

Permalink
Update the docs ops.py (microsoft#718)
Browse files Browse the repository at this point in the history
* Update ops.py

* Update ops.py
  • Loading branch information
you-n-g committed Nov 26, 2021
1 parent b547806 commit da253cc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions qlib/data/ops.py
Expand Up @@ -689,6 +689,9 @@ def get_extended_window_size(self):

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
----------
Expand Down Expand Up @@ -1194,6 +1197,14 @@ def _load_internal(self, instrument, start_index, end_index, freq):
# 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
----------
Expand Down

0 comments on commit da253cc

Please sign in to comment.