Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
zipline, is there bug in dividend pay out?

I'm using for ingestion the example from csvdir.py

        if 'dividend' in dfr.columns:  
            # ex_date   amount  sid record_date declared_date pay_date  
            tmp = dfr[dfr['dividend'] != 0.0]['dividend']  
            div = DataFrame(data=tmp.index.tolist(), columns=['ex_date'])  
            div['record_date'] = NaT  
            div['declared_date'] = NaT  
            div['pay_date'] = NaT  
            div['amount'] = tmp.tolist()  
            div['sid'] = sid

            divs = divs_splits['divs']  
            ind = Index(range(divs.shape[0], divs.shape[0] + div.shape[0]))  
            div.set_index(ind, inplace=True)  
            divs_splits['divs'] = divs.append(div)

If I run a simple buy and hold and monitor the number of stocks they don't increase.

If I assign to all of these the ex_date

            div['record_date'] = ['ex_date']  
            div['declared_date'] = ['ex_date']  
            div['pay_date'] =['ex_date']

I get the dividend pay out and the number of stocks increase

Is there a command on zipline to force the payout or is the example on csvdir.py and quandl.py wrong or do I miss something else?

thanks for help