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