From 72fa732048037c778469a7d219042e24861ccae2 Mon Sep 17 00:00:00 2001 From: Kartik Subbarao Date: Fri, 8 Mar 2024 14:06:44 -0500 Subject: [PATCH] Update core.py (#3) --- quantstats_lumi/_plotting/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quantstats_lumi/_plotting/core.py b/quantstats_lumi/_plotting/core.py index 44c1a08..1dee056 100644 --- a/quantstats_lumi/_plotting/core.py +++ b/quantstats_lumi/_plotting/core.py @@ -418,7 +418,7 @@ def plot_histogram( colors, _, _ = _get_colors(grayscale) - apply_fnc = _stats.comp if compounded else _np.sum + apply_fnc = _stats.comp if compounded else 'sum' if benchmark is not None: benchmark = ( benchmark.fillna(0) @@ -1003,7 +1003,7 @@ def plot_distribution( port = _pd.DataFrame(returns.fillna(0)) port.columns = ["Daily"] - apply_fnc = _stats.comp if compounded else _np.sum + apply_fnc = _stats.comp if compounded else 'sum' port["Weekly"] = port["Daily"].resample("W-MON").apply(apply_fnc) port["Weekly"] = port["Weekly"].ffill()