From 6e59d8e4d30c1e89d94332a0b76c104b399a99d7 Mon Sep 17 00:00:00 2001 From: Ran Aroussi Date: Thu, 22 Jun 2023 23:21:22 +0100 Subject: [PATCH] fixed single strategy basic report --- quantstats/reports.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quantstats/reports.py b/quantstats/reports.py index a8fd0462..5c9c3015 100644 --- a/quantstats/reports.py +++ b/quantstats/reports.py @@ -887,8 +887,6 @@ def plots(returns, benchmark=None, grayscale=False, elif isinstance(returns, _pd.DataFrame): returns.columns = strategy_colname - returns = _pd.DataFrame(returns) - if mode.lower() != 'full': _plots.snapshot(returns, grayscale=grayscale, figsize=(figsize[0], figsize[0]), @@ -909,6 +907,8 @@ def plots(returns, benchmark=None, grayscale=False, return + returns = _pd.DataFrame(returns) + # prepare timeseries if benchmark is not None: benchmark = _utils._prepare_benchmark(benchmark, returns.index)