Fix/287 yfinance delisted renamed - #293
Conversation
6532c21 to
eb42a7c
Compare
eb42a7c to
03b7947
Compare
|
@oskariluoma please close the issue from the commit message: #287. Please add the above info to the commit message body as well: #293 (comment) please change the commit message to start with `fix: update delisted and renamed yfinance tickers" |
| ticker = yf.Ticker(ticker_symbol) | ||
| company_name = ticker.info["longName"] | ||
| info = ticker.info | ||
| company_name = info.get("longName") or info.get("shortName") |
There was a problem hiding this comment.
This is a bit of a change (positive one most likely), but I am trying to work out the implications. So we used to treat a no-longName stock as delisted/renamed and was flagged for triage in fetch(). Now, if we have a shortName (with no history) for a question already in the bank, then neither of the if branches in fetch() trigger so the question remains stale? I guess a quick check on whether that's possible now, or in the future, would be helpful. Does that make sense?
|
1 comment above, otherwise LGTM (love the comments/explanations in the PR so I dont have to rediscover those myself). |
IPG was delisted 2025-11-28 when the Omnicom acquisition closed: https://www.omc.com/newsroom/omnicom-completes-acquisition-of-interpublic-forming-the-worlds-leading-marketing-and-sales-company-built-for-intelligent-growth-in-the-next-era/ ; https://stockanalysis.com/stocks/ipg/
HOLX was delisted 2026-04-07, taken private by Blackstone and TPG: https://www.hologic.com/about/press-release/blackstone-and-tpg-complete-acquisition-hologic ; https://stockanalysis.com/stocks/holx/
CTRA was delisted 2026-05-07, merged into Devon Energy: https://investors.devonenergy.com/investors/press-releases/press-release-details/2026/Devon-Energy-and-Coterra-Energy-Complete-Merger/ ; https://stockanalysis.com/stocks/ctra/
SATS was renamed to ECHO on 2026-06-24, still trading on Nasdaq: https://www.lightreading.com/satellite/echostar-to-change-stock-ticker-to-echo-
MTCH is neither delisted nor renamed, still trading on Nasdaq: https://stockanalysis.com/stocks/mtch/ It only dropped out of the S&P 500 in the March 2026 rebalance, and the fetch failure had a different cause. For some reason Yahoo did not return "longName" value for MTCH which caused a delisting. Added a fall back to shortName to restore the normal fetch.
Nullification dates are last trading day + 1, so 2025-11-27 for IPG, 2026-04-07 for HOLX and 2026-05-07 for CTRA. Verified those against the last real price change in each resolution file.
Also added a test to see if the MTCH handling worked, let me know if you think this isn't needed.
Closes #287