-
Notifications
You must be signed in to change notification settings - Fork 87
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
Incomplete list of tickers for stocks #4
Comments
I have confirmed this issue. I am looking into it. |
The problem has been discovered. Yahoo sometimes returns zero results. You can reproduce this in your browser: Go to a random yahoo finance page like http://finance.yahoo.com/lookup/?s=m&r=&m=ALL&t=S&b=20 and refresh it several times. Occasionally it will show zero results. This causes inconsistent results when running the script multiple times. It assumes yahoo has nothing more to show. |
Hello Benny Thank you for investigating Can this issue be resolved? Or does it mean that Python script cannot be rescued and will not return all stock tickers? Sorry if it appears that I am hassling you. Tyre |
The script never returned all ticker symbols from yahoo finance and never has. This is unrelated to this issue. Yahoo has always limited the number of results it will show. I seem to have neglected to mention this in the readme. I will mention this in the readme in next release. Now about this issue, there is a crude fix now in the repo. It will simply try to download a page 20 times if yahoo returns no symbols. If all twenty download attempts still result in nothing, the script will assume yahoo will never give a result for that page and will continue. Now there is a slight chance yahoo happen to give you a bad page for all 20 attempts. This can happen and you will be missing data. Only Yahoo can solve this issue the correct way. You will have to do a checkout from master to use the crude fix. It will take another day or so to test it before I upload it to the python packaging index. I will keep this issue open until yahoo fixes the website. |
Benny I'm currently putting the updated script through its paces. Thank you for the updated - I appreciate it Tyre |
I was handling another problem related to utf-8 csv output. This might screw up your .csv output file in python3. Python2 is likely not affected. If this is the case, please hold on to your I'm sorry for the inconvenience. |
The current checkout (24d0511) should work perfectly. It should output around 25495 ticker symbols for stock. And it produces the output in several formats (json, yaml, csv, xls) for convenience. Report if you have any additional issues. Here is the output of the script (only for stock at the moment) so you don't have to re-run the script: |
Benny - thanks. I'm now testing the new script, but first impressions are that it's all good. |
I was surprised not to find Solvay (SOLB.BR) in the results.
So, the Yahoo interface is not consistent, which is not a real surprise. Added on June 6th: the test has run fine (but took very long: several weeks!) I got 700,000+ symbols (including SOLB.BR). |
Hello Tyre. I'm trying to get in touch with you. Could you email me at [email protected] ? Sorry for the noise on this unrelated issue! |
Hello
I have Python 3.3 (on Windows 7). Several months ago I ran this python script, and I got 14935 stock tickers by running "YahooTickerDownloader.py stocks"
I ran this same script again, but now I only get around 2700 tickers. I reran the script several times, but the number of tickers is always around this number.
Do you know what the problem is? I'd like to get an updated list of tickers for stocks, but I believe there are more than 2700.
Thank you
Tyre
The text was updated successfully, but these errors were encountered: