Questions tagged [zipline]

Zipline is a financial backtester for trading algorithms written in Python.

Zipline is a financial backtester for trading algorithms written in Python.The system is fundamentally event-driven and a close approximation of how live-trading systems operate.

http://zipline.io

149 questions
3
votes
1 answer

How to Code Trendline Angle

I want to connect the ''Highs'' of the bars as shown in the image. 'A' point (the 'high' of a candle / bar) is to be connected to the 'B' point.( the condition for 'B' point is that it should be any bar below -20 degree and distance between these…
BlueQuant
  • 335
  • 3
  • 5
  • 13
3
votes
1 answer

zipline: Runtime figuring out what assets/symbols are provided by a bundle?

Apologies if this has an obvious solution, but I find the API documentation of zipline quite lacking with lots of holes. Either in the initialize(context) function or the handle_data(context, data) function, is there an easy way to get a list of all…
cadolphs
  • 9,014
  • 1
  • 24
  • 41
3
votes
1 answer

iPython magic for Zipline cannot find data bundle

I have a Python 2.7 script that runs Zipline fine on the command prompt, using --bundle=myBundle to load the custom data bundle myBundle which I have registered using extension.py. zipline run -f myAlgo.py --bundle=myBundle --start 2016-6-1 --end…
Nyxynyx
  • 61,411
  • 155
  • 482
  • 830
3
votes
1 answer

Zipline command line interface does not work after installation

After installing zipline with pip, I can't run: zipline run --help on my OSX terminal. It says: -bash: zipline: command not found What am I doing wrong?
Mariska
  • 1,913
  • 5
  • 26
  • 43
3
votes
1 answer

No such option error in python-zipline

I am a newbie to zipline. I am following the beginner tutorial to get familiar with it. And when I tried to run the algorithm as taught by tutorial in the ipython cell: from zipline.api import order_target, record, symbol, history import numpy as…
user5779223
  • 1,460
  • 3
  • 21
  • 42
3
votes
2 answers

Zipline import error. No module named zipline.transforms

I am not able to import the zipline.transforms module >>> from zipline.transforms import batch_transform Traceback (most recent call last): File "", line 1, in ImportError: No module named 'zipline.transforms'
vivek mishra
  • 196
  • 2
  • 6
3
votes
3 answers

zipline error. No module named zipline

I installed zipline package via Enthought Cantopy. Now I try to run a script using it in command prompt, but get error ImportError: No module named zipline. I also tried to run the same code using IPython, with the same output. I think it is related…
Lodyk Vovchak
  • 133
  • 2
  • 12
2
votes
1 answer

cannot import zipline package after successful conda installation

python version -3.5.6 using anaconda, c++build tools are installed pip install zipline works perfectly import zipline # gives error below (myenv) c:\users>>>pip show zipline Name: zipline Version: 1.4.1 Summary: A backtester for financial…
Jayjay
  • 21
  • 1
2
votes
0 answers

How to retrieve the cash dividends from the quantopian-quandl data bundle with Zipline?

https://www.zipline.io/bundles.html By default zipline comes with the quantopian-quandl data bundle which uses quandl’s WIKI dataset. The quandl data bundle includes daily pricing data, splits, cash dividends, and asset metadata. Quantopian has…
Vincent Roye
  • 2,751
  • 7
  • 33
  • 53
2
votes
2 answers

Python ZIPLINE:_RunAlgoError: No ``benchmark_spec`` was provided, and ``zipline.api.set_benchmark`` was not called in ``initialize``

This is my First Question Here, Excuse me for my mistakes I have been reading Andreas Clenow's Trading Evolved, a Book about Backtesting and Finance using Python Here is the Code that and error that I receive %matplotlib inline # Import Zipline…
2
votes
3 answers

Getting JSONDecodeError: Expecting value: line 1 column 1 (char 0) with Python + Zipline + Docker + Jupyter

I installed Zipline and Jupyter using Docker: https://github.com/quantopian/zipline/blob/master/Dockerfile I am now trying to run the following Zipline code under Jupyter %%zipline --bundle quantopian-quantl --start 2008-1-1 --end 2012-1-1 -o…
Casey Harrils
  • 2,793
  • 12
  • 52
  • 93
2
votes
0 answers

Stop loss and Take profit question in Quantopian

I need to set a stop loss and take profit to every trade I make in Quantopian. This is the code I have at the moment but it's not working as intended. The order logic (to enter a short or long trade) is scheduled only once per day while the take…
cristianc
  • 51
  • 1
  • 2
  • 8
2
votes
3 answers

zipline installation error : failed building wheel for bcolz

I'm trying to install zipline on a virtual environment on mac os. Python version = 3.6 / numpy, cython pre-installed When I try pip install zipline on the virtual environment, I get the following error. (There are a lot of warnings printed out on…
2
votes
3 answers

How do I register a custom bundle with zipline?

I am following the tutorial here: http://www.prokopyshen.com/create-custom-zipline-data-bundle and trying to set up a custom bundle to get price from custom, non US financial assets. I am stuck on the line that says: Advise zipline of our bundle…
sometimesiwritecode
  • 2,993
  • 7
  • 31
  • 69
2
votes
0 answers

pandas: python setup.py build_ext --inplace

I installed "Zipline" today following instructions at Quantopian using Conda (https://github.com/quantopian/zipline). Can you please help me either solving following problems or simply explaining how can I rollback to original status. I need…
Bhushan
  • 87
  • 1
  • 9
1
2
3
9 10