You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
on 08th April 2024 it had a corporate action of stock dividends/cash bonus etc. as the case may be.
In the Boursa Kuwait stock market the price of the stock is reflected in fils (cents equivalent in US).
once the corporate action takes effect yfinance tries to do a historic price readjustment but ignores that the values are in fils, resulting in incorrect prices for day before the corporate action.
You will have the same problem for all stocks in GCC markets that are reflected in fils or cents equivalent.
Describe bug
Hello,
I am looking at the stock NBK.KW
on 08th April 2024 it had a corporate action of stock dividends/cash bonus etc. as the case may be.
In the Boursa Kuwait stock market the price of the stock is reflected in fils (cents equivalent in US).
once the corporate action takes effect yfinance tries to do a historic price readjustment but ignores that the values are in fils, resulting in incorrect prices for day before the corporate action.
You will have the same problem for all stocks in GCC markets that are reflected in fils or cents equivalent.
Simple code that reproduces your problem
yfinance.download("NBK.KW")
Debug log
DEBUG Entering download()
DEBUG Disabling multithreading because DEBUG logging enabled
DEBUG Entering history()
DEBUG Entering history()
DEBUG NBK.KW: Yahoo GET parameters: {'period1': '1925-06-10 03:07:00+03:07', 'period2': '2024-05-16 03:36:03+03:00', 'interval': '1d', 'includePrePost': False, 'events': 'div,splits,capitalGains'}
DEBUG Entering get()
DEBUG url=https://query2.finance.yahoo.com/v8/finance/chart/NBK.KW
DEBUG params={'period1': -1406246400, 'period2': 1715819763, 'interval': '1d', 'includePrePost': False, 'events': 'div,splits,capitalGains'}
DEBUG Entering _get_cookie_and_crumb()
DEBUG cookie_mode = 'basic'
DEBUG Entering _get_cookie_and_crumb_basic()
DEBUG loaded persistent cookie
DEBUG reusing cookie
DEBUG crumb = 'iI3kLNAmXIK'
DEBUG Exiting _get_cookie_and_crumb_basic()
DEBUG Exiting _get_cookie_and_crumb()
DEBUG response code=200
DEBUG Exiting get()
DEBUG NBK.KW: yfinance received OHLC data: 2000-01-03 06:00:00 -> 2024-05-15 06:00:00
DEBUG NBK.KW: OHLC after cleaning: 2000-01-03 09:00:00+03:00 -> 2024-05-15 09:00:00+03:00
DEBUG NBK.KW: OHLC after combining events: 2000-01-03 00:00:00+03:00 -> 2024-05-15 00:00:00+03:00
DEBUG NBK.KW: yfinance returning OHLC: 2000-01-03 00:00:00+03:00 -> 2024-05-15 00:00:00+03:00
DEBUG Exiting history()
DEBUG Exiting history()
DEBUG Exiting download()
DEBUG get_raw_json(): https://query2.finance.yahoo.com/v10/finance/quoteSummary/NBK.KW
DEBUG Entering get()
DEBUG url=https://query2.finance.yahoo.com/v10/finance/quoteSummary/NBK.KW
DEBUG params={'modules': 'financialData,quoteType,defaultKeyStatistics,assetProfile,summaryDetail', 'corsDomain': 'finance.yahoo.com', 'formatted': 'false', 'symbol': 'NBK.KW'}
DEBUG Entering _get_cookie_and_crumb()
DEBUG cookie_mode = 'basic'
DEBUG Entering _get_cookie_and_crumb_basic()
DEBUG reusing cookie
DEBUG reusing crumb
DEBUG Exiting _get_cookie_and_crumb_basic()
DEBUG Exiting _get_cookie_and_crumb()
DEBUG response code=200
DEBUG Exiting get()
DEBUG Entering get()
DEBUG url=https://query1.finance.yahoo.com/ws/fundamentals-timeseries/v1/finance/timeseries/NBK.KW?symbol=NBK.KW&type=trailingPegRatio&period1=1700092800&period2=1715904000
DEBUG params=None
DEBUG Entering _get_cookie_and_crumb()
DEBUG cookie_mode = 'basic'
DEBUG Entering _get_cookie_and_crumb_basic()
DEBUG reusing cookie
DEBUG reusing crumb
DEBUG Exiting _get_cookie_and_crumb_basic()
DEBUG Exiting _get_cookie_and_crumb()
DEBUG response code=200
DEBUG Exiting get()
Bad data proof
yfinance
version0.2.38
Python version
3.12
Operating system
Windows 10 Home
The text was updated successfully, but these errors were encountered: