go-quote
go-quote copied to clipboard
google and tse
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
Unfortunately it looks as if historical TSE data is not supported by google.
See: https://github.com/pydata/pandas-datareader/issues/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.
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
?
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.