about tablib in Zipline

66 views
Skip to first unread message

forexblog

unread,
May 15, 2015, 10:53:48 PM5/15/15
to zip...@googlegroups.com
Dear all,

In quantopian the following code, How should to workable in zipline?
I suffer expected type error on this line :     M      = prices.apply(talib.SMA,timeperiod = 88).iloc[-1]
any suggestion will appreciate.



    
def handle_entry (context,data):
    
    prices = history(bar_count=200, frequency='1d', field='price')
    M      = prices.apply(talib.SMA,timeperiod = 88).iloc[-1]

forexblog

unread,
May 15, 2015, 11:46:54 PM5/15/15
to zip...@googlegroups.com
my error message like following:

TypeError: ("Argument 'real' has incorrect type (expected numpy.ndarray, got Series)", u'occurred at index SPY')



forexblog於 2015年5月16日星期六 UTC+8上午10時53分48秒寫道:
Reply all
Reply to author
Forward
0 new messages