如何在 Python 中向量化计算滚动收益率? · 当前位于「AlphaClub 量化编程专项」中的第 2 题 / 共 2 题。
给定价格序列 price,计算 5 日滚动收益率,要求尽量避免 Python for 循环。