这里pf.create_full_tear_sheet(returns)中pyfolio需要的收益率returns是日收益率。 如果backtrader原始数据不是日线数据,我估计returns, positions, transactions, gross_lev = pyfoliozer.get_pf_items()中,backtrader返回的returns应该是已经转换成日收益率了,读者可以验证一下告诉我哈。
Cache SPY and Fama-French returns in home-directory instead of install-directory PR241 Joe Remove data files from package PR241 Joe Cast factor.name to str PR223 Scotty Test all create_*_tear_sheet functions in all configurations PR247 Thomasv...
(*args, **kwargs) ~/.local/lib/python3.6/site-packages/pyfolio/tears.py in create_returns_tear_sheet(returns, positions, transactions, live_start_date, cone_std, benchmark_rets, bootstrap, turnover_denom, header_rows, return_fig) 524 bootstrap=bootstrap, 525 live_start_date=live_start...
'create_capacity_tear_sheet', 'create_full_tear_sheet', 'create_interesting_times_tear_sheet', 'create_perf_attrib_tear_sheet', 'create_position_tear_sheet', 'create_returns_tear_sheet', 'create_round_trip_tear_sheet', 'create_simple_tear_sheet', 'create_txn_tear_sheet', 'customize', ...
'create_capacity_tear_sheet', 'create_full_tear_sheet', 'create_interesting_times_tear_sheet', 'create_perf_attrib_tear_sheet', 'create_position_tear_sheet', 'create_returns_tear_sheet', 'create_round_trip_tear_sheet', 'create_simple_tear_sheet', 'create_txn_tear_sheet', 'customize', ...
Compute cumulative returns from simple returns. Parameters --- returns : pd.Series Daily returns of the strategy, noncumulative. - See full explanation in tears.create_full_tear_sheet. starting_value : float, optional The starting returns (default 1). Returns --- pandas.Series Series...
Provide feedback We read every piece of feedback, and take your input very seriously. Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Cancel Create saved search Sign in Sign up {...
This allows users to pass in extra rows (as a dict or OrderedDict) to display in the perf_stats table. They can pass header_rows to create_full_tear_sheet, create_simple_tear_sheet, create_returns_tear_sheet, show_perf_stats, and print_table. HTML will b
pyfolio可以分析backtrader的策略,并生成一系列好看的图表,但是由于pyfolio直接install的稳定版有缺陷,开发版也存在诸多问题,使用的依赖版本都偏低,试用了一下之后还是更推荐quantstats。 1、安装依赖 pip install pyfolio# 直接install是稳定版会报各式各样的错误,要用git拉开发版pip install git+https://github.com...
Problem Description I already tried lots of different returns to create a full tear sheet but still cannot get it working, while simple tear sheet works. import yfinance as yf import pyfolio as pf fb_history = yf.Ticker("FB").history() r...