From 15323a81799d6bd614142eaaf8bb4b0246090deb Mon Sep 17 00:00:00 2001 From: Eddie Hebert Date: Tue, 9 Jul 2013 14:54:38 -0400 Subject: [PATCH] BUG: Enable return values on first day using minute TALib functions. Set the `compute_only_full` to False so that the 'is window full' logic is delegated to the TALib's lookback function. If the window is not full to the `timeperiod` or other lookback setting, then TALib returns a `np.nan`. Also, fix the bars/data_frequency not being passed to the BatchTransform init. This further shows need to create a minute test for TALib transforms. --- zipline/transforms/ta.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zipline/transforms/ta.py b/zipline/transforms/ta.py index c9adcd26..1cc1ae30 100644 --- a/zipline/transforms/ta.py +++ b/zipline/transforms/ta.py @@ -163,7 +163,9 @@ def make_transform(talib_fn, name): super(TALibTransform, self).__init__( func=zipline_wrapper, refresh_period=refresh_period, - window_length=window_length) + window_length=window_length, + compute_only_full=False, + bars=bars) def __repr__(self): return 'Zipline BatchTransform: {0}'.format(