Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • 04:53
    sabirjana commented #2618
  • 03:38
    netshade commented #2366
  • 03:35
    netshade commented #2591
  • Jan 17 22:47
    samatix edited #2620
  • Jan 17 22:45
    samatix opened #2620
  • Jan 17 21:18
    ernestoeperez88 commented #2602
  • Jan 17 21:08
    ernestoeperez88 unlabeled #2601
  • Jan 17 20:59
    ernestoeperez88 closed #597
  • Jan 17 20:59
    ernestoeperez88 commented #597
  • Jan 17 20:42
    ernestoeperez88 closed #856
  • Jan 17 20:33
    ernestoeperez88 closed #1097
  • Jan 17 20:33
    ernestoeperez88 commented #1097
  • Jan 17 20:23
    ernestoeperez88 closed #1175
  • Jan 17 20:14
    ernestoeperez88 commented #2618
  • Jan 17 20:12
    ernestoeperez88 labeled #2618
  • Jan 17 10:03
    AndreasClenow commented #2616
  • Jan 16 19:08
    ernestoeperez88 review_request_removed #2020
  • Jan 16 14:46

    ssanderson on master

    ENH: Add get_rates_columnar met… Merge pull request #2617 from q… (compare)

  • Jan 16 14:46

    ssanderson on columnar-fx-rates


  • Jan 16 14:46
    ssanderson closed #2617
Ahmet Can Acar
I m getting error while getting daily history data in minute mode
there is some bug issue solved already but i do not know how to benefit from it
not much familiar with github. Is there anyone giving directions about it?
Hey guys what wheel version do you use when installing zipline?
cause it always fails cause of wheels
Erik Kastman
Hi all, I see the data download for treasuries directly from the federal reserve website in zipeline/data/treasuries.py, but as a relative newcomer I'm not sure how to actually access them in an algorithm from within the context of a data.history() or zipline.api.symbol. Is it possible to point to a public quantopian algorithm or even a few lines here in gitter to grab, say, the current price of a 10year treasury, e.g. from ~/.zipline/data/treasury_curves.csv? Thanks! If I get a good example I can create a PR for the doc.
Erik Kastman
For example, I'm familiar with getting a pandas frame out of quandl's treasury dataset ("USTREASURY/YIELD"), but I'm not sure how to add it into an existing bundle (make up an equity sid for it and re-ingest?) I've also seen using ETFs that track the rate, but want to have the rate itself, not the price of the tracking ETF (though, actually I may want both). Does anyone have an example or suggestion?
Hi everyone, I am just getting started with Zipline and wanted to introduce myself. My summer internship will involve lots of Zipline usage, and it would be great to contribute to the community somehow
Erik Kastman
@calmitchell617 I'm not sure if this will be enough for you to re-implement it, but the notebook @ssanderson created (post #2) when the optimize API was first introduced explains what they're doing pretty well: https://www.quantopian.com/posts/optimize-api-generally-available
Can ziplin support encrypted currency exchanges?
Freddie Vargus
Hi @nxt-feng in order to do any sort of work with cryptocurrencies, you'd need your own pricing data (see http://www.zipline.io/bundles.html#ingesting-data-from-csv-files) and to create your own trading calendar (see http://www.zipline.io/trading-calendars.html); aside from that, we don't have any built-in support / focus on cryptocurrencies
Scott Sanderson

hi @/all. We've just released version 1.3.0 of Zipline. Highlights of this release include:

  • Support for pandas 0.22 and numpy 1.14.
  • A new separately-installable trading_calendars module.
  • Improved support for custom Blotters.
  • Support for custom CLI arguments.

This is likely last minor release in the Zipline 1.x series. The next Zipline release will include preliminary support for international markets, which we expect to require a small number of breaking changes. As such, the next release will most likely be Zipline 2.0.

You can find the full release notes for this release at http://www.zipline.io/releases.html#release-1-3-0.

Hii I am new to zipline, is there any pdf documentation available ?
Freddie Vargus
Hi @sidbazinga we don't have any docs in the form of PDFs (at least that I'm aware of?) but we have docs at http://zipline.io, and the raw .rst files here: https://github.com/quantopian/zipline/tree/master/docs/source
I have some data files which have more columns than the standard ingest format, is there a way out to ingest these ?
Freddie Vargus
@sidbazinga I'm thinking either you'd have to drop those columns or write your own bundle
@freddiev4 going ahead with writing my own bundle, thanks :)
Ashic Mahtab
hey guys.... new to zipline; investigating at this point. If I have a separate streaming data source, what would be the best way of integrating with zipline? e.g. I get tick data from an api, and want feed it to zipline and can our api function when (say) there's a 10-20 ema cross.
I ingested a data bundle successfully for daily data, now when i use it I m getting this error "KeyError: Timestamp('2013-04-28 00:00:00+0000', tz='UTC')", read somewhere its because the algo is looking for minute data instead of daily. i tried setting "context.data_frequency = 'daily'", but still the same error shows. Is there a way to fix this ?
Issue got resolved when i passed more parameters to the zipline command :)
Hello everyone, I am just getting started with Zipline and encounter a question. It seems that Zipline doesn't have before_trading_start function, so how I can do some calculations before the markets open? Does anyone have a suggestion?
Hi everyone, I am trying to ingest data from mongoDB, so how can I custom my bundles?
hello peoplo
does anyone know if there's a slack channel for zipline developers?
Mosfiqur Rahman
Hi everyone,
I have just started working with zipline and in need of some help to figure out how I should use it for custom algorithm and data.
Here' s a detailed post: https://www.quantopian.com/posts/zipline-running-custom-algorithm-with-custom-data-1
Yi Li
Hi everyone, what is the difference between order_percent and order_target_percent in terms of the end results? Say, no matter which function I use, and no matter what how may APPL stocks I have already have (order_target_percent will adjust the difference between the percentages), after running order_percent(APPLE, 0.30) or order_target_percent(APPLE, 0.30), I will always have my 30 percent of my current position invested in APPL, right? In this way, there is no difference between this two?
I think I misunderstand something ...
Andrew King
I would assume order precent orders a set percentage - like your algo says "I need another 5%" and order_target_percent orders exactly your target that amount, but target_precent orders whatever it takes to make that share of your portfolio gets to that percentage.
Yi Li
OK, I see. Thanks @aking1012 ! This is helpful. So order_percent is like "order_another_percent", while order_target_percent is like "order_to_percent" ...
Yi Li
Is there any restrictions on the ticker name and value for self ingested csv data? Say, if I want to ingest some asset XXXX: (1) how long could the name XXXX be? and can I do special characters like XX_YY? (2) Can the value of the asset be negative? The reason I asked this is because when I ingest the data (1) If I have "EUR" and "FEUR", the ingested data is wrong, but if "EUR" and "EURF" then they are correct. (2) If there is negative values in the csv file, the ingested data will be some very large number.
I tried volumn=1e10 in the simulated csv data. And the error says uint32 out of bound. Is it because the zipline datatype is unsigned integer? so that when I tried above negative value, the result goes wrong (very large number)? thanks!
Andrew King
Depends on the provider. Yahoo has some wonky conventions for some index funds and denies some ticker symbols. I just iterate and drop the parsing errors and add it to a badsyms list even though it's listed on NASDAQ's index CSV.
Andrew King
Generally, it indicates what exchange it's on. Like the exchange in India has longer sym names than NASDAQ, which has longer sym names than NYSE, and forex exchange rates on 6 characters.
Yi Li
Thanks @aking1012 !
Yi Li
It looks like when I ingest the data with csv file, zipline can only read 3 digits after the decimal point? Could I change this if my data looks like 0.007239, 0.007321, etc. (currently, my csv data has round 17 digits after the decimal point(even though it is not that necessary for such a long accuracy), but when printing data.current, everything is 0.007, which looks like constant.)
Yi Li
Finally, I found this line of code https://github.com/quantopian/zipline/blob/v1.3.0/zipline/data/us_equity_pricing.py#L418 Is this the reason I can only get 0.001 accuracy in zipline? I tried ingesting several data, it looks like zipline can only stores up to 0.001 accuracy. Can we customize this?
Yi Li
Is there any tutorial or doc on how to ingest our own future (a financial product) data (like, from csv files)? Thanks!

Hello.. I've installed zipline, but when I try to execute some script with run_algorithm it takes me a warning and the result of backtest is a zero dataframe (i mean, every column is filled with zeros).

The warning is:
C:\Python36\lib\site-packages\empyrical\stats.py:704: RuntimeWarning: invalid value encountered in true_divide
C:\Python36\lib\site-packages\empyrical\stats.py:790: RuntimeWarning: invalid value encountered in true_divide
np.divide(average_annual_return, annualized_downside_risk, out=out)

I'm using python 3.6, numpy 1.15.4 and pandas 0.22 (current versions).
SO is windows 64bits.

Any idea?

Andy Chen
Is there any grin Chinese Grin official member?
Fabian Orccon
Jack Ouyang
Thiago Cândido
im having a issue with running an algorithm with a csv bundle
Mingzhou ZHUANG
Hi, I'm trying to define a custom TradingCalendar for Chinese market. I'm new to zipline. I'm confused about the sessions and open_times/close_times.
There's a lunch break in Chinese market. The opening time for the market is 9:30-11:30am and 13:00-15:00pm.
According to A session represents a contiguous set of minutes, do we need two sessions in one day?
What does open_times/close_times mean here? If multi-session in one day, then there will be multi-open/close time in one day.
hi all!
I have a fast and easy question, is there any article - anybody have already done that?
where you can use the library simply as a class to operate on my data? it has simply to keep track of orders and compute balance accordingly to buy/sell