mirror of
https://github.com/wassname/catalyst.git
synced 2026-09-11 12:00:50 +08:00
ENH: Mark statistical terms as window_safe.
This commit is contained in:
@@ -75,6 +75,8 @@ class RollingPearson(_RollingCorrelation):
|
|||||||
Most users should call Factor.pearsonr rather than directly construct an
|
Most users should call Factor.pearsonr rather than directly construct an
|
||||||
instance of this class.
|
instance of this class.
|
||||||
"""
|
"""
|
||||||
|
window_safe = True
|
||||||
|
|
||||||
def compute(self, today, assets, out, base_data, target_data):
|
def compute(self, today, assets, out, base_data, target_data):
|
||||||
# If `target_data` is a Slice or single column of data, broadcast it
|
# If `target_data` is a Slice or single column of data, broadcast it
|
||||||
# out to the same shape as `base_data`, then compute column-wise. This
|
# out to the same shape as `base_data`, then compute column-wise. This
|
||||||
@@ -119,6 +121,8 @@ class RollingSpearman(_RollingCorrelation):
|
|||||||
Most users should call Factor.spearmanr rather than directly construct an
|
Most users should call Factor.spearmanr rather than directly construct an
|
||||||
instance of this class.
|
instance of this class.
|
||||||
"""
|
"""
|
||||||
|
window_safe = True
|
||||||
|
|
||||||
def compute(self, today, assets, out, base_data, target_data):
|
def compute(self, today, assets, out, base_data, target_data):
|
||||||
# If `target_data` is a Slice or single column of data, broadcast it
|
# If `target_data` is a Slice or single column of data, broadcast it
|
||||||
# out to the same shape as `base_data`, then compute column-wise. This
|
# out to the same shape as `base_data`, then compute column-wise. This
|
||||||
|
|||||||
Reference in New Issue
Block a user