mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-28 21:45:09 +08:00
ENH: Allow windows of NumericalExpression.
If all the inputs to an expr are window-safe, then the expr is itself window-safe.
This commit is contained in:
committed by
Joe Jevnik
parent
582c44a4aa
commit
bb2d25e67c
@@ -40,6 +40,7 @@ from zipline.assets.synthetic import make_rotating_equity_info
|
||||
from zipline.errors import NoFurtherDataError
|
||||
from zipline.lib.adjustment import MULTIPLY
|
||||
from zipline.lib.labelarray import LabelArray
|
||||
from zipline.lib.rank import masked_rankdata_2d
|
||||
from zipline.pipeline import CustomFactor, Pipeline
|
||||
from zipline.pipeline.data import Column, DataSet, USEquityPricing
|
||||
from zipline.pipeline.data.testing import TestingDataSet
|
||||
|
||||
@@ -187,6 +187,7 @@ class NumericalExpression(ComputableTerm):
|
||||
inputs=binds,
|
||||
expr=expr,
|
||||
dtype=dtype,
|
||||
window_safe=all(t.window_safe for t in binds),
|
||||
)
|
||||
|
||||
def _init(self, expr, *args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user