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

Issues when using compounded=False #404

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Georgesaba
Copy link

When analysing returns of strategies instead of the whole portfolio it is useful not to compound the returns as we want trades at all periods to be weighted the same. When compound = False the plots arising from the quantstats.reports.full() function did not have compounded argument included. The same error was in basic().

When running qs.reports.html() an error in qs.reports._plotting.wrappers.yearly_returns() arose due to the assumption that returns would be a DataFrame. You can either use a fix similar to fine or convert all Series into DataFrame like you have in other sections.

Error occurring when compounded = False due to line 567.  Series is input into html() function in quantstats/reports.py and .apply(_df.sum) throws and error due to type mismatch. Can allternatively also convert series to DataFrame however would be done elsewhere.
@Georgesaba
Copy link
Author

in plots() when mode.lower == "full" most of the function calls from _plots do not have the compounded argument.

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

Successfully merging this pull request may close these issues.

1 participant