Skip to content

Commit

Permalink
use output param
Browse files Browse the repository at this point in the history
  • Loading branch information
ranaroussi committed Jun 22, 2023
1 parent 0c53b4d commit d0518b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions quantstats/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def html(returns, benchmark=None, rf=0., grayscale=False,
figfmt='svg', template_path=None, match_dates=False, **kwargs):

if output is None and not _utils._in_notebook():
raise ValueError("`file` must be specified")
raise ValueError("`output` must be specified")

win_year, win_half_year = _get_trading_periods(periods_per_year)

Expand Down Expand Up @@ -339,7 +339,7 @@ def html(returns, benchmark=None, rf=0., grayscale=False,
_download_html(tpl, download_filename)
return

with open(download_filename, 'w', encoding='utf-8') as f:
with open(output, 'w', encoding='utf-8') as f:
f.write(tpl)


Expand Down

0 comments on commit d0518b8

Please sign in to comment.