diff --git a/zipline/utils/events.py b/zipline/utils/events.py index 562301f0..0247e4b8 100644 --- a/zipline/utils/events.py +++ b/zipline/utils/events.py @@ -175,7 +175,9 @@ class EventRule(six.with_metaclass(ABCMeta)): """ An event rule checks a datetime and sees if it should trigger. """ - env = TradingEnvironment.instance() + @property + def env(self): + return TradingEnvironment.instance() @abstractmethod def should_trigger(self, dt):