因子表达式问题求助
  18302000965 16小时前 3 0

因子表达式

(if(((sum(high, 20) / 20) < high), (-1 * delta(high, 2)), 0))

问题

Can only compare identically-labeled Series objects

原因分析

(sum(high, 20) / 20) < high 比较时

SUM函数实现:series.groupby(level=‘symbol’).rolling(window=window, min_periods=1).sum().droplevel(0)

导致high序列与SUM计算后的返回序列顺序不一致

求助解法

最后一次编辑于 16小时前 0

暂无评论

推荐阅读