Companies inside a portfolio
get_etf_portfolio_lookthroughUse this when the user gives a portfolio of US ETFs and asks which companies they own, how much of one company they hold, or how concentrated it is. Returns the companies underneath, each with its percent of what is looked through, its value when amounts are given and the ETFs it comes through, plus the count of holdings, by ticker, and the top 10 weight; for one company, raise top until it shows, up to 200. It measures diversification by single companies, not by how ETFs move together. Without amounts, every ETF counts equally. Uncovered tickers (US stocks among them), bond, commodity, multi-asset, sponsor-file and prospectus-only ETFs, and ETFs read from SEC filings that are leveraged, inverse, under half in stock or half in swaps and futures are named and left out of the percentages and the value. Amounts are not stored. Not for duplicate ETFs (get_etf_overlap_matrix) or risk (get_etf_portfolio_risk).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | How many companies to return, largest first, from 1 to 200; 25 when left out. | |
| currency | No | The currency of the amounts, for example USD or EUR. Echoed back with the values; nothing is converted. Left out, the amounts still weigh the ETFs and the currency reads unstated. | |
| positions | Yes | The ETFs of the portfolio, 1 to 60, for example [{"ticker": "VOO", "amount": 40000}, {"ticker": "QQQ", "amount": 25000}] with "currency": "USD" beside it. Give an amount for every position or for none; with none, every ETF counts equally. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| funds | No | ||
| priced | No | ||
| source | No | ||
| covered | No | ||
| skipped | No | ||
| computed | No | ||
| currency | No | ||
| companies | No | Largest first; value in the amounts' currency. | |
| not_covered | No | ||
| prices_as_of | No | ||
| holdings_as_of | No | ||
| holdings_source | No | ||
| portfolio_value | No | ||
| top_10_weight_pct | No | ||
| distinct_companies | No | ||
| looked_through_pct | No | ||
| not_looked_through | No |