Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quantstrat _calc_dd cannot handle a continuously worsening dd (without recovery) epsiode #123

Open
andreskull opened this issue Jul 14, 2019 · 1 comment

Comments

@andreskull
Copy link
Contributor

andreskull commented Jul 14, 2019

Traceback (most recent call last):
File "./cli.py", line 52, in
save_report=args.save_report)
File "/home/andres/PycharmProjects/notadamking-rl-trader/lib/RLTrader.py", line 249, in train
save_report=save_report)
File "/home/andres/PycharmProjects/notadamking-rl-trader/lib/RLTrader.py", line 298, in test
qs.reports.html(returns.Balance, file=reports_path)
File "/home/andres/anaconda3/lib/python3.6/site-packages/quantstats/reports.py", line 60, in html
compounded=compounded)[2:]
File "/home/andres/anaconda3/lib/python3.6/site-packages/quantstats/reports.py", line 298, in metrics
dd = _calc_dd(df, display=(display or "internal" in kwargs))
File "/home/andres/anaconda3/lib/python3.6/site-packages/quantstats/reports.py", line 557, in _calc_dd
dd_info = _stats.drawdown_details(dd)
File "/home/andres/anaconda3/lib/python3.6/site-packages/quantstats/stats.py", line 590, in drawdown_details
_dfs[col] = _drawdown_details(drawdown[col])
File "/home/andres/anaconda3/lib/python3.6/site-packages/quantstats/stats.py", line 557, in _drawdown_details
if starts[0] > ends[0]:
IndexError: list index out of range

@andreskull andreskull changed the title quantstrat _calc_dd cannot handle a continuously increasing dd episode without recovery quantstrat _calc_dd cannot handle a continuously worsening dd (without recovery) epsiode Jul 14, 2019
@andreskull
Copy link
Contributor Author

#124 solves the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant