Country Weightings
Get how every fund is allocated across countries, as decimals, the largest weights of the first fund first. Two funds tracking similar markets can differ considerably here, which matters for the currency and political risk the fund carries.
Tickers that are not an ETF or fund return no data. They are not removed from the Toolkit instance.
Also known as: country allocation, geographic exposure, country exposure.
Country Weightings in Python or via the MCP
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_country_weightings as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(
["QQQ", "VTI"],
api_key="FINANCIAL_MODELING_PREP_KEY",
start_date="2021-01-01",
end_date="2025-12-31",
)
toolkit.etf.get_country_weightings().head()
Or, after setting up the Finance Toolkit MCP, ask:
Which five countries carry the most weight in the Invesco QQQ Trust and the Vanguard Total Stock Market ETF (VTI)?
Which returns:
| Country | QQQ | VTI |
|---|---|---|
| United States | 0.9445 | 0.9733 |
| United Kingdom | 0.0164 | 0.0048 |
| Netherlands | 0.0135 | 0.0003 |
| Canada | 0.0096 | 0.0007 |
| Singapore | 0.0074 | 0.0025 |
Parameters
get_country_weightings accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
overwrite | bool | Whether to retrieve the weightings again. Defaults to False. | True |