Before I tell you about my issue, let me describe my environment:
Environment
Operating System: (Windows 10 , RAM: 4Go)
Python Version: 3.5.4`
Python Bitness: `64 bits
How did you install Zipline: (pip, Installed C dependencies with wheel file, tried to have other Zipline dependencies by using "pip install zipline" which failed obviously but got the dependencies installed and i finally installed Zipline from the Wheel File)
*Other env: I did have Python 34 and Python 36 used with Anaconda. But i am pretty sure that zipline is installed and launched from the python35 as you will see later. Unless i am wrong
Now that you know a little about me, let me tell you about the issue I am
having:
Description of Issue
Zipline seems to have been properly installed, to verify i tried to import Zipline and it works fine. see below:
""C:\Python35>python
Python 3.5.4 (v3.5.4:3f56838, Aug 8 2017, 02:17:05) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
import zipline
quit()
''''''
First attempt
BUT when i tried to run zipline from Jupyter Notebook , the kernel dies Whenever i try to run a backtest, find below the command and Code i used:
--> %load_ext zipline
--> from zipline.api import order, record, symbol
def initialize(context):
pass
def handle_data(context, data):
order(symbol('AAPL'), 10)
record(AAPL=data.current(symbol('AAPL'), 'price'))
-->%zipline --bundle quantopian-quandl --start 2012-1-1 --end 2012-2-1 -o buyAppl.pickle (that is where the Kernel dies with no answer)
Second attempt
I therefore tried to run Zipline from the cmd prompt to check if the problem was due to jupyter but there also i received no answer, Nothing Happens , no error shown, Nothing, the prompt just go to the next line waiting for an another instruction. see below:
-->C:\Python35>zipline run --bundle quantopian-quandl -f C:\Python35\testa.py --start 2016-1-1 --end 2017-1-1 --output buyapple_out.pickle
-->C:\Python35>
It is important to note that i properly ingested the quantopian-quandl Bundles ( At least i believe) because i retrieve the file in .Zipline folder with sqlite lite file, bcolz folder inside.
Also find below the code written in "testa.py"
from zipline.api import order, record, symbol
def initialize(context):
pass
3.Attempt
I therefore tried to run one of the algo(buyapple.py) in the Example File, but same response ,
I tried then to run the buyapple.py in the Exemple with default quandl bundle,
i ingested first quandl bundle and i got the this below.
-->C:\Users\TOSHIBA>zipline ingest -b quandl
[2018-09-04 14:29:33.596495] INFO: zipline.data.bundles.quandl: Downloading WIKI metadata.
Downloading WIKI Prices table from Quandl [####################################] 100%
[2018-09-04 14:50:21.773229] INFO: zipline.data.bundles.quandl: Parsing raw data.
[2018-09-04 14:53:12.803871] INFO: zipline.data.bundles.quandl: Generating asset metadata.
Merging daily equity files: [----------------------------------#-] 4
I was wondered if everything was right because the process seems to have broken on the line "Merging Daily equity file". But as no error have been shown i continued but i went first to check in the file in .zipline , i saw no sqlite file , the folder was created for the Bundle but nothing inside.
I tried however to lanch the backtest and i got the following results,
-->C:\Users\TOSHIBA>zipline run -f C:\Python35\Lib\site-packages\zipline\examples\buyapple.py --start 2016-1-1 --end 2017-1-1 --output buyapple_out.pickle
Traceback (most recent call last):
File "c:\python35\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\python35\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python35\Scripts\zipline.exe__main.py", line 9, in
File "c:\python35\lib\site-packages\click\core.py", line 722, in call
return self.main(args, kwargs)
File "c:\python35\lib\site-packages\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "c:\python35\lib\site-packages\click\core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\python35\lib\site-packages\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, ctx.params)
File "c:\python35\lib\site-packages\click\core.py", line 535, in invoke
return callback(args, kwargs)
File "c:\python35\lib\site-packages\zipline__main_.py", line 107, in
return f(*args, *kwargs)
File "c:\python35\lib\site-packages\click\decorators.py", line 17, in new_func
return f(get_current_context(), args, kwargs)
File "c:\python35\lib\site-packages\zipline__main__.py", line 276, in run
blotter=blotter,
File "c:\python35\lib\site-packages\zipline\utils\run_algo.py", line 141, in _run
bundle_timestamp,
File "c:\python35\lib\site-packages\zipline\data\bundles\core.py", line 524, in load
asset_db_path(name, timestr, environ=environ),
File "c:\python35\lib\site-packages\zipline\assets\assets.py", line 267, in init__
self.engine = engine
File "c:\python35\lib\site-packages\zipline\utils\input_validation.py", line 792, in preprocessor
return to(arg, **to_kwargs)
File "c:\python35\lib\site-packages\zipline\utils\sqlite_utils.py", line 46, in check_and_create_engine
verify_sqlite_path_exists(path)
File "c:\python35\lib\site-packages\zipline\utils\sqlite_utils.py", line 35, in verify_sqlite_path_exists
raise ValueError("SQLite file {!r} doesn't exist.".format(path))
ValueError: SQLite file 'C:\Users\TOSHIBA/.zipline\data\quandl\2018-09-04T14;29;26.475560\assets-6.sqlite' doesn't exist.
Here is how you can reproduce this issue on your machine:
Reproduction Steps
What steps have you taken to resolve this already?
-Tried jupyter run
-tried cmd run with my algo
-tried with Example provided by zipline algo
-tried different bundles
Anything else?
I'am wondering what is the issue, all the dependencies seem to be correctly installed, even the pandas requirement. Also if the failor that cause the quandl Bundle to be empty is related to te first of receiving no answer when running Zipline backtest i believ the solution you will provide will help resolve both of them at the same time, But if it is not please help with both issues
Dear Zipline Maintainers,
Before I tell you about my issue, let me describe my environment:
Environment
pip, Installed C dependencies with wheel file, tried to have other Zipline dependencies by using "pip install zipline" which failed obviously but got the dependencies installed and i finally installed Zipline from the Wheel File
) *Other env: I did have Python 34 and Python 36 used with Anaconda. But i am pretty sure that zipline is installed and launched from the python35 as you will see later. Unless i am wrong$ pip freeze
or$ conda list
alembic==1.0.0 backcall==0.1.0 bcolz==1.2.1 bleach==2.1.4 Bottleneck==1.2.1 certifi==2018.8.24 chardet==3.0.4 click==6.7 colorama==0.3.9 contextlib2==0.5.5 cyordereddict==1.0.0 Cython==0.28.5 decorator==4.3.0 empyrical==0.5.0 entrypoints==0.2.3 html5lib==1.0.1 idna==2.7 intervaltree==2.1.0 ipykernel==4.9.0 ipython==6.5.0 ipython-genutils==0.2.0 ipywidgets==7.4.1 jedi==0.12.1 Jinja2==2.10 jsonschema==2.6.0 jupyter==1.0.0 jupyter-client==5.2.3 jupyter-console==5.2.0 jupyter-core==4.4.0 Logbook==1.4.0 lru-dict==1.1.6 lxml==4.2.4 Mako==1.0.7 MarkupSafe==1.0 mistune==0.8.3 nbconvert==5.3.1 nbformat==4.4.0 networkx==1.11 notebook==5.6.0 numexpr==2.6.8 numpy==1.14.5+mkl pandas==0.18.0 pandas-datareader==0.6.0 pandocfilters==1.4.2 parso==0.3.1 patsy==0.5.0 pickleshare==0.7.4 prometheus-client==0.3.1 prompt-toolkit==1.0.15 Pygments==2.2.0 python-dateutil==2.7.3 python-editor==1.0.3 pytz==2018.5 pywinpty==0.5.4 pyzmq==17.1.2 qtconsole==4.4.1 requests==2.19.1 requests-file==1.4.3 requests-ftp==0.3.1 scipy==1.1.0 Send2Trash==1.5.0 simplegeneric==0.8.1 six==1.11.0 sortedcontainers==2.0.4 SQLAlchemy==1.2.11 statsmodels==0.9.0 tables==3.4.4 terminado==0.8.1 testpath==0.3.1 toolz==0.9.0 tornado==5.1 trading-calendars==1.1.0 traitlets==4.3.2 urllib3==1.23 wcwidth==0.1.7 webencodings==0.5.1 widgetsnbextension==3.4.1 win-unicode-console==0.5 wrapt==1.10.11 zipline==1.3.0Now that you know a little about me, let me tell you about the issue I am having:
Description of Issue
Zipline seems to have been properly installed, to verify i tried to import Zipline and it works fine. see below: ""C:\Python35>python Python 3.5.4 (v3.5.4:3f56838, Aug 8 2017, 02:17:05) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.
from zipline.api import order, record, symbol def initialize(context): pass
def handle_data(context, data): order(symbol('AAPL'), 10) record(AAPL=data.current(symbol('AAPL'), 'price'))
3.Attempt I therefore tried to run one of the algo(buyapple.py) in the Example File, but same response ,
I was wondered if everything was right because the process seems to have broken on the line "Merging Daily equity file". But as no error have been shown i continued but i went first to check in the file in .zipline , i saw no sqlite file , the folder was created for the Bundle but nothing inside.
I tried however to lanch the backtest and i got the following results, -->C:\Users\TOSHIBA>zipline run -f C:\Python35\Lib\site-packages\zipline\examples\buyapple.py --start 2016-1-1 --end 2017-1-1 --output buyapple_out.pickle Traceback (most recent call last): File "c:\python35\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "c:\python35\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Python35\Scripts\zipline.exe__main.py", line 9, in
File "c:\python35\lib\site-packages\click\core.py", line 722, in call
return self.main(args, kwargs)
File "c:\python35\lib\site-packages\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "c:\python35\lib\site-packages\click\core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\python35\lib\site-packages\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, ctx.params)
File "c:\python35\lib\site-packages\click\core.py", line 535, in invoke
return callback(args, kwargs)
File "c:\python35\lib\site-packages\zipline__main_.py", line 107, in
return f(*args, *kwargs)
File "c:\python35\lib\site-packages\click\decorators.py", line 17, in new_func
return f(get_current_context(), args, kwargs)
File "c:\python35\lib\site-packages\zipline__main__.py", line 276, in run
blotter=blotter,
File "c:\python35\lib\site-packages\zipline\utils\run_algo.py", line 141, in _run
bundle_timestamp,
File "c:\python35\lib\site-packages\zipline\data\bundles\core.py", line 524, in load
asset_db_path(name, timestr, environ=environ),
File "c:\python35\lib\site-packages\zipline\assets\assets.py", line 267, in init__
self.engine = engine
File "c:\python35\lib\site-packages\zipline\utils\input_validation.py", line 792, in preprocessor
return to(arg, **to_kwargs)
File "c:\python35\lib\site-packages\zipline\utils\sqlite_utils.py", line 46, in check_and_create_engine
verify_sqlite_path_exists(path)
File "c:\python35\lib\site-packages\zipline\utils\sqlite_utils.py", line 35, in verify_sqlite_path_exists
raise ValueError("SQLite file {!r} doesn't exist.".format(path))
ValueError: SQLite file 'C:\Users\TOSHIBA/.zipline\data\quandl\2018-09-04T14;29;26.475560\assets-6.sqlite' doesn't exist.
Here is how you can reproduce this issue on your machine:
Reproduction Steps
What steps have you taken to resolve this already?
-Tried jupyter run -tried cmd run with my algo -tried with Example provided by zipline algo -tried different bundles
Anything else?
I'am wondering what is the issue, all the dependencies seem to be correctly installed, even the pandas requirement. Also if the failor that cause the quandl Bundle to be empty is related to te first of receiving no answer when running Zipline backtest i believ the solution you will provide will help resolve both of them at the same time, But if it is not please help with both issues
Sincerely, Moussa