This year has been a decent one for stocks so far, especially compared to the stomach-churning drops and wild swings of the last three months of 2018.

The S&P 500, a broad index of major American companies, is up more than 3 percent this year. But it is still down about 12 percent from its all-time peak, which it reached last September.

And more carnage seems quite possible. China’s economy is slowing so much that Apple issued a rare warning that it won’t meet sales expectations. There’s continuing chaos out of Washington, which can’t do basic things like pass a budget or keep agencies open. And some indicators of U.S. economic activity, such as the widely followed ISM index for manufacturing, are beginning to signal concern.

All of that raises an interesting question: Why do so many leading analysts predict that the stock market will end the year way up?

At the beginning of this year, according to Bloomberg, the average prediction among 22 analysts who offered a target for where the S&P would end 2019 was 2,975. That would be a new record for the index. Nobody thought the S&P would stay low; the lowest prediction was about four percent higher than where it is today.

What gives?

One answer is that stock analysts are perpetually too bullish. After all, few predicted that the S&P would end 2018 in negative territory. And it’s really hard to predict corrections and bear markets — even the financial crisis that started in 2007 caught most by surprise.

There’s another possibility, according to interviews with several analysts: The economy is fundamentally strong, and the stock market has overreacted to concerns about a modest slowing.

“It does feel like there’s a big gap between what’s going on Main Street and what’s going on Wall Street,” said Noah Weisberger, managing director of U.S. portfolio strategy at AB Bernstein. “Everything points to a modest degree of slowing in the economy.”

The fundamental drivers of the economy, such as consumer confidence, the labor market and corporate earnings, are all quite steady, added Jill Carey Hall, senior equity strategist at Bank of America Merrill Lynch.

“Corporate earnings have been strong, and companies have a healthy outlook for the coming year,” she said. “U.S. economic data has been strong. A lot of these measures suggest we still could see further upside."

Since the financial crisis, the U.S. economy has experienced its second-longest period of expansion in the country’s history. Unemployment has fallen to decades-old lows, wages have started to pick up, and until last year the stock market had been on a seemingly unstoppable rise. Consumer spending, a major driver of economic activity, has shown little sign of weakening. Many retailers just saw the strongest sales performance over the holiday season in six years.

“We’ve seen retail sales growth continue to accelerate, some of that from lower taxes but also from pretty solid employment gains and” economic growth, said Keith Parker, chief U.S. equity strategist at UBS. “You are seeing income growth leading to spending growth, and consumers are what drives the economy."

The greatest threat to consumers at the moment is political uncertainty, according to the Conference Board, a business research group, which said its consumer confidence index fell more than expected in December. Concerns about an economic slowdown have pushed consumer expectations to their lowest point since November 2016.

After years of expansion, experts agree that the United States is probably nearing the end of this economic cycle, and the market has become more volatile amid a number of concerns, including interest-rate hikes by the Federal Reserve and a growing drag on global economic growth from the U.S. trade conflict with China.

“The market tends to price in too much risk, and as uncertainties pass or are less feared, the market tends to re-price,” Parker said.

Even an extended decline in markets doesn’t necessarily guarantee a recession. Since 1929, there have been bear markets 20 times, defined as U.S. stocks falling 20 percent from their peak, according to data compiled by Charlie Bilello, head of research at Pension Partners. Just 11 have been followed by a recession.

“We’re going through a painful reset,” said Tobias Levkovich, chief U.S. equity strategist at Citigroup. “But most of the data we’re looking at just doesn’t support an argument for a recession.”