Skip to content

Clarify show_nontrading behavior #475

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

Merged
merged 5 commits into from
Dec 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,10 @@ Notice, in the above chart, there are no gaps along the x-coordinate, even thoug

- However, sometimes people like to see these gaps, so that they can tell, with a quick glance, where the weekends and holidays fall.

- Non-trading days can be displayed with the `show_nontrading` keyword.
- 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`**)
- For example, in the chart below, you can easily see weekends, as well as a gap at Thursday, November 28th for the U.S. Thanksgiving holiday.


Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/mplfinance/_version.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

version_info = (0, 12, 8, 'beta', 1)
version_info = (0, 12, 8, 'beta', 2)

_specifier_ = {'alpha': 'a','beta': 'b','candidate': 'rc','final': ''}

__version__ = '%s.%s.%s%s'%(version_info[0], version_info[1], version_info[2],
'' if version_info[3]=='final' else _specifier_[version_info[3]]+str(version_info[4]))
'' if version_info[3]=='final' else _specifier_[version_info[3]]+str(version_info[4]))