Return Excluding Holdings
Calculate the return a fund would have had without some of its holdings or sectors: the contribution of the other holdings over their weight, Σ contribution / Σ start weight over the holdings that remain, so the rest of the fund reweighted to a whole. It answers “what did the S&P 500 do without technology?” or “without Nvidia?”, showing how much of an index move comes from a few stocks.
The contributions come from get_contribution: weights rolled back from the fund’s current holdings to the start of the period, price returns from the close before the start date to the close on the end date. The same caveats apply: the longer the period, the more the rolled back weights drift from the fund’s actual weights. Only the priced holdings count: what get_contribution puts in the Remainder (cash, holdings without a price and that drift) would otherwise all fall on the holdings that remain and, once most of the fund is excluded, dominate their return. The Priced Holdings Return, the same calculation without excluding anything, is therefore the like-for-like comparison; for a stock index fund it is close to the fund’s own Return.
Also known as: index ex technology, equal footing return, return without the largest holdings, ex-sector return.
Return Excluding Holdings in Python or via the MCP
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_return_excluding as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(
["SPY", "QQQ"],
api_key="FINANCIAL_MODELING_PREP_KEY",
start_date="2026-10-01",
end_date="2026-10-31",
benchmark_ticker=None,
)
toolkit.etf.get_return_excluding(["NVDA", "MSFT"])
Or, after setting up the Finance Toolkit MCP, ask:
What would SPY and QQQ have returned in October 2026 without Nvidia and Microsoft?
Which returns:
| SPY | QQQ | |
|---|---|---|
| Return | -0.0091 | -0.0666 |
| Priced Holdings Return | -0.0094 | -0.0665 |
| Excluded Weight | 0.1415 | 0.141 |
| Excluded Contribution | -0.0077 | -0.0077 |
| Return Excluding | -0.002 | -0.0685 |
Parameters
get_return_excluding accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
exclude | str | list[str] | The holdings (tickers, e.g. “NVDA”) and sectors (e.g. “Technology”, as the companies’ profiles name them) to leave out. | |
holdings | int | None | The number of largest holdings (by weight) to price, one request each; the rest counts towards the rest of the fund. Defaults to None, which prices every holding with a symbol. | None, which prices every holding with a symbol |
rounding | int | None | The number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit. | 2 |