Skip to content

Commit

Permalink
Update core.py (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
kartiksubbarao authored Mar 8, 2024
1 parent f525cbf commit 72fa732
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions quantstats_lumi/_plotting/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 72fa732

Please sign in to comment.