At the start of the year, Wall Street forecasts called for the stock market to rise a few percentage points — a humble performance by recent years' standards.
Then the summer came. China stumbled, stocks tumbled and some analysts were openly worrying about the prospect of a new bear market.
The blue-chip Dow Jones industrial average plunged into correction territory, down well more than 10% for the year. So, too, did the broader Standard & Poor's 500 and the Nasdaq Composite indexes. Analysts expected the first down year for all three since the Great Recession.
Since those August lows, however, the major stock indexes have quietly crept back and, despite a modest retreat Monday, are now at or beyond the break-even point for the year. The prediction for a mediocre gain appears to be back on the table.
Last Friday marked the fourth straight week of gains for the Dow, its longest streak of the year. And analysts said the death of the 6-year-old bull market was greatly exaggerated.
"It wasn't a market reversal," Alan Whitman, a Morgan Stanley managing director, said of the August pullback. "It was just a correction. Overall, things are not as negative as people believed. We've weathered a lot."
A proximate cause of a sharp rally last week was better-than-expected earnings reports, particularly in technology from the likes of EBay Inc., Amazon.com Inc. and Google's new parent, Alphabet Inc.
For the month through Monday, the Dow gained 8% to 17,623.05 points. The 30-stock index is now off only 1.1% for the year. The S&P eked into positive territory for the year, albeit by a hair at 0.6%, to 2,071.18. The tech-heavy Nasdaq has been in the black for three weeks and is now sitting on gains of 6.3% for the year, after closing Monday at 5,034.70.
Meanwhile, investors have been buoyed by signs overseas that central banks are determined to bolster their sagging economies.
China cut its benchmark rate on deposits Friday. European Central Bank President Mario Draghi said the bank may extend its current bond-buying program past its current end date of September 2016.
So far this month, Germany's DAX index is up nearly 12%, and France's CAC 40 nearly 10%. China's Shanghai Composite, which sent shock waves through markets worldwide with its plunging value in August, is up 10%.
Since hitting bottom Aug. 25, the Dow has gained 12% and the S&P nearly 11% — almost all of it in October.
The upshot, analysts said, is that even though China's economic slowdown, the slumps in emerging markets and crises in the Middle East are important, overseas problems have not been enough so far to offset the underlying strength in the U.S. economy.
Analysts said the main driver of recent market gains, and the main hope for the future, is the U.S. consumer.
The U.S. economy remains on track for full employment by mid-2016, meaningful wage growth should not be far behind, and household wealth has quietly recovered from the Great Recession, according to an Oct. 12 research paper by Mark Zandi of Moody's Analytics.
Stock market wealth has increased by $12 trillion from the recession bottom, and housing wealth has increased by almost $6 trillion, leaving net worth at 6.4 times household income, a near-record, Zandi said.
"Consumers' balance sheets look about as good as they ever have," he said.
For the most part, the major indexes have enjoyed strong, often double-digit annual growth since the severe downturns in 2008. The Dow, for instance, gained 26.5% in 2013; the S&P and Nasdaq did even better then, jumping 29.7% and 45.8%, respectively.
Analysts said that consumer spending, which accounts for two-thirds of U.S. gross domestic product, has proved resilient even in the face of years of weak or no wage growth. An improved labor market should only improve that performance.
"Sometimes people overlook the greatest asset we have, and that's an attitude, a consumptive attitude," said Michael G. Thompson, a managing director for S&P Capital IQ. "That behaviorally persistent attitude is in fact a backstop to our economy."
In a recent report, S&P said retail sales set another all-time monthly record at $447.7 billion for September. And though the rise represented a modest 2.4% growth rate from a year earlier, it amounted to 4.9% with volatile gasoline sales excluded.
The report said earnings from consumer discretionary companies in the S&P 500 are expected to increase 11.8% in the third quarter from the year-earlier quarter, then jump quarterly as much as 18% through next year, compared with much slower growth for the S&P 500 overall. Those kinds of numbers would tend to support a stronger economy and a modest rise in stock prices.
"If the consumer stumbles, you've got a problem," Thompson said. "I don't see the consumer stumbling."
Not everyone is convinced that consumers will be able to propel corporate earnings enough to support stock prices, particularly at relatively high prices now.
Last month, for instance, Goldman Sachs lowered its market forecast, predicting that the S&P 500 would finish the year at 2,000. That would mark a 3.4% decline from Monday's close and a 2.8% decline for the year.
The bank attributed its lower expectations to slowing growth in the U.S. and China and lower-than-expected oil prices. Those factors point toward struggling global industrial demand.
Corporate defaults and other negative signs in the bond market will probably lead to a less-than-robust picture for the growth of future profits, said John Lonski, chief economist for Moody's Analytics.
"It remains to be seen if companies are going to be inclined to hire more people," he said.
But given recent gains, analysts said the mid-single-digit gain forecast at the beginning of the year is well within reach. The only difference now is it won't be seen as mediocre.
"We'd jump up and down; we'd cheer," Morgan Stanley's Whitman said. "It's been a challenging year."
MORE BUSINESS NEWS