{"slug": "the-market-isn-t-one-thing-watching-sectors-take-turns", "title": "“The Market” Isn't One Thing: Watching Sectors Take Turns", "summary": "A developer used the EODHD MCP server connected to Claude to pull yearly returns for the eleven SPDR sector ETFs from 2021 through part of 2026, showing that the best and worst sectors diverged by more than 100 percentage points in a single year (Energy +64.3% versus Communication −37.6% in 2022). Across five year-to-year handoffs, last year's winning sector averaged roughly fourth place the next year and last year's loser about sixth, close to a random draw, so the author cautions that five handoffs are far too few to establish a rotation pattern.", "body_md": "*Python for programmers, prompts for data analysts.*\n\n\"The market was up 20% this year\" is one of the most compressed sentences in finance. It blends technology companies, oil producers, \n\nbanks, utilities, and drugmakers into a single number — as if they all moved together.\n\nThey don't. Some years one corner of the market carries everything; other years that same corner drags. Traders call the pattern \"sector \n\nrotation.\" Let's pull the eleven sectors apart and watch who led, who lagged, and whether last year's winner tells you anything about \n\nnext year's.\n\n*Want to try this yourself? The [EODHD MCP Server](<https://eodhd.com/financial-apis/mcp-server-for-financial-data-by-eodhd?via=jsmrd&\\<br\\>%0Autm_source=medium&utm_medium=post&utm_campaign=the-market-isnt-one-thing-watching-sectors-take-turns&utm_content=Jaroslav>) is what \npulled the data above — connect it to Claude and ask your own questions (affiliate link).*\n\n*New here? [The Setup](https://medium.com/codetodeploy/the-setup-everything-you-need-before-your-first-prompt-1faeeff94263) covers \neverything you need before your first prompt.*\n\n🟧 **PROMPT**\n\n```\nUse the eodhd MCP to get yearly returns for the\neleven SPDR sector ETFs from 2021 to today, and\nshow the best and worst sector each year.\n```\n\n*Best and worst sector, year by year:*\n\n*2021 — Energy (XLE) +53.3% · Communication (XLC) +16.0%*\n\n*2022 — Energy (XLE) +64.3% · Communication (XLC) −37.6%*\n\n*2023 — Technology (XLK) +56.0% · Utilities (XLU) −7.2%*\n\n*2024 — Communication (XLC) +34.7% · Materials (XLB) +0.2%*\n\n*2025 — Technology (XLK) +24.6% · Consumer Staples (XLP) +1.5%*\n\n*2026 so far — Energy (XLE) +42.8% · Consumer Discretionary (XLY) −7.0%*\n\nLook at 2022 alone: the best sector gained 64%, the worst lost 38%. That's a gap of more than 100 percentage points, within the same \n\n\"market\" and the same twelve months. Any single number describing \"how the market did\" that year was an average of two completely \n\ndifferent experiences.\n\n```\nFor each year, where did the previous year's best\nand worst sector finish the following year?\n```\n\n*Last year's best sector, ranked the next year (out of 11):*\n\n*Energy, best in 2021 → #1 in 2022*\n\n*Energy, best in 2022 → #9 in 2023*\n\n*Technology, best in 2023 → #5 in 2024*\n\n*Communication, best in 2024 → #2 in 2025*\n\n*Technology, best in 2025 → #2 in 2026 so far*\n\n*Last year's worst sector, ranked the next year:*\n\n*Communication, worst in 2021 → #11 in 2022 (worst again)*\n\n*Communication, worst in 2022 → #2 in 2023, up 52.8%*\n\n*Utilities, worst in 2023 → #4 in 2024*\n\n*Materials, worst in 2024 → #7 in 2025*\n\n*Consumer Staples, worst in 2025 → #6 in 2026 so far*\n\nThere's no clean rule here. Energy won two years running, then fell to ninth. Communication finished last two years in a row, then \n\njumped to second with a 53% gain. Across these five handoffs, last year's winners averaged roughly fourth place the following year, and \n\nlast year's losers averaged sixth, which is about where a random draw would put them.\n\nFive handoffs is far too few to call that a pattern. What the table shows clearly is how fast the order reshuffles, and how badly \"buy \n\nwhatever led last year\" or \"avoid whatever lagged\" could have gone in the wrong year. Chasing 2022's winner meant riding Energy into a \n\nflat 2023. Abandoning 2022's loser meant missing Communication's rebound.\n\nA few things about this comparison deserve naming.\n\nCalendar years are an arbitrary way to slice the data. Measure the same eleven sectors from July to July, or quarter by quarter, and the \n\nwinners and losers would shuffle differently — some of 2022's 100-point gap between Energy and Communication came from where January 1st \n\nhappened to fall. The pattern of sectors taking turns holds up; the exact rankings depend on where you draw the lines.\n\nThe window is also short: under six years, five year-to-year handoffs. That's enough to show how much the order moves, and nowhere near \n\nenough to prove whether it moves randomly or follows a cycle. People who study sector rotation seriously look at decades of data, \n\nalongside interest rates and the business cycle, and still argue about how predictable it is.\n\nAnd a sector ETF is less diversified than its name suggests. XLK, XLC, and XLY are each dominated by a handful of giant companies, so \n\n\"Technology had a great year\" can mostly mean \"two or three stocks had a great year.\" Treat each line in the table as the story of a few \n\nheavyweights, not of an entire industry. Not investment advice.\n\nThis is the thirty-second article in the series *[Unlock Real-Time Market Intelligence with EODHD and Claude](<https://medium.com/\\<br\\>%0Acodetodeploy/unlock-real-time-market-intelligence-with-eodhd-and-claude-6f431c82c525>)*, and it takes apart a number every other article \n\nhas quietly leaned on: \"the market.\"\n\nTwo prompts split one index into eleven sectors, then checked whether the leaders stayed in front.\n\nSo here's what they found: **in 2022, the best sector gained 64% and the worst lost 38% — a gap of more than 100 percentage points  inside the same market, in the same year. And the sector that finished last that year finished second the next.** \"The market\" is an \n\n*If this made you curious, the [MCP Server](<https://eodhd.com/financial-apis/mcp-server-for-financial-data-by-eodhd?via=jsmrd&\\<br\\>%0Autm_source=medium&utm_medium=post&utm_campaign=the-market-isnt-one-thing-watching-sectors-take-turns&utm_content=Jaroslav>) is free to \ntry — [The Setup](https://medium.com/codetodeploy/the-setup-everything-you-need-before-your-first-prompt-1faeeff94263) walks you through \nit.*\n\n*← Part 31: [Before You Panic About Insider Selling, Check the Code](<https://jaroslav-smarda.medium.com/\\<br\\>%0Abefore-you-panic-about-insider-selling-check-the-code-2524e2e7d45b>)*", "url": "https://wpnews.pro/news/the-market-isn-t-one-thing-watching-sectors-take-turns", "canonical_source": "https://dev.to/jaroslav_marda_9f25d4d9c/the-market-isnt-one-thing-watching-sectors-take-turns-2293", "published_at": "2026-09-29 11:03:51+00:00", "updated_at": "2026-09-29 11:16:51.118758+00:00", "lang": "en", "topics": ["ai-tools", "agent-protocols"], "entities": ["EODHD", "Claude", "SPDR", "Energy Select Sector SPDR Fund", "Technology Select Sector SPDR Fund", "Communication Services Select Sector SPDR Fund"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/the-market-isn-t-one-thing-watching-sectors-take-turns", "markdown": "https://wpnews.pro/news/the-market-isn-t-one-thing-watching-sectors-take-turns.md", "text": "https://wpnews.pro/news/the-market-isn-t-one-thing-watching-sectors-take-turns.txt", "jsonld": "https://wpnews.pro/news/the-market-isn-t-one-thing-watching-sectors-take-turns.jsonld"}}