--
You received this message because you are subscribed to the Google Groups "Zipline Python Opensource Backtester" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zipline+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Pierre,Can you show your .csv file here?You seem to use old approach in your code. It might or might not work, but it would be better to consider using data bundles: http://www.zipline.io/bundles.htmlRegards,Ed
Hi Pierre,
There seem to be at least 3 issues with your data and code:- dataframe index must be reverted as data in your csv is in the opposite order- you may need to create simulation parameters to specify start and end dates and pass them to TradingAlgorithm constructor and to algo.run- you probably want to use custom calendar as default zipline calendar(NYSE) differs from cryptocurrency market calendar.Hope it helps,Regards,Ed
register('custom-csvdir-bundle', | |
csvdir_equities(sys.environ['CSVDIR'], | |
['daily', 'minute'])) |
Environment variable CSVDIR must contain path to the directory with the | |
following structure: | |
daily/<symbol>.cvs files | |
minute/<symbol>.csv files | |
for each symbol. | |
""" |
Sure. Please find attached.
To unsubscribe from this group and stop receiving emails from it, send an email to zipline+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
----BR,
EdBR,
Ed--BR,
Ed
To unsubscribe from this group and stop receiving emails from it, send an email to zipline+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
PierreAsMacBook:~ Pierre$ CSVDIR=./csvdir/ zipline ingest -b csvdir
/Users/Pierre/anaconda/lib/python2.7/site-packages/zipline/__main__.py:50: UserWarning: Failed to load extension: '/Users/Pierre/.zipline/extension.py'
'module' object has no attribute 'environ'
os.environ,
Error: No bundle registered with the name u'csvdir'
/csvdir
./csvdir/.DS_Store
./csvdir/daily
./csvdir/daily/.DS_Store
from zipline.data.bundles import register, csvdir_equities
PierreAsMacBook:~ Pierre$ CSVDIR=./csvdir/ zipline ingest -b csvdir
/Users/Pierre/anaconda/lib/python2.7/site-packages/zipline/__main__.py:50: UserWarning: Failed to load extension: '/Users/Pierre/.zipline/extension.py'
invalid syntax (extension.py, line 3)
os.environ,
Error: No bundle registered with the name u'csvdir'
Hi Pierre,
You can see an example of using csvdir bundle here: https://groups.google.com/forum/#!searchin/zipline/csvdir%7Csort:relevance/zipline/GbnwZO-Gbn4/bLIn7e4GDgAJ> Finally, I have looked into the Exchange_Calendar_Poliniex in the link you provided. But, I'm not sure I understand how to use it with your csvdir module.To use calendar with the bundle you need to register it using register_calendar and then pass calendar name to register API. Here is an approximate example. It's just to show you the idea. I didn't test if it works.from zipline.utils.calendars import register_calendarfrom zipline.utils.calendars.exchange_calendar_poloniex import POLONIEXExchangeCalendarfrom zipline.data.bundles import registerfrom zipline.data.bundles.csvdir import csvdir_equitiesregister_calendar('POLONIEX', POLONIEXExchangeCalendar())register('csvdir-poloniex', csvdir_equities(['daily']),calendar_name='POLONIEX')> I'm sorry as I'm sure these questions are very basic but I am stuck at this point..I'd not say this is basic. You're trying to use custom calendar with the custom bundle. It's not covered by zipline docs and not a lot of people had success with. You need to be able to debug zipline code if you want to make it working.Regards,Ed
Hi Pierre,
To unsubscribe from this group and stop receiving emails from it, send an email to zipline+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.