Holding both the Invesco QQQ Trust (QQQ) and the Technology Select Sector SPDR Fund (XLK) often feels like diversification, but it might just be double-counting the same bets. A new tutorial published on October 21, 2026, by Daniel Oliveira on DEV.to demonstrates how to leverage AI agents and the Equibles MCP server to rigorously measure this overlap. By pulling data directly from SEC Form N-PORT filings, the method reveals that while these funds track different indices, their portfolios are far more intertwined than casual investors realize.

The Setup: Connecting the MCP Server

The tutorial walks through connecting the Equibles server to various AI clients, including Claude, ChatGPT, and Claude Code. For Claude Code users, the command is claude mcp add --transport http equibles https://mcp.equibles.com/mcp. The free plan supports 100 requests per day, which is sufficient for a deep dive into portfolio composition. Once connected, the agent is instructed to list every holding of both funds, not just the top ten, ensuring that tail-end holdings are not ignored in the analysis.

Data Integrity: Matching Beyond Tickers

A critical step in the process involves matching holdings by company name rather than just ticker symbols. The source notes that XLK’s filing contains five holdings with placeholder CUSIPs of 000000000 and no ticker, including Seagate and NXP. QQQ lists Alphabet’s second share class and Electronic Arts by CUSIP. By matching on company names and reviewing unmatched rows, the agent identified 36 companies held by both funds, preventing false negatives that a naive ticker-based search would produce.

The Results: 57.99% Overlap by Weight

The analysis yields stark numbers: the overlap, calculated as the sum of the smaller weight for each common holding, is 57.99%. More tellingly, 86.33% of XLK’s total weight sits in stocks that QQQ also owns, whereas only 58.21% of QQQ’s weight is in stocks XLK holds. This asymmetry highlights that XLK is essentially a subset of QQQ’s broader Nasdaq-100 universe, with QQQ holding significant positions in companies like Amazon, Tesla, and Meta that XLK excludes because they are not pure technology sector plays in the S&P 500 classification.

Key Takeaways

  • QQQ holds 105 stocks with $490.1B in net assets, while XLK holds 79 stocks with $123.9B in net assets.
  • XLK is significantly more concentrated, with its top 10 holdings comprising 64.45% of the fund, compared to QQQ’s 45.00%.
  • Despite the high overlap, the funds performed differently in 2026, with XLK up 29.27% YTD versus QQQ’s 17.22%, driven by the 42% of QQQ outside XLK’s scope.

The Bottom Line

This workflow proves that AI agents with direct database access can cut through financial marketing noise to reveal hard truths about portfolio construction. If you are holding both QQQ and XLK, you are likely paying two expense ratios for a portfolio that is nearly 58% identical.