RLTrader icon indicating copy to clipboard operation
RLTrader copied to clipboard

Update RLTrader.py

Open MichaelQuaMan opened this issue 3 years ago • 0 comments

Issue qs.report.html() function signature doesn't support file as an argument.

Call results in:

"TypeError: html() got an unexpected keyword argument 'file'". The correct argument is `output`. 

Support

qs.report.html() signature:

def html(returns, benchmark=None, rf=0., grayscale=False,
         title='Strategy Tearsheet', output=None, compounded=True,
         periods_per_year=252, download_filename='quantstats-tearsheet.html',
         figfmt='svg', template_path=None, match_dates=False):
  • https://github.com/ranaroussi/quantstats/blob/6aaa65c20bad4c364efa7623375901925c036b45/quantstats/reports.py#L57

and

Argument output usage:

    with open(output, 'w', encoding='utf-8') as f:
        f.write(tpl)
  • https://github.com/ranaroussi/quantstats/blob/6aaa65c20bad4c364efa7623375901925c036b45/quantstats/reports.py#L250

MichaelQuaMan avatar Jan 22 '22 05:01 MichaelQuaMan