使用Quantopian pyfoli的问题

2024-03-29 01:52:08 发布

您现在位置:Python中文网/ 问答频道 /正文

我第一次运行Quantopian pyfolio,并通过它运行AAPL的返回序列来获得图形(参见下面的代码)。我总是出错。你知道吗

AttributeError:模块“pyfolio”没有属性“create\u returns\u tear\u sheet”

df = pd.read_csv('data.csv',index_col='Date',parse_dates=True).dropna()
dff = df.pct_change().dropna()
aapl = dff['AAPL']

pf.create_returns_tear_sheet(aapl)

不过,奇怪的是,当我在控制台中运行代码时,它确实会运行并生成如此多的图形,这些图形很难阅读/理解。有人遇到过这个问题吗?你知道吗


Tags: csv代码图形dfcreate序列returnssheet