[BUG] Mouse-hover date is 1 day off (into the past)
See original GitHub issueRequirements (place an x
in each of the [ ]
)**
- I realize finplot is not a web lib. (Hint: it’s native!)
- I’ve read the snippets and not found what I’m looking for.
- I’ve searched for any related issues and avoided creating a duplicate issue.
- I’ve updated finplot (
pip install -U finplot
). - I’ve supplied the required data to run my code below.
Code to reproduce (from the repo. ReadMe front-page tutorial, but running with ‘SPY’)
import finplot as fplt
import yfinance
df = yfinance.download('SPY')
fplt.candlestick_ochl(df[['Open', 'Close', 'High', 'Low']])
fplt.show()
Describe the bug
When I run the snp500.py example (in finplot/examples), it shows the all-time-high candle date (when you mouse-hover over it) as 2022-1-3. That is 1 day off. It should read “2022-1-4”.
OS: Windows 11 finplot version: 1.8.1
p.s.
Thank you SO MUCH for creating Finplot!! It’s awesome and I love it!! 😃
Issue Analytics
- State:
- Created a year ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Mouse Pup Appearance by Age
Mouse Pup Appearance by Age ; Day 3. Ear flap starting to come away from head (one or both) ; Day 4. Ears...
Read more >Option to display absolute dates and times instead of relative ...
All dates in the web interface are displayed relative to today. ... of EACH 6 out of any 7 consecutive DAYS ARE off...
Read more >Change how dates, times, and more display on Mac
On your Mac, choose Apple menu > System Settings, click General in the sidebar, ... Date format: Choose the date format, such as...
Read more >Calendar 2022 - Time and Date
1 : N 9: 1Q 16: F 23: 3Q 30: N ... Some holidays and dates are color-coded: ... The year 2022 is...
Read more >AHPS Precipitation Analysis - National Weather Service
Displaying Current 1-Day Observed Precipitation Valid on: December 22, 2022 12:00 UTC What is UTC time? Map Help. Print this map Permalink Bookmark...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for the praise, means a lot for a maintainer who gets a lot of flak for developing stuff. The tip of the iceberg is stuff I needed myself, the remaining stuff is for the community. Glad you like it! 😃
Thanks for your thoughts on this. Yeah I think we have this sorted now, so I’ll close it. I should have looked more closely at how yfinance handles (or doesn’t handle time zones). yfinance states: “Note: yahoo finance datetimes are received as UTC.”
Here’s what worked for me to get Eastern time – for daily bars (for SPY), not for intraday, this works:
Only after making that call, then the ATH for SPY is correctly shown on the FinCrossHair as 3/4. Well, that or (effectively) changing the Finplot time setting to UTC with:
For intraday (only tested 1 hour bars), no adjustment at all is needed – dates and times appear to be correct automagically for intraday… 😃