Open aironsholt opened 4 years ago
Use 5205-KL instead of 5205.KL
tried "Use 5205-KL instead of 5205.KL", still doesnt work.
found another sample ticker (1163.KL), its PE RATIO (TTM) is available, but it refuse to show its value. return error "ValueError: No tables found"
either way, appreciate it if anyone have other way to extract not-well-known stock ticker PE Ratio using yfinance (usually Msia stocks)
Thanks!
Use 5205.kl
NONE-CAPITAL letters
https://finance.yahoo.com/quote/5205.kl/
Verified using my open source stock scanner & screener: https://github.com/asafravid/sss
@asafravid i tried to write script as simple as :
import yfinance as yf
symbol = yf.Ticker("5205.kl").info
and error message still same. below is the complete error message :
Traceback (most recent call last):
File "test.py", line 3, in <module>
symbol = yf.Ticker("5205.kl").info
File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/yfinance/ticker.py", line 138, in info
return self.get_info()
File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/yfinance/base.py", line 423, in get_info
self._get_fundamentals(proxy)
File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/yfinance/base.py", line 288, in _get_fundamentals
holders = _pd.read_html(url+'\holders')
File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/pandas/io/html.py", line 1100, in read_html
displayed_only=displayed_only,
File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/pandas/io/html.py", line 915, in _parse
raise retained
File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/pandas/io/html.py", line 895, in _parse
tables = p.parse_tables()
File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/pandas/io/html.py", line 213, in parse_tables
tables = self._parse_tables(self._build_doc(), self.match, self.attrs)
File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/pandas/io/html.py", line 545, in _parse_tables
raise ValueError("No tables found")
ValueError: No tables found
Note : i did implement this solution and their #191 thread already, still doesnt work :(
Try it using my screener Works for me However note that in yahoo finance there is no data for this company so yfinance won’t have the data either You just have the graph Rest is ‘N/A’
בתאריך יום ו׳, 5 במרץ 2021 ב-6:39 מאת Dwi Hadyan notifications@github.com:
@asafravid https://github.com/asafravid i tried to write script as simple as :
import yfinance as yf symbol = yf.Ticker("5205.kl").info
and error message still same. below is the complete error message : Traceback (most recent call last): File "test.py", line 3, in
symbol = yf.Ticker("5205.kl").info File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/yfinance/ticker.py", line 138, in info return self.get_info() File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/yfinance/base.py", line 423, in get_info self._get_fundamentals(proxy) File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/yfinance/base.py", line 288, in _get_fundamentals holders = _pd.read_html(url+'\holders') File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/pandas/io/html.py", line 1100, in read_html displayed_only=displayed_only, File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/pandas/io/html.py", line 915, in _parse raise retained File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/pandas/io/html.py", line 895, in _parse tables = p.parse_tables() File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/pandas/io/html.py", line 213, in parse_tables tables = self._parse_tables(self._build_doc(), self.match, self.attrs) File "/Users/dwihadyan/opt/anaconda3/envs/statarb/lib/python3.6/site-packages/pandas/io/html.py", line 545, in _parse_tables raise ValueError("No tables found") ValueError: No tables found Note : i did implement this https://github.com/ranaroussi/yfinance/issues/214 solution and their
191 https://github.com/ranaroussi/yfinance/issues/191 thread already,
still doesnt work :(
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pydata/pandas-datareader/issues/810#issuecomment-791148123, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK7ZJS6YZXPCOCRUD347CVTTCBOB5ANCNFSM4O62EQPA .
-- Asaf - אסף
Tested October 16 2021: Code:
import yfinance as yf
symbol = yf.Ticker("5205.kl").info
print(symbol)
Response:
{'exchange': 'KLS', 'shortName': 'SENDAI', 'exchangeTimezoneName': 'Asia/Kuala_Lumpur', 'exchangeTimezoneShortName': 'MYT', 'isEsgPopulated': False, 'gmtOffSetMilliseconds': '28800000', 'quoteType': 'EQUITY', 'symbol': '5205.KL', 'market': 'my_market', 'previousClose': 0.215, 'regularMarketOpen': 0.215, 'twoHundredDayAverage': 0.23708333, 'trailingAnnualDividendYield': None, 'payoutRatio': None, 'volume24Hr': None, 'regularMarketDayHigh': 0.215, 'navPrice': None, 'averageDailyVolume10Day': 232662, 'totalAssets': None, 'regularMarketPreviousClose': 0.215, 'fiftyDayAverage': 0.21652777, 'trailingAnnualDividendRate': None, 'open': 0.215, 'toCurrency': None, 'averageVolume10days': 232662, 'expireDate': None, 'yield': None, 'algorithm': None, 'dividendRate': None, 'exDividendDate': None, 'beta': None, 'circulatingSupply': None, 'startDate': None, 'regularMarketDayLow': 0.215, 'priceHint': 4, 'currency': 'MYR', 'regularMarketVolume': 80000, 'lastMarket': None, 'maxSupply': None, 'openInterest': None, 'marketCap': None, 'volumeAllCurrencies': None, 'strikePrice': None, 'averageVolume': 171975, 'priceToSalesTrailing12Months': None, 'dayLow': 0.215, 'ask': 0.22, 'ytdReturn': None, 'askSize': None, 'volume': 80000, 'fiftyTwoWeekHigh': 0.355, 'forwardPE': None, 'maxAge': 1, 'fromCurrency': None, 'fiveYearAvgDividendYield': None, 'fiftyTwoWeekLow': 0.19, 'bid': 0.21, 'tradeable': False, 'dividendYield': None, 'bidSize': None, 'dayHigh': 0.215, 'regularMarketPrice': 0.215, 'logo_url': ''}
[Finished in 5.8s]
thanks for a great module! My issue may be ‘hidden’ under another ticker or not an issue at all. If so, please let me know.
I found a ticker which exists on the YF (https://finance.yahoo.com/quote/5205.KL?p=5205.KL) but returns a "ValueError: No tables found" in Python when requesting info:
Thanks ad advance