惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
雷峰网
雷峰网
J
Java Code Geeks
G
Google Developers Blog
博客园 - 司徒正美
The GitHub Blog
The GitHub Blog
L
LangChain Blog
人人都是产品经理
人人都是产品经理
GbyAI
GbyAI
Vercel News
Vercel News
S
SegmentFault 最新的问题
Engineering at Meta
Engineering at Meta
H
Hackread – Cybersecurity News, Data Breaches, AI and More
云风的 BLOG
云风的 BLOG
F
Fortinet All Blogs
Y
Y Combinator Blog
博客园_首页
Last Week in AI
Last Week in AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
罗磊的独立博客
A
About on SuperTechFans
B
Blog
Microsoft Security Blog
Microsoft Security Blog

博客园 - Hopesun

宝庆(含新化)菜 一个贴布产品(虎标镇痛贴布-RD(温感型)),新加坡企业生产 小初高中教材电子版本(PDF)下载地址 视频生成(开源框架、商业化产品) 股票软件及指标公式学习网站 anaconda 中安装的包用Pip升级高版本的方法 钉钉组件的属性分类设置 冬季皮肤干燥,洗澡用沐浴油、沐浴露 强力漱囗液~西吡氯铵含漱液 Qlib 学习资料收集1 DeepWiki vs. Zread 对决,AI 代码文档解析 有限免费使用的 AI 大模型,收集。 获取 AKshare 的数据,为 VectorBt、Pybroker等框架提供数据 Anaconda 安装后,手动安装 JupyterNotebook、JupyterLab python 安装目录、运行环境、venv与包管理、PyCharm配置、Anaconda 配置等相关内容 Vscode 开发 Python 的一些基础设置 VectorBT Backtrader Zipline 比较 时间序列预测与股票分析框架 prophet、NeuralProphet、FinRL等 Python可视化开发工具,类似VB、Delphi Hyper3d rodin AccuRIG AI 创作 3D Poly Haven 高质量 3D 资源的网站 PhET模拟实验----仿真程序(初等教育) https://jiucai.fun/ 一个人网站
回测 —Zipline 已死?还是只需重启 Zipline-Reloaded? Backt...
Hopesun · 2025-04-08 · via 博客园 - Hopesun

此处有一文章     https://www.followingthetrend.com/2021/12/backtesting-is-zipline-dead-or-does-it-just-need-a-reload/

标题: Backtesting – Is Zipline Dead? Or does it just need a reload?     使用豆包转译了一下。

   Zipline — Zipline 3.0 docs  

 回测 ——Zipline 已死?还是只需重启?

作者:安德烈亚斯・克莱诺(Andreas Clenow)  发布时间:2021 年 12 月 29 日

   在过去一年里,这是我被问到的最常见问题。既然 Quantopian 已走向灭亡,Zipline 是不是也不行了?我们是否应该换用其他回测引擎?简单来说,关于 Zipline 已消亡的传言言过其实了,但我们还是从头说起吧。

   我在 2019 年出版的《交易进化》(Trading Evolved)一书专注于教你如何用 Python 对交易策略进行回测。在那本书里,我使用了 Zipline 库,并提供了大量源代码以及使用示例。Zipline 是由一家名为 Quantopian 的公司开发的,我有幸对这家公司有深入了解。

   Quantopian 打造了这个回测库,并免费提供,包括源代码。他们还创建了一个网站,在上面你可以使用该回测器的托管版本,还有免费的分钟级数据。他们提供了工具、数据和计算能力。很难让人不喜欢这个创意。他们还举办了顶尖的量化金融会议,每年在纽约举办大型活动,在新加坡也举办过几次。我很清楚,我曾多次在这两个地方的活动中担任演讲嘉宾。

   但最终,这家公司还是失败了。这实在令人惋惜,人们会非常怀念它。在我看来,问题在于他们不想将自身真正的优势货币化。他们对在线回测收费、开展量化经纪业务或其他更明显的盈利方式毫无兴趣。他们想成为一家对冲基金。

   他们的计划是在网站上举办竞赛,任何人都可以提交自己的交易算法。这些算法在风险、相关性以及诸多限制方面必须符合非常严格的标准。获胜者有机会被纳入实际的投资组合,总体设想是通过这种方式打造一只众包对冲基金。有科恩(Cohen)的资金支持,这个实验持续了好几年,但由于看不到获得可观回报的希望,他们失去了资金支持,最终倒闭。剩下的少数员工被罗宾汉(Robin Hood)公司录用。

    看着这一切发生很令人难过,但真正让人痛心的是他们直接关闭了网站、优秀的论坛,放弃了一切。多年的在线资源一夜之间就被删除,就因为有人不想花一百美元来维持域名。

到目前为止,情况看起来不太乐观。

    好在,Zipline 被弃用后并没有消亡,而是获得了新生,变得更强大、更出色。

    在 Quantopian 运营期间,开发进度相当缓慢。他们主要关注在线环境,而不是为本地使用提供尽可能好的回测器。其他一些令人烦恼的问题包括过于注重向后兼容性,这导致依赖项非常陈旧。

    开源社区接手后,开发速度大大加快。出现了一些有意思的分支版本,但我个人会选择 Zipline-Reloaded。

    它已更新到 Python、Pandas 等的最新版本,修复了漏洞,并且一直在积极维护。还有什么不喜欢的呢?

    Zipline-Reloaded 是一个巨大的进步。它解决了 Quantopian 可能要好几年才能解决的问题。

   Zipline 已死,Zipline-Reloaded 万岁!

    我已经更新了《交易进化》这本书,以反映对这个库的转变以及所需的细微语法变化。如果你用的是 Kindle 版本,更新应该会自动推送。过去几个月购买了平装本的读者也应该收到了更新后的代码。不过这些变化很小,你通过阅读 Zipline-Reloaded 的文档(地址:Zipline — Zipline 3.0 docs就能轻松掌握。

   语法变化不大,但现在你可以使用 Python 3.9、Pandas 1.2.4,再次进入现代编程环境!Zipline-Reloaded 这个库是由斯特凡・扬森(Stefan Jansen)构建并维护的,他做得非常出色。他还更新了 Pyfolio、Empyrical 和 Alphalens 库。非常感谢,斯特凡!

   所以,回答那个最常见的问题,Zipline 死了吗?并没有。它重获新生,变得更强大、更出色。

https://pypi.org/project/zipline-reloaded/

 斯特凡・扬森(Stefan Jansen)的开源书籍: Machine Learning for Trading 

 ===========================================================================

In the past year, that is by far the most common question I get. Now that Quantopian went the way of the Dodo, is Zipline dead? Should we switch to a different backtesting engine? The short answer is that the rumors of Zipline’s demise are exaggerated, but let’s take it from the start.

My 2019 book Trading Evolved focuses on teaching you how to use Python to backtest trading strategies. In that book, I use the Zipline library and provide plenty of source code and examples of how to use this. Zipline was made by a company called Quantopian, a company I had the privilege to get to know up close.

Quantopian built this backtesting library and made it available for free, including the source code. They also made a website where you could use a hosted version of this backtester, complete with free minute level data. They gave you the tools, the data and the computing power. It was hard not to love that idea. They also had one of the very best quant finance conferences, with a large event in New York every year and a few times in Singapore as well. I should know, I was a speaker at their events in both locations quite a few times.

They did ultimately fail, as a company. That is a crying shame and they will be sorely missed. The problem, in my view, is that they did not want to monetize the part that was their real strength. They had no interest in charging for online backtesting, or starting a quant focused brokerage arm, or other more obvious ways of seeing profit. They wanted to be a hedge fund.

The plan was to have competitions on their website, where anyone can submit their trading algos. These would have to adhere to very strict criteria in terms of risk, correlations, and a whole bunch of limitations. The winners would have a shot of being included in an actual, live portfolio and the general idea would be that a crowd sourced hedge fund would rise from this. With Cohen money to burn, this experiment went on for some years, but with no prospect of reaching meaningful returns, they lost their backing and folded the shop. The few people left standing were offered jobs with Robin Hood.

This was sad to watch, but what really painful was how they simply took down their site, their excellent discussion forum and just dropped everything. Years of online resources were just deleted overnight as someone didn’t feel like paying a hundred bucks to maintain the domains.

So far, it didn’t look great.

Open Source Community to the Rescue

The good news is this. When Zipline was abandoned, it didn’t die. It was reborn, stronger and better.

When Quantopian was running the show, development was rather slow. Their primary focus was on their online environment, rather than providing the best possible backtester for local usage. Among other somewhat annoying things were the focus on backwards compatibility, which lead to very outdated dependencies.

As the open source community took over, development started moving far quicker. There have been a few interesting forks spawned, but my own choice would be Zipline-Reloaded.

Updated to the latest versions of Python, Pandas etc., bugs fixed, actively maintained. What’s not to like?

Zipline-Reloaded is a huge leap forward. It has fixed issues that Quantopian would have taken years do get around to.

Zipline is dead, long live Zipline-Reloaded!

I have updated Trading Evolved to reflect the shift to this library and the minor syntax changes needed. If you have the Kindle version, that update should be automatically available. Anyone who bought the paperback in the past few months should also have gotten the updated code. The changes are rather minor though, and you can easily pick it up by reading the Reloaded documentation.

The syntax changes are minor, but now you work with Python 3.9, Pandas 1.2.4 and be in a modern world again! This library, Zipline-Reloaded, is built and maintained by Stefan Jansen, and he’s going a great job at it. He has also updated Pyfolio, Empyrical and Alphalens. Vielen Dank, Stefan!

So to answer that most common of questions, whether Zipline is dead. No. It’s reloaded and reborn stronger and better.

https://pypi.org/project/zipline-reloaded/