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

plot_timeseries does not handle returns type properly #62

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SergeyHein
Copy link

@SergeyHein SergeyHein commented Oct 6, 2024

This Pull requests adresses #61

Summary of changes

  1. added proper pd.DataFrame support to plot_timeseries
  2. added annotations to plot_timeseries and reports.full
  3. added returns and benchmark type checking to plot_timeseries and reports.full

Test evidences

To keep scope of the fix limited behavior of reports.full when strategy / returnes are passed as pd.DataFrame is kept as-is. Subject to a further bug report / inverstigation

Any questions / suggestions let me know.
Sergey

Description by Korbit AI

What change is being made?

Add type annotations and input validation to plot_timeseries and full functions to ensure returns is a pandas Series or DataFrame and benchmark is either None or a pandas Series.

Why are these changes being made?

These changes improve the robustness of the code by enforcing type constraints, which helps prevent runtime errors due to incorrect input types. This approach enhances code readability and maintainability by clearly specifying expected input types and handling invalid inputs gracefully.

Is this description stale? Ask me to generate a new description by commenting /korbit-generate-pr-description

1. added proper pd.DataFrame support to plot_timeseries
2. added annotations to plot_timeseries and reports.full
3. added returns and benchmark type checking to plot_timeseries and reports.full
Copy link

korbit-ai bot commented Oct 6, 2024

You've used up your 5 PR reviews for this month under the Korbit Starter Plan. You'll get 5 more reviews on October 20th, 2024 or you can upgrade to Pro for unlimited PR reviews and enhanced features in your Korbit Console.

Copy link

korbit-ai bot commented Oct 6, 2024

I’ve found 1 issues in this PR, but you have exceeded your plan limits.

Upgrade to Korbit Pro and ask for another review with /korbit-review.

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