From 282282137585ad52215511af13e1477c652cae2f Mon Sep 17 00:00:00 2001 From: Hidenobu Tokuda Date: Sun, 26 Dec 2021 17:21:44 +0100 Subject: [PATCH 1/2] Bug fix: tears.py Added "turnover_denom" param when calling "create_txn_tear_sheet" from "create_full_tear_sheet" --- pyfolio/tears.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyfolio/tears.py b/pyfolio/tears.py index 53e5c6a50..c869b5b57 100644 --- a/pyfolio/tears.py +++ b/pyfolio/tears.py @@ -202,6 +202,7 @@ def create_full_tear_sheet(returns, if transactions is not None: create_txn_tear_sheet(returns, positions, transactions, + turnover_denom=turnover_denom, unadjusted_returns=unadjusted_returns, estimate_intraday=False, set_context=set_context) From ca47324a74108acd92c6fe46a51ebbd3fc1d641b Mon Sep 17 00:00:00 2001 From: Hidenobu Tokuda Date: Sun, 26 Dec 2021 17:41:15 +0100 Subject: [PATCH 2/2] Update plotting.py Deleted "ax.set_ylim((0, 2))" from plot_turnover because daily turnover can be over 2. --- pyfolio/plotting.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pyfolio/plotting.py b/pyfolio/plotting.py index bd3401366..4b20a5dce 100644 --- a/pyfolio/plotting.py +++ b/pyfolio/plotting.py @@ -1384,7 +1384,6 @@ def plot_turnover(returns, transactions, positions, turnover_denom='AGB', loc=legend_loc, frameon=True, framealpha=0.5) ax.set_title('Daily turnover') ax.set_xlim((returns.index[0], returns.index[-1])) - ax.set_ylim((0, 2)) ax.set_ylabel('Turnover') ax.set_xlabel('') return ax