Last year, failing to own Apple Inc. was the most painful mistake a U.S. equity fund manager could have made. This year, that distinction goes to Amazon.com Inc.

Up 67 percent in 2015, the online retailer has contributed the most to mitigating losses in the Standard & Poor’s 500 Index this year. Amazon’s ascent has been aided not just by Apple’s misfortunes, but by its perceived haven status at a time when investors want nothing to do with emerging markets. The company, which gets 57 percent of its revenue from North America, is less exposed to global growth than its peers.

“Nervous investors are looking to shift money from Apple, and for lack of new ideas, they’re crowding into Amazon,” said Hugh Grieves, a London-based fund manager at Miton Group, who runs the firm’s U.S. Opportunities Fund. “There is also an element of fund managers with an S&P 500 benchmark feeling as though they must own these stocks or else they are at risk of chronic underperformance.”

In five of the past six years, as the S&P 500 more than doubled, Apple ranked as the No. 1 driver of the index. It has now given up most of its 2015 gains, and energy producers Exxon Mobil Corp. and Chevron Corp. have plunged, contributing 18 percent of the S&P 500’s losses. That’s made the benchmark measure one of the worst performers out of 24 developed equity markets this year.

Among funds that track their performance against the S&P 500 and manage at least $500 million in assets, those overweight Amazon -- meaning they hold more of the stock than its 1.1 percent makeup in the index -- lost an average 2.2 percent this year. That compares with a 4.5 percent decline for funds with a smaller stake, according to the latest regulatory filings compiled by Bloomberg.

Gains in the shares have made them expensive compared with its megacap Internet peers, trading at 71 times estimated earnings. Still, more than 80 percent of analysts surveyed by Bloomberg have a buy rating. After posting a surprise quarterly profit in July, Amazon surged 24 percent in that month while the S&P 500 rose 2 percent.

By contrast, Apple has tumbled amid heightened concern over iPhone demand in China, down 15 percent from a July 20 high. The company’s profit is projected to increase 42 percent this year and 7 percent in 2016. Analysts see Amazon’s earnings tripling this year. Sales in 2016 are forecast to climb 19 percent -- almost four times Apple’s pace.

E-mails and voice messages to Amazon and Apple’s press offices seeking comment were not returned.

Apple Chief Executive Officer Tim Cook will introduce new models of the iPhone Wednesday in San Francisco. Despite other products and services, the company has never been more dependent on the smartphone for revenue. People familiar with the matter say it may also introduce a bigger-screen iPad and an update to Apple TV.

“In French, we say ‘Les arbres ne montent pas au ciel,’” meaning trees don’t grow to the sky, said Jacques Porta, a fund manager at Ofi Gestion Privee in Paris. “Following a phenomenal performance, it was difficult for Apple to keep up that trend. Amazon is less tied to global growth concerns but they need to show investors they can continue to increase profits.”