Skip to content
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

google and tse #4

Open
codingtony opened this issue Feb 11, 2018 · 3 comments
Open

google and tse #4

codingtony opened this issue Feb 11, 2018 · 3 comments

Comments

@codingtony
Copy link

Hi,

Congrats for your software, it is very easy to use!
I'm trying to get the data for a stock listed on the Toronto Stock Exchange from Google.
I tried various combination of way to enter my stock without success.
Usually It is referred with a prefix "TSE:"
When I try TSE:XSP it does not work. I tried to escape the : with \ without success.

See : https://finance.google.ca/finance?q=TSE%3AXSP&sq=TSE%3AXSP&sp=1&ei=HpmAWtibCdaKe_eLv7AI

@markcheno
Copy link
Owner

markcheno commented Feb 12, 2018

Unfortunately it looks as if historical TSE data is not supported by google.

See: pydata/pandas-datareader#239

However, it does appear to be on yahoo. The symbol is "xsp.to"

A simple "quote xsp.to" should get you some data. Hope that helps.

@codingtony
Copy link
Author

Hi Mark,

Thanks for the update.

I did the test on google finance because I did some query that were returning different data using yahoo than the yahoo history (using the web).

I run with -adjust=false
(volume and close seems good however)
e.g :

quote -start 2016-09-01 -end 2016-09-30  -adjust=false -outfile=test_xsp.to.csv xsp.to

vs

https://ca.finance.yahoo.com/quote/XSP.TO/history?period1=1472702400&period2=1475208000&interval=1d&filter=history&frequency=1d

Is it possible that somehow the -adjust=false gives weird result for the open / high / low ?
would it be possible to get the adj_close in a different column and not having to play with -adjust ?

@markcheno
Copy link
Owner

Unfortunately it seems that the Yahoo data is not longer reliable. They changed the way they were calculating prices and the open/high/low is no longer accurate.

See: http://www.amibroker.com/kb/2017/06/30/wrong-close-price-in-yahoo-data/

In addition, they have been regularly changing their api, apparently trying to prevent people from accessing it. I have stopped using Yahoo data myself and have been using tiingo.com. It is very reasonably priced.

I have not been able to find a reliable reference for calculating the Yahoo correct prices. If you know of any, please let me know and I will try to implement it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants