notadamking / RLTrader

A cryptocurrency trading environment using deep reinforcement learning and OpenAI's gym
https://discord.gg/ZZ7BGWh
GNU General Public License v3.0
1.71k stars 537 forks source link

Update RLTrader.py #152

Open MichaelQuaMan opened 2 years ago

MichaelQuaMan commented 2 years ago

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):

and

Argument output usage:

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