While it has been a strong year for the S & P 500 , some names are more to thank than others. The broad index is tracking to end 2024 higher by 23.8%. That far outpaces the average gain of 11% seen between 2014 and 2023. Some stocks ran circles around that performance, thanks to their connection to broader trends like artificial intelligence that captured investor interest this year. Here’s the top three performers in the S & P 500 year to date: Palantir Palantir is, far and away, the best-performing S & P 500 member of 2024 . Shares have skyrocketed more than 349%, putting it on track to notch its best year going back through when it went public in 2020. Palantir has caught attention for its connection to AI and software that can be utilized in wartime scenarios. Bank of America Mariana Perez Mora said the company has software that can win wars, and that the company’s utilization by governments and businesses is only in the early innings. “PLTR has demonstrated their ability to digitize enterprises and battlespaces from finances to missile production,” Mora wrote to clients in a November note. “In a world where efficiency, innovation, safety, and speed are the most valuable assets, we see Palantir as the enabler and winner in this new era.” PLTR YTD mountain Palantir, year to date The software stock was added to both the S & P 500 and concentrated Nasdaq-100 this year. It’s also gained notoriety among retail investors this year, data on net flows from this group compiled by Vanda Research shows. To be sure, Wall Street isn’t certain these gains can be held into 2025. The average analyst has a hold rating and a price target suggesting shares can drop more than 43%, per LSEG. “We are positive on the company’s position, but are wary of chasing given strong YTD performance and valuation,” said Baird analyst William Power in a note to clients earlier this month. Vistra Vistra is poised to take the runner-up spot with a surge of more than 263%. Like Palantir, 2024 is on track to be the best year on record for the stock. Vistra is one of the energy stocks that have been sought after by investors over the potential demand boom tied to AI. That’s because these traders see independent power producers’ nuclear and gas capabilities as key to technology companies looking to build out data centers for AI. VST YTD mountain Vistra, year to date Shahriar Pourreza, head of power and utilities at Guggenheim Securities, told CNBC this month that Vistra was a top pick in the space because it has both nuclear and gas offerings. “I like Vistra because I don’t have to bet whether the next deal is going to be a nuclear plant or it’s going to be a gas plant,” Pourreza said. Every analyst who rates the stock gives it a buy, according to LSEG. The typical price target suggests shares can rise more than 16%. Nvidia Nvidia , the chip stock whose position as an AI leader has dazzled traders, came in at No. 3. Shares have soared more than 177%, which would mark its fourth year of the last five where the stock’s price has at least doubled. The company gained admission last month to the highly regarded Dow Jones Industrial Average . It’s now tracking to claim the best-performer stock within the 30-stock average. NVDA YTD mountain Nvidia, year to date Nvidia has been widely regarded as a titan within the AI space, garnering additional attention from Wall Street and Main Street as the technology became more mainstream. The stock is on track to be the most-bought security on net by everyday investors this year, according to Vanda data as of mid December. While the megacap tech stock has experienced some recent choppiness, Wall Street is still optimistic. The majority of analysts maintain buy ratings, with an average price target reflecting the potential for almost 24% in further upside. One of those bullish analysts is Bank of America’s Vivek Arya, who named the stock a top pick within semiconductor names this month. He noted that it should particularly benefit from a continued focus on AI in the first half of the year. “In the first half, we expect the AI investments driven by AI training and scaling of models to continue, doubling down on the NVDA Blackwell deployment ramps driven by cloud customers,” Arya wrote to clients. — CNBC’s Spencer Kimball contributed to this report.