It was December 2018, and the towering giants of tech were looking wobbly.
Apple’s shares were tumbling, and it hadn’t yet delivered the bad news about a sales slowdown in China for the iPhone, a device that had helped make it the modern era’s first trillion-dollar company. Facebook could not escape the shadow of the dueling electoral scandals of Cambridge Analytica and Russian disinformation. And Amazon’s stock was sagging as the president of the United States regularly attacked the company.
Just as it appeared that the big tech companies’ endless upward march had finally come to an end, they led a remarkable rally.
This year, the S&P 500 tech sector is up roughly 40 percent, handily outpacing the 25 percent gain for the benchmark index over all, which is itself the third-best annual return of the past two decades.
Apple stock is up 69 percent, and it set a high-water mark last week. Google’s parent company, Alphabet, is up 28.5 percent, and set its own record on Monday. Microsoft shares have soared 49 percent in 2019, and Amazon is up 16.5 percent.
Tech has surged in part thanks to the tide of rate cuts unleashed by the Federal Reserve, which has lifted all boats. The gains also reflect the relief investors are feeling that the trade war’s worst outcomes haven’t come to pass.
The trade-sensitive chip maker AMD more than doubled on such a swing in sentiment, making it the best-performing stock in the S&P 500 so far this year. Lam Research, which produces semiconductor manufacturing equipment, is up more than 90 percent, the second-best showing.
But the giants of technology — companies like Apple, Alphabet, Amazon, Facebook and Microsoft — are the stocks that have made the market’s year. Their bulk gives them outsize sway over indexes like the S&P 500, which are weighted by market capitalization. In other words, price moves of bigger companies move the index the most.
The rise in value of these five companies alone accounted for more than 20 percent of the total returns of the S&P 500 this year, through the end of November.
“It’s been a great year for mega-cap tech for sure,” said Richard Bodzy, a portfolio manager at Putnam Investments whose top two holdings are Microsoft and Apple.
Few would have predicted such robust results a year ago.
Between October 2018 and January, Apple’s share price crashed roughly 40 percent. The stock plummeted nearly 10 percent in a single day — Jan. 3 — after the company cut its outlook for sales for the first time in over a decade, citing slowing iPhone sales in China.
Facebook’s stock dropped 43 percent from its 2018 peak to the market’s trough last December, as it faced months of scrutiny related to the use of its platform by Russians seeking to influence the 2016 American presidential campaign as well as the collection of users’ data by the political consulting firm Cambridge Analytica. The tumble included a 19 percent nose dive — the company’s worst day ever — on July 26, after executives said future profits would be hurt as it ramped up spending on security.
Amazon shares lost roughly 34 percent of their value between September 2018 and Christmas. President Trump has assailed the company and its chief executive, Jeff Bezos, who owns The Washington Post. Mr. Trump publicly accused Amazon of avoiding taxes and called The Post, which has aggressively covered the Trump administration, a lobbyist for the company. On Monday, Amazon said Mr. Trump had pressured the Pentagon to cut it out of a multibillion-dollar cloud computing contract.
With a slump of roughly 19 percent, Microsoft stood out for its relative resilience. Some investors dumped their shares late last year as the company’s juggernaut web services division experienced a temporary deceleration in sales growth.
But, just when things looked bleakest, stocks began to rise.
In January, the Federal Reserve swiveled away from its 2018 policy of raising rates, toward its eventual decision to chop them three times in 2019. The Fed’s efforts buoyed shares broadly, helping to set off the best start for the S&P 500 since the late 1980s.
The Fed chose to cut rates, in part, because of rising threats to economic growth. Those concerns also drove investors to buy shares in mega-cap tech companies.
“They are more economically resilient,” said Jeb Breece, principal at Spears Abacus, an independent money management firm in Manhattan. “A dollar of tech earnings seems like more of a sure bet than a dollar of Midwestern steel earnings.”
And earnings among the tech giants have held up better than some had feared. After ugly results in the first and second quarters, Facebook’s third quarter topped expectations for profit and revenue.
Apple’s results have also been better than expected recently, and Microsoft in particular has notched supercharged results. Its Azure cloud computing business has helped push the company’s profit growth rate up to almost 30 percent for the last three quarters.
That has driven Apple and Microsoft — which also happen to be the largest companies in the United States, by market cap — to their best performances in a decade.
The recent climbs have left these tech giants with some of the largest market values on earth. Apple and Microsoft both have a market value of over $1 trillion. Alphabet is worth more than $900 billion.
The sheer scale of these companies is part of what makes their rise this year so remarkable. While huge share price surges are common in the market for smaller capitalization companies, these are giants.
The law of large numbers means it is far more difficult to generate large percentage increases in value. A unique confluence of factors allowed these companies to break that law this year. But observers say it’s unlikely they will regularly clock such large gains.
“How does Microsoft double again? You’re adding a trillion dollars,” Mr. Breece said. “You’re just getting to huge numbers.”