-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Fix drawdown behavior #297
Conversation
Thanks @flaviodrt! Still some PEP8 issues that should be easy to fix:
(you can use flake8 to check and autopep8 to autofix) |
Hi @twiecki! Sorry for that. |
Thanks. Some of the failures seem unrelated and are probably due to pandas 0.18.1. However, these two are related:
|
I think that were related to pandas 0.18.1 because the other tests in previous commits before my changes were failing too. |
Yep, that looks great. Thanks for the fix! |
Drawdown function does not work properly.
If one series had a drawdown from 2 to 1 and a drawdown from 10 to 6, pyfolio was considering the second one as the higher drawdown, but in fact the first drawdown was -50% and the second one was -40%.
This commit resolves this issue: #179
I added the tests for the both cases.