{ "info": { "author": "Alpaca", "author_email": "oss@alpaca.markets", "bugtrack_url": null, "classifiers": [], "description": "# Zipline Pipeline Extension for Live Trading\n`pipeline-live` is an extension for zipline pipeline independently usable\nfor live trading, outside of zipline. While zipline is a great backtesting\nlibrary, the default Pipeline API requires complicated setup for data bundle,\nwhich is often challenging to average users. Quantopian's proprietary data\nsources such as Morningstar is also not available to many. This library is\nto address this issue by using online API data sources and simplify the interface\nfor live trading usage.\nThe interface complies the original zipline/pipeline for the most part. For more\ndetails about the Pipeline API, please see\n[Quantopian's tutorial](https://www.quantopian.com/tutorials/pipeline) and\n[zipline document](https://www.zipline.io/).\n\nIf you are looking to use this library for your Quantopian algorithm,\ncheck out the [migration document](./migration.md).\n\n## Data Sources\nThis library predominantly relies on the [Alpaca Data API](https://docs.alpaca.markets/api-documentation/api-v2/market-data/) for daily\nprice data. For users with funded Alpaca brokerage accounts, several [Polygon](https://polygon.io/) fundamental\ndata endpoints are supported. [IEX Cloud](https://iexcloud.io/docs/api/) data is also supported, though if too much\ndata is requested, it stops being free. (See the note in the IEX section below.)\n\n\n## Install\n\n`pipeline-live` is a PyPI module and you can install it using `pip` command.\n\n```sh\n$ pip install pipeline-live\n```\n\nThis module is tested and expected to work with python 3.6 and later\n\n## Example\nHere is a simple pipeline example.\n\n```py\nfrom pipeline_live.engine import LivePipelineEngine\nfrom pipeline_live.data.sources.iex import list_symbols\nfrom pipeline_live.data.alpaca.pricing import USEquityPricing\nfrom pipeline_live.data.polygon.fundamentals import PolygonCompany\nfrom pipeline_live.data.iex.factors import AverageDollarVolume\nfrom zipline.pipeline import Pipeline\n\neng = LivePipelineEngine(list_symbols)\ntop5 = AverageDollarVolume(window_length=20).top(5)\npipe = Pipeline({\n 'close': USEquityPricing.close.latest,\n 'marketcap': PolygonCompany.marketcap.latest,\n}, screen=top5)\n\ndf = eng.run_pipeline(pipe)\n\n'''\n close marketcap\nAAPL 215.49 1.044037e+12\nAMZN 1902.90 9.293372e+11\nFB 172.90 5.042383e+11\nQQQ 180.80 7.092998e+10\nSPY 285.79 2.737475e+11\n'''\n```\n\n## Data Cache\nSince most of the data does not change during the day, the data access layer\ncaches the dataset on disk. In case you need to purge the cache, the cache\ndata is located in `$ZIPLINE_ROOT/data/daily_cache`.\n\n## Pipeline API\n\n### pipeline_live.engine.LivePipelineEngine\nThis class provides the similar interface to `zipline.pipeline.engine.SimplePipelineEngine`.\nThe main difference is its `run_pipeline` does not require the start and end dates as parameters,\nand returns a DataFrame with the data for the current date (US/Eastern time).\nIts constructor accepts `list_symbol` function that is supposed to return the full set of\nsymbols as a string list, which is used as the maximum universe inside the engine.\n\n## Alpaca Data API\nThe [Alpaca Data API](https://docs.alpaca.markets/api-documentation/api-v2/market-data/) is currently the least-limited source of pricing data\nsupported by pipeline-live. In order to use the Alpaca Data API, you'll need to\nregister for an Alpaca account [here](https://app.alpaca.markets/signup) and generate API key information with\nthe dashboard. Once you have your keys generated, you need to store them in\nthe following environment variables:\n\n```\nAPCA_API_BASE_URL\nAPCA_API_KEY_ID\nAPCA_API_SECRET_KEY\n```\n\n### pipeline_live.data.alpaca.pricing.USEquityPricing\nThis class provides the basic price information retrieved from\n[Alpaca Data API](https://docs.alpaca.markets/api-documentation/api-v2/market-data/bars/).\n\n## Polygon Data Source API\nYou will need to set an [Alpaca](https://alpaca.markets/) API key as `APCA_API_KEY_ID` to use this API.\n\n### pipeline_live.data.polygon.fundamentals.PolygonCompany\nThis class provides the DataSet interface using\n[Polygon Symbol Details API](https://polygon.io/docs/#!/Meta-Data/get_v1_meta_symbols_symbol_company)\n\n### pipeline_live.data.polygon.filters.IsPrimaryShareEmulation\nExperimental. This class filteres symbols by the following\nrule to return something close to\n[IsPrimaryShare()](https://www.quantopian.com/help#quantopian_pipeline_filters_fundamentals_IsPrimaryShare) in Quantopian.\n\n- must be a US company\n- must have a valid financial data\n\n## IEX Data Source API\nTo use IEX-source data, you need to sign up for an IEX Cloud account and save\nyour IEX token as an environment variable called `IEX_TOKEN`.\n\nIMPORTANT NOTE: IEX data is now limited for free accounts. In order to\navoid using more messages than you are allotted each month, please\nbe sure that you are not using IEX-sourced factors too frequently\nor on too many securities. For more information about how many messages\neach method will cost, please refer to [this part](https://iexcloud.io/docs/api/#data-weighting) of the IEX Cloud documentation.\n\n### pipeline_live.data.iex.pricing.USEquityPricing\nThis class provides the basic price information retrieved from\n[IEX Chart API](https://iextrading.com/developer/docs/#chart).\n\n### pipeline_live.data.iex.fundamentals.IEXCompany\nThis provides the DataSet interface using\n[IEX Company API](https://iextrading.com/developer/docs/#company).\n\n### pipeline_live.data.iex.fundamentals.IEXKeyStats\nThis provides the DataSet interface using\n[IEX Key Stats API](https://iextrading.com/developer/docs/#key-stats).\n\n### pipeline_live.data.iex.factors\nIt is important to note that the original builtin factors from zipline does\nnot work here as is, since some of them rely on zipline's USEquityPricing class.\nThis package provides the same set of zipline's builtin factor classes using\n`pipeline_live.data.iex.pricing.USEquityPricing` class. For the complete\nlist of builtin factors, please refer [zipline document](https://www.zipline.io/appendix.html#built-in-factors)\n\n### pipeline_live.data.iex.classifiers.Sector()\nA shortcut for `IEXCompany.sector.latest`\n\n### pipeline_live.data.iex.classifiers.Industry()\nA shortcut for `IEXCompany.industry.latest`\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/alpacahq/pipeline_live", "keywords": "financial,zipline,pipeline,stock,screening,api,trade", "license": "", "maintainer": "", "maintainer_email": "", "name": "pipeline-live", "package_url": "https://pypi.org/project/pipeline-live/", "platform": "", "project_url": "https://pypi.org/project/pipeline-live/", "project_urls": { "Homepage": "https://github.com/alpacahq/pipeline_live" }, "release_url": "https://pypi.org/project/pipeline-live/0.1.9/", "requires_dist": [ "alpaca-trade-api (>=0.29)", "iexfinance (>=0.4.1)", "zipline (==1.3.0)", "numpy" ], "requires_python": "", "summary": "Zipline Pipeline extension for live trade", "version": "0.1.9" }, "last_serial": 5656643, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "0270f3e9d429c29828b844e2d6f5b699", "sha256": "b48aa519f93402043b0c2f900255b5165cd6fb3970d4cde51210eb80bdb43832" }, "downloads": -1, "filename": "pipeline_live-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "0270f3e9d429c29828b844e2d6f5b699", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 26512, "upload_time": "2018-08-26T08:25:18", "url": "https://files.pythonhosted.org/packages/96/49/3e282c5d7b1f383886893728dcdfd5336a0f5a83c9df7ead395220c0113e/pipeline_live-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3c7f9eca88c111ef6298eaccba6b8f9e", "sha256": "7cb0e5b0b842e852a901f46337f68611224b1768584662463d4aaa5951a71ede" }, "downloads": -1, "filename": "pipeline-live-0.1.2.tar.gz", "has_sig": false, "md5_digest": "3c7f9eca88c111ef6298eaccba6b8f9e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20736, "upload_time": "2018-08-26T08:25:19", "url": "https://files.pythonhosted.org/packages/d4/d3/62cd908d7170b85ab95eedf03ccbb14e8e559b9de8e1a0b1278a40bf1318/pipeline-live-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "beae3e4668223475dce166be0e00b089", "sha256": "0eb86b91d41972f4677172ddaf66b187623b05e76cc421b8108fee0f2738acb3" }, "downloads": -1, "filename": "pipeline_live-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "beae3e4668223475dce166be0e00b089", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 26546, "upload_time": "2018-08-26T08:37:14", "url": "https://files.pythonhosted.org/packages/ed/9d/34bdaf161b642823fe2518ec41567ae651874457da277f3750b95ba966dc/pipeline_live-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4c920b1a6597d887e07e1e7e8d92dac7", "sha256": "b642a174b59224d8e18631ec0292d768fc3d4e907a5c59fca35637f8dd88d53f" }, "downloads": -1, "filename": "pipeline-live-0.1.3.tar.gz", "has_sig": false, "md5_digest": "4c920b1a6597d887e07e1e7e8d92dac7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20830, "upload_time": "2018-08-26T08:37:15", "url": "https://files.pythonhosted.org/packages/fc/1c/537edc600f585e5e8788ca311d882777a6627d4cb582ba37fef0aebb0c76/pipeline-live-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "02f9054e73bc9f1b9e866fd8bc38725e", "sha256": "6c2798c40cd379c4854a3f57a1af9599e3eb6f4cf4723caec8449d76c7bf98fe" }, "downloads": -1, "filename": "pipeline_live-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "02f9054e73bc9f1b9e866fd8bc38725e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 26792, "upload_time": "2018-09-01T06:47:19", "url": "https://files.pythonhosted.org/packages/7a/6f/9a2e333c2e243db03e2da192a1448644d31972b4c81488799956550a966b/pipeline_live-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1c987fb12e3a3680d9c5a3c08f65d4f2", "sha256": "3c4d75798e8e3e7dc2b94a9b9bd881ffbcd9d7e42dc4520e62c71a08590f5700" }, "downloads": -1, "filename": "pipeline-live-0.1.4.tar.gz", "has_sig": false, "md5_digest": "1c987fb12e3a3680d9c5a3c08f65d4f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21245, "upload_time": "2018-09-01T06:47:20", "url": "https://files.pythonhosted.org/packages/63/28/8e54704bcc9d2ce5b9ea908e2a1b7b6c55bd25650217e8300404e048bb2e/pipeline-live-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "05083471b6acf413aac8a2e215b688e0", "sha256": "231c32dec79bcac3934a31cce88abddfe5440b2066361eae39eacf151c9b61cb" }, "downloads": -1, "filename": "pipeline_live-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "05083471b6acf413aac8a2e215b688e0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 30803, "upload_time": "2019-02-25T16:38:38", "url": "https://files.pythonhosted.org/packages/fc/d0/3301e8db0651f38f8074dd121e61f24c11849f50ce032d57c59cf3fd9a7f/pipeline_live-0.1.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d4db2dd616a509e117da3a3d128c40e1", "sha256": "cd69eb6b6053655e7989dd1f2aa48c9f55ad61003e7a70edc89acc4739e7c18c" }, "downloads": -1, "filename": "pipeline-live-0.1.5.tar.gz", "has_sig": false, "md5_digest": "d4db2dd616a509e117da3a3d128c40e1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20994, "upload_time": "2019-02-25T16:38:40", "url": "https://files.pythonhosted.org/packages/3b/1f/f0d67845d6b3cb98784a68a1abb7a584e345287f95e746514300c6535db9/pipeline-live-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "47b063c1cfc1c984c0057c0df9f86e14", "sha256": "9f5ccbe974d2c8ef3ab5223dfdb00cf49134d3a5dc418c86dac8ebc6bbd80399" }, "downloads": -1, "filename": "pipeline_live-0.1.6-py3-none-any.whl", "has_sig": false, "md5_digest": "47b063c1cfc1c984c0057c0df9f86e14", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 30907, "upload_time": "2019-05-30T16:53:26", "url": "https://files.pythonhosted.org/packages/f1/53/7f89f6896111a98a7925c8b46a2f635dfe9cafdb4bc729bd847a8da011d7/pipeline_live-0.1.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "01efefd092b5b0bacca8909516b8b625", "sha256": "4e55a2688e58722b9d9e59bc044e24ebe000f10525d34654ade3d5d15b9f7d85" }, "downloads": -1, "filename": "pipeline-live-0.1.6.tar.gz", "has_sig": false, "md5_digest": "01efefd092b5b0bacca8909516b8b625", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21122, "upload_time": "2019-05-30T16:53:29", "url": "https://files.pythonhosted.org/packages/45/fd/f2918d2ea7b53a0cd4f89a629a9b5259c5c58fecbea64dbb1acf7150fa47/pipeline-live-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "65c7a11de361d29ffea808a98df91e29", "sha256": "ce2ffb9f96bcf6dbec6f943cf070bc88512bddafd2fa717dd3292b0a43b3d9a5" }, "downloads": -1, "filename": "pipeline_live-0.1.7-py3-none-any.whl", "has_sig": false, "md5_digest": "65c7a11de361d29ffea808a98df91e29", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 35482, "upload_time": "2019-06-26T14:20:44", "url": "https://files.pythonhosted.org/packages/a4/47/22bf8337ea24438be6ef6787b66e9c84762c19772fb14a7c65378388040a/pipeline_live-0.1.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0edf231e951ee92cac349fa08e3f11a3", "sha256": "fe76333cbcafc1629602245f42874bb77e5df55f21b8e0d112993626f7b0b036" }, "downloads": -1, "filename": "pipeline-live-0.1.7.tar.gz", "has_sig": false, "md5_digest": "0edf231e951ee92cac349fa08e3f11a3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23904, "upload_time": "2019-06-26T14:20:46", "url": "https://files.pythonhosted.org/packages/92/77/755d0e7dfa73e495776dbe09bffcb2c362ede2a27936c7237a945f3b6e63/pipeline-live-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "2af0bc515f2fee139b623b586f4c9041", "sha256": "603a8b5d5585b81f3a55b4bc7bfcd44c7e7c5d442efee26639770a60bec48566" }, "downloads": -1, "filename": "pipeline_live-0.1.8-py3-none-any.whl", "has_sig": false, "md5_digest": "2af0bc515f2fee139b623b586f4c9041", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 35475, "upload_time": "2019-07-29T22:19:14", "url": "https://files.pythonhosted.org/packages/f0/41/e3c7b83abcd7151374cde5230b6487e230c9df142724def6177330c50fd2/pipeline_live-0.1.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3bfa498c40ce1a819882d89d8dd71ffc", "sha256": "09645dad492d41a7a54552965ab26f767bf69a83cc7df9d8bc37fe09ae27ff3a" }, "downloads": -1, "filename": "pipeline-live-0.1.8.tar.gz", "has_sig": false, "md5_digest": "3bfa498c40ce1a819882d89d8dd71ffc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23898, "upload_time": "2019-07-29T22:19:16", "url": "https://files.pythonhosted.org/packages/f4/c6/18cfbc5f7223c26068b89831b424dede73f1964e7fd544f5f41876a1874e/pipeline-live-0.1.8.tar.gz" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "fa7a60d75c2aa2f216d0ca9e04c40fab", "sha256": "8dc2816d27d4fcfd41d5844fcc4c9700c295c6793ad4e549f5d470b6d588b600" }, "downloads": -1, "filename": "pipeline_live-0.1.9-py3-none-any.whl", "has_sig": false, "md5_digest": "fa7a60d75c2aa2f216d0ca9e04c40fab", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 36173, "upload_time": "2019-08-09T16:00:47", "url": "https://files.pythonhosted.org/packages/52/8c/c5c299cc747f78cb25cbadc29e5e359f2ff8fb6eba11170a755ac4cbb078/pipeline_live-0.1.9-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ff426f0885c2244d0629741abefd1a58", "sha256": "4d534de16487a3a8f3295b4b850ee9ec4e7764a17336b4cee31ded55eb2c5f93" }, "downloads": -1, "filename": "pipeline-live-0.1.9.tar.gz", "has_sig": false, "md5_digest": "ff426f0885c2244d0629741abefd1a58", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24621, "upload_time": "2019-08-09T16:00:48", "url": "https://files.pythonhosted.org/packages/da/bc/aa44fb9a7b1350048eeb58ba9147ada62270ba0a22edc950940088abd0d2/pipeline-live-0.1.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fa7a60d75c2aa2f216d0ca9e04c40fab", "sha256": "8dc2816d27d4fcfd41d5844fcc4c9700c295c6793ad4e549f5d470b6d588b600" }, "downloads": -1, "filename": "pipeline_live-0.1.9-py3-none-any.whl", "has_sig": false, "md5_digest": "fa7a60d75c2aa2f216d0ca9e04c40fab", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 36173, "upload_time": "2019-08-09T16:00:47", "url": "https://files.pythonhosted.org/packages/52/8c/c5c299cc747f78cb25cbadc29e5e359f2ff8fb6eba11170a755ac4cbb078/pipeline_live-0.1.9-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ff426f0885c2244d0629741abefd1a58", "sha256": "4d534de16487a3a8f3295b4b850ee9ec4e7764a17336b4cee31ded55eb2c5f93" }, "downloads": -1, "filename": "pipeline-live-0.1.9.tar.gz", "has_sig": false, "md5_digest": "ff426f0885c2244d0629741abefd1a58", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24621, "upload_time": "2019-08-09T16:00:48", "url": "https://files.pythonhosted.org/packages/da/bc/aa44fb9a7b1350048eeb58ba9147ada62270ba0a22edc950940088abd0d2/pipeline-live-0.1.9.tar.gz" } ] }