empyrical的calmar_ratio显示错误类型,求解决呀

从empyrical中调用函数
其他的都可以成功,唯独calmar_ratio会出现The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

img

把fundreturn打印出来看看,有没有异常的数据。

clamar比率的计算函数中有一个max_dd,你的截图上也有,max_dd是seies格式,所以在max_dd > 0时候触发错误;另外不是其他的没问题,你计算下omega,也会出错。这个empyric的bug还是挺多的。