Security data in google sheets

I’m currently doing some data analysis and am trying to pull back sector classifications for stocks.

So far I have managed to use Fidelity for US stocks using importxml in google sheets, but does anyone know a good resource for European stocks?

Similarly any other data you scrape - what sources do you use?

Thanks.

There’s quite a lot you can do with the Google Finance syntax:

Yes it doesn’t quite have all what I need though.

image

I tend to scrape stuff from HL, FT or the AIC. The following should bring in the sector for a given stock, just change the URI to the relevant company’s page.

=IMPORTXML("https://www.hl.co.uk/shares/shares-search-results/h/hsbc-holdings-plc-ordinary-usd0.50/company-information", "/html/body/main/div/div/div[1]/div[2]/div/div[5]/div[2]/div[1]/div/dl/dd[5]")

Or using the LSE website:

=IMPORTXML("https://www.londonstockexchange.com/stock/HSBA/hsbc-holdings-plc/our-story", "/html/body/app-root/app-handshake/div/app-page-content/app-tab-nav/app-company-contact-and-classification/section/div/div[2]/div[3]/div[2]")

Yahoo finance is the go-to when looking at free API. But will require downloading via macro/AppScript if you need it fully automated through the spreadsheet.

I do have code for that if you need.

@Zergui @Scrooge_McCodf

Yes I think that may be the way to go, I have ISINs and tickets so can hopefully make a simple exportXML to pull the data. All the data has to be openly available, there just doesn’t seem to be a free open golden source for all.

Have you tried Microsoft Excel?

@vvsvin What more can I get in excel than google sheets(I have a MacBook and sheets > Numbers).

I think he is referring to Stocks with Excel 365.
But that’s an overpriced subscription for personal use, and if I recall correctly, Stocks only covers US prices (might be wrong here)

1 Like

Personally Refinitiv Eikon but I have found inconsistencies in it :man_shrugging:
Also gives me that ancient traders workstation feel haha

If you’re looking for something free Yahoo Finance also has the industry classification for EU equities to some extend