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

Fix perf -p 1y, returns nan% and empty cells #3344

Merged
merged 5 commits into from
Nov 9, 2022
Merged

Fix perf -p 1y, returns nan% and empty cells #3344

merged 5 commits into from
Nov 9, 2022

Conversation

montezdesousa
Copy link
Contributor

@montezdesousa montezdesousa commented Nov 8, 2022

Description

This PR fixes #2792

The perf function computes the trades performance and not the portfolio performance. Consequently, if there are no trades in the specified period, the output will be nan.

To avoid confusing users I just removed the period option, so that the performance always match the whole portfolio period. Otherwise, one might think that we can see the performance for any period in time. This would be the desired outcome, but would involve some refactoring of the way we store returns information. That can be done in the next iteration of this command.

  • Summary of the change / bug fix.
  • Link # issue, if applicable.
  • Relevant motivation and context.

@montezdesousa montezdesousa added bug Fix bug portfolio Portfolio menu labels Nov 8, 2022
@montezdesousa montezdesousa marked this pull request as ready for review November 8, 2022 15:21
@jmaslek jmaslek merged commit 9951461 into main Nov 9, 2022
@jmaslek jmaslek deleted the fix_perf branch November 9, 2022 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fix bug portfolio Portfolio menu
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Portfolio: perf -p 1y, returns nan% and empty cells
3 participants