Skip to content

Commit

Permalink
Update reports.py
Browse files Browse the repository at this point in the history
Fix how the active variable is set.
  • Loading branch information
kartiksubbarao authored Jul 11, 2023
1 parent fa0a91a commit 7125742
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions quantstats/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def html(
)
tpl = tpl.replace("{{dd_info}}", dd_html_table)

active = kwargs.get("active_returns", "False")
active = kwargs.get("active_returns", False)
# plots
figfile = _utils._file_stream()
_plots.returns(
Expand Down Expand Up @@ -515,7 +515,7 @@ def full(
if benchmark is not None:
benchmark_title = kwargs.get("benchmark_title", "Benchmark")
strategy_title = kwargs.get("strategy_title", "Strategy")
active = kwargs.get("active_returns", "False")
active = kwargs.get("active_returns", False)

if isinstance(returns, _pd.DataFrame):
if len(returns.columns) > 1 and isinstance(strategy_title, str):
Expand Down Expand Up @@ -665,7 +665,7 @@ def basic(
if benchmark is not None:
benchmark_title = kwargs.get("benchmark_title", "Benchmark")
strategy_title = kwargs.get("strategy_title", "Strategy")
active = kwargs.get("active_returns", "False")
active = kwargs.get("active_returns", False)

if isinstance(returns, _pd.DataFrame):
if len(returns.columns) > 1 and isinstance(strategy_title, str):
Expand Down

0 comments on commit 7125742

Please sign in to comment.