Obtain how each ETF or fund is allocated across countries, as decimals. 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.

ETF Country Weightings in Python

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_etf_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.get_etf_country_weightings().head()

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

The function accepts the following parameters:

  • overwrite (bool): Defines whether to overwrite the existing data.
Share