Skip to content

Add precision in README about show_nontrading behavior #397

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

Closed
wants to merge 2 commits into from

Conversation

fxmarty
Copy link

@fxmarty fxmarty commented May 18, 2021

I encountered the case with a row with NaN values, but show_nontrading=False would not remove the intervals corresponding to NaN data (and 0 volume).

Filtering the data by removing the rows with NaN data solves the issue, therefore I believe it is necessary to explain how this show_nontrading behaves, which is not intuitive to me.

Thank you!

@DanielGoldfarb
Copy link
Collaborator

I have replaced this with PR #475 which has now been merged.


The text in the README file now reads:

  • Non-trading days can be displayed with the show_nontrading keyword.
    • Note that for these purposes non-trading intervals are those that are not represented in the data at all. (There are simply no rows for those dates or datetimes). This is because, when data is retrieved from an exchange or other market data source, that data typically will not include rows for non-trading days (weekends and holidays for example). Thus ...
    • show_nontrading=True will display all dates (all time intervals) between the first time stamp and the last time stamp in the data (regardless of whether rows exist for those dates or datetimes).
    • show_nontrading=False (the default value) will show only dates (or datetimes) that have actual rows in the data. (This means that if there are rows in your DataFrame that exist but contain only NaN values, these rows will still appear on the plot even if show_nontrading=False)

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.

2 participants