[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-2485":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":30,"readmeContent":31,"aiSummary":32,"trendingCount":16,"starSnapshotCount":16,"syncStatus":33,"lastSyncTime":34,"discoverSource":35},2485,"zipline","quantopian\u002Fzipline","quantopian","Zipline, a Pythonic Algorithmic Trading Library","https:\u002F\u002Fwww.zipline.io",null,"Python",19863,5008,1015,333,0,5,23,121,19,45,"Apache License 2.0",false,"master",true,[27,28,29,5],"algorithmic-trading","python","quant","2026-06-12 02:00:41",".. image:: https:\u002F\u002Fmedia.quantopian.com\u002Flogos\u002Fopen_source\u002Fzipline-logo-03_.png\n    :target: https:\u002F\u002Fwww.zipline.io\n    :width: 212px\n    :align: center\n    :alt: Zipline\n\n=============\n\n|Gitter|\n|pypi version status|\n|pypi pyversion status|\n|travis status|\n|appveyor status|\n|Coverage Status|\n\nZipline is a Pythonic algorithmic trading library. It is an event-driven\nsystem for backtesting. Zipline is currently used in production as the backtesting and live-trading\nengine powering `Quantopian \u003Chttps:\u002F\u002Fwww.quantopian.com>`_ -- a free,\ncommunity-centered, hosted platform for building and executing trading\nstrategies. Quantopian also offers a `fully managed service for professionals \u003Chttps:\u002F\u002Ffactset.quantopian.com>`_\nthat includes Zipline, Alphalens, Pyfolio, FactSet data, and more.\n\n- `Join our Community! \u003Chttps:\u002F\u002Fgroups.google.com\u002Fforum\u002F#!forum\u002Fzipline>`_\n- `Documentation \u003Chttps:\u002F\u002Fwww.zipline.io>`_\n- Want to Contribute? See our `Development Guidelines \u003Chttps:\u002F\u002Fwww.zipline.io\u002Fdevelopment-guidelines>`_\n\nFeatures\n========\n\n- **Ease of Use:** Zipline tries to get out of your way so that you can\n  focus on algorithm development. See below for a code example.\n- **\"Batteries Included\":** many common statistics like\n  moving average and linear regression can be readily accessed from\n  within a user-written algorithm.\n- **PyData Integration:** Input of historical data and output of performance statistics are\n  based on Pandas DataFrames to integrate nicely into the existing\n  PyData ecosystem.\n- **Statistics and Machine Learning Libraries:** You can use libraries like matplotlib, scipy,\n  statsmodels, and sklearn to support development, analysis, and\n  visualization of state-of-the-art trading systems.\n\nInstallation\n============\n\nZipline currently supports Python 2.7, 3.5, and 3.6, and may be installed via\neither pip or conda.\n\n**Note:** Installing Zipline is slightly more involved than the average Python\npackage. See the full `Zipline Install Documentation`_ for detailed\ninstructions.\n\nFor a development installation (used to develop Zipline itself), create and\nactivate a virtualenv, then run the ``etc\u002Fdev-install`` script.\n\nQuickstart\n==========\n\nSee our `getting started tutorial \u003Chttps:\u002F\u002Fwww.zipline.io\u002Fbeginner-tutorial>`_.\n\nThe following code implements a simple dual moving average algorithm.\n\n.. code:: python\n\n    from zipline.api import order_target, record, symbol\n\n    def initialize(context):\n        context.i = 0\n        context.asset = symbol('AAPL')\n\n\n    def handle_data(context, data):\n        # Skip first 300 days to get full windows\n        context.i += 1\n        if context.i \u003C 300:\n            return\n\n        # Compute averages\n        # data.history() has to be called with the same params\n        # from above and returns a pandas dataframe.\n        short_mavg = data.history(context.asset, 'price', bar_count=100, frequency=\"1d\").mean()\n        long_mavg = data.history(context.asset, 'price', bar_count=300, frequency=\"1d\").mean()\n\n        # Trading logic\n        if short_mavg > long_mavg:\n            # order_target orders as many shares as needed to\n            # achieve the desired number of shares.\n            order_target(context.asset, 100)\n        elif short_mavg \u003C long_mavg:\n            order_target(context.asset, 0)\n\n        # Save values for later inspection\n        record(AAPL=data.current(context.asset, 'price'),\n               short_mavg=short_mavg,\n               long_mavg=long_mavg)\n\n\nYou can then run this algorithm using the Zipline CLI.\nFirst, you must download some sample pricing and asset data:\n\n.. code:: bash\n\n    $ zipline ingest\n    $ zipline run -f dual_moving_average.py --start 2014-1-1 --end 2018-1-1 -o dma.pickle --no-benchmark\n\nThis will download asset pricing data data sourced from Quandl, and stream it through the algorithm over the specified time range.\nThen, the resulting performance DataFrame is saved in ``dma.pickle``, which you can load and analyze from within Python.\n\nYou can find other examples in the ``zipline\u002Fexamples`` directory.\n\nQuestions?\n==========\n\nIf you find a bug, feel free to `open an issue \u003Chttps:\u002F\u002Fgithub.com\u002Fquantopian\u002Fzipline\u002Fissues\u002Fnew>`_ and fill out the issue template.\n\nContributing\n============\n\nAll contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome. Details on how to set up a development environment can be found in our `development guidelines \u003Chttps:\u002F\u002Fwww.zipline.io\u002Fdevelopment-guidelines>`_.\n\nIf you are looking to start working with the Zipline codebase, navigate to the GitHub `issues` tab and start looking through interesting issues. Sometimes there are issues labeled as `Beginner Friendly \u003Chttps:\u002F\u002Fgithub.com\u002Fquantopian\u002Fzipline\u002Fissues?q=is%3Aissue+is%3Aopen+label%3A%22Beginner+Friendly%22>`_ or `Help Wanted \u003Chttps:\u002F\u002Fgithub.com\u002Fquantopian\u002Fzipline\u002Fissues?q=is%3Aissue+is%3Aopen+label%3A%22Help+Wanted%22>`_.\n\nFeel free to ask questions on the `mailing list \u003Chttps:\u002F\u002Fgroups.google.com\u002Fforum\u002F#!forum\u002Fzipline>`_ or on `Gitter \u003Chttps:\u002F\u002Fgitter.im\u002Fquantopian\u002Fzipline>`_.\n\n.. note::\n\n   Please note that Zipline is not a community-led project. Zipline is\n   maintained by the Quantopian engineering team, and we are quite small and\n   often busy.\n\n   Because of this, we want to warn you that we may not attend to your pull\n   request, issue, or direct mention in months, or even years. We hope you\n   understand, and we hope that this note might help reduce any frustration or\n   wasted time.\n\n\n.. |Gitter| image:: https:\u002F\u002Fbadges.gitter.im\u002FJoin%20Chat.svg\n   :target: https:\u002F\u002Fgitter.im\u002Fquantopian\u002Fzipline?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n.. |pypi version status| image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fzipline.svg\n   :target: https:\u002F\u002Fpypi.python.org\u002Fpypi\u002Fzipline\n.. |pypi pyversion status| image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fzipline.svg\n   :target: https:\u002F\u002Fpypi.python.org\u002Fpypi\u002Fzipline\n.. |travis status| image:: https:\u002F\u002Ftravis-ci.org\u002Fquantopian\u002Fzipline.svg?branch=master\n   :target: https:\u002F\u002Ftravis-ci.org\u002Fquantopian\u002Fzipline\n.. |appveyor status| image:: https:\u002F\u002Fci.appveyor.com\u002Fapi\u002Fprojects\u002Fstatus\u002F3dg18e6227dvstw6\u002Fbranch\u002Fmaster?svg=true\n   :target: https:\u002F\u002Fci.appveyor.com\u002Fproject\u002Fquantopian\u002Fzipline\u002Fbranch\u002Fmaster\n.. |Coverage Status| image:: https:\u002F\u002Fcoveralls.io\u002Frepos\u002Fquantopian\u002Fzipline\u002Fbadge.svg\n   :target: https:\u002F\u002Fcoveralls.io\u002Fr\u002Fquantopian\u002Fzipline\n\n.. _`Zipline Install Documentation` : https:\u002F\u002Fwww.zipline.io\u002Finstall\n","Zipline是一个用Python编写的算法交易库，主要用于事件驱动的回测。它具备易于使用的特点，让用户能够专注于算法开发而无需过多关注底层实现细节。Zipline内置了许多常用统计工具如移动平均线和线性回归，并且与Pandas等PyData生态系统良好集成，支持使用matplotlib、scipy等库进行数据分析和可视化。此外，Zipline还支持多种机器学习库，便于构建先进的交易系统。该库适用于希望快速搭建并测试量化交易策略的研究人员、开发者以及专业投资者。",2,"2026-06-11 02:50:04","top_language"]