Is there a easy way to automatically (ie. through an API or something, not through just reading a prospectus) get information about an ETF's underlying securities? I'd like to write an application that aggregates some ETF's based on what securities I'd like but I don't know how to find what stocks and other things are in these funds.
ETFs are legally required to publicly disclose their positions at every point in time. The reason for this is that for an ETF to issue shares of ETF they do NOT take cash in exchange but underlying securities - this is called a creation unit. So people need to know which shares to deliver to the fund to get a share of ETF in exchange. This is never done by retail clients, however, but by nominated market makers. Retail persons will normally trade shares only in the secondary market (ie. on a stock exchange), which does not require new shares of the ETF to be issued.
However, they do not normally make it easy to find this information in a digestible way, and each ETF does it their own way. So typically services that offer this information are payable (as somebody has to scrape the information from a variety of sources or incentivise ETF providers to send it to them). If you have access to a Bloomberg terminal, this information is available from there. Otherwise there are paid for services that offer it. Searching on Google for ETF constituent data, I found two companies that offer it:
See if you can find what you need there. Good luck. (etfdb even has a stock exposure tool freely available that allows you to see which ETFs have large exposure to a stock of your choosing, see here: http://etfdb.com/tool/etf-stock-exposure-tool/). Since this data is in a table format you could easily download it automatically using table parsing tools for your chosen programming language.
PS: Don't bother with underlying index constituents, they are NOT required to be made public and index providers will normally charge handsomely for this so normally only institutional investors will have this information.
Save the effort.
For personal finance purpose, just use the simple tools.
For example, if you like P&G very much but you want to diversify with ETF, use:
Pick a ETF with highest weighting. Replace "PG" in the link with other tickers.
Assuming that the ETF is tracking an index, is there a reason for not looking at using details on the index?
Typically the exact constituents of an index are proprietary, and companies will not publish them publicly without a license. S&P is the heavyweight in this area, and the exact details of the constituents at any one time are not listed anywhere. They do list the methodology, and announcements as to index changes, but not a full list of actual underlying constituents.
Is there a easy way to automatically (ie. through an API or something, not through just reading a prospectus) get information about an ETF's underlying securities?
I have looked for this information before, and based on my own searches, in a word: no. Index providers, and providers of APIs which provide index information, make money off of such services. The easiest way may be to navigate to each provider and download the CSV with the full list of holdings, if one exists. You can then drop this into your pipeline and write a program to pull the data from the CSV file. You could drop the entire CSV into Excel and use VBA to automagically pull the data into a usable format.
For example, on the page for XIU.TO on the Blackrock site, after clicking the "All Holdings" tab there is a link to "Download holdings", which will provide you with a CSV. I am not sure if all providers look at this.
Alternatively, you could write the ETF company themselves.
Source: https://etfdailynews.com/tools/what-is-in-your-etf/ What's In My ETF? Are you wondering what your ETF has for holdings? Enter your ETF's symbol in the box to see what your fund holds.
ETF Ticker Symbol enter records per page select 10,50,100 may need two pages
output looks like this Symbol Holding Name % of Total LVNTA Liberty Ventures 0.06%