Despite veering between record highs and the steepest dive in four years, the stock market is on track to end the year essentially flat. That means if you invested in a fund that tracks the Standard & Poor's 500 index, you have little to show for the past 12 months.
"It's been mildly disappointing," said Michael Baele, managing director at the Private Client Reserve at U.S. Bank. "Any time that you come in toward the end of the year close to flat you always want a little bit more."
Markets overseas had their own challenges.
China's market surged in the late spring and then fell sharply in the summer despite several efforts by China's government to stem the decline. The Shanghai Composite Index ended the year up 9.4 percent. Japan's market finished flat after that country's government stepped up its economic stimulus program. In Europe, Britain's market ended the year down about 5 percent, while indexes in Germany and France turned in healthy gains of 9.6 percent and 8.5 percent, respectively.
In the U.S., the market got 2015 off to a slow start as investors worried about falling crude oil prices, flat earnings growth and when and how quickly the Federal Reserve would begin raising interest rates.
By May, the major indexes were hitting new highs. Even the Nasdaq bested its dot-com high-water mark set in March 2000.
The market didn't stay in milestone territory for long, though.
Worries about slowing growth in China and elsewhere gave reason for the Fed to pause and for investors to fret, even as the U.S. economy continued to create jobs and consumer confidence improved. Weak company earnings, largely due to the strong dollar and falling oil prices, didn't do much for the market's confidence.
By August, the anxiety had deepened and the market dropped sharply. The three major U.S. indexes went into a correction, commonly defined as a loss of at least 10 percent from a recent peak, for the first time in four years.
That slide didn't last long, either.
Within several weeks, the market had mostly bounced back. The Nasdaq composite returned to positive territory for the year, while the Dow average and S&P 500 remained slightly in the red until December.
In the weeks that followed, the S&P 500 inched back into positive territory, leaving the Dow as the only major market indicator negative for the year.
That held true until the last day of the year, when the S&P 500 index slipped back into the red.
Including dividends, the S&P 500 is on track to return 2.4 percent, following a return of 13.7 percent in 2014.
That would make it the worst year for the market since 2011, when the S&P 50 index eked out a return of 2.1 percent.
Meanwhile, the Dow was on course to end 2015 with a loss of 1.5 percent, while the tech-heavy Nasdaq was pointing to a 6.5 percent gain for the year.
"There was a lot of news that kept hitting the market and the market kept shrugging it all off and hung in there," said J.J. Kinahan, chief strategist at TD Ameritrade. "I'd say, given all that the market faced this year, it was pretty strong."
These were some of the key factors driving U.S. markets in 2015:
WAITING FOR THE FED
Wall Street watched few things more closely this year than the Federal Reserve. Traders had been predicting early on that the central bank would begin raising its benchmark interest rate as early as March. When that didn't happen, investors turned their focus to June, only to be disappointed again.
Eventually, in December, the Fed took action. It nudged its benchmark overnight borrowing rate higher, its first increase in interest rates in nearly a decade.
The Fed made it clear that it was expressing a vote of confidence in the U.S. economy by doing so and that future increases would be gradual. That helped reassure investors that the Fed wouldn't raise rates too quickly and thereby stunt the economy's growth.
"It really was central banks looming large over the market," Baele said. "The market had a fair amount of fear that the Fed raising rates was a risk to the market. It's turned around now."
The bull market had racked up six years of annual gains by the time the calendars turned to 2015. The last time it had a correction was 2011. Historically, that's an unusually long time for the market to go without a meaningful pullback. That plus a string of record highs in late 2014 led many to think the market was overdue a drop.
The long-awaited correction finally arrived in August. Late in the month indexes dropped sharply as investors worried that a slowdown in China's huge economy could spread to other countries.
Yet after an 11 percent plunge between Aug. 17 and 25, and another, less steep drop in late September, the market began to struggle higher. By late November it had recouped all the losses from its late summer swoon.
Once investors determined that China's slowdown would not spillover to the U.S. and European economies, "then we had a very rapid recovery from that very sharp decline," Jeremy Zirin, chief equities strategist at UBS Wealth Management Americas.
A big reason why the market finished flat in 2015 is that company earnings growth has also been largely flat.
That was due primarily to the impact of falling oil prices on energy sector earnings. Also, the rapid appreciation of the dollar constrained earnings for companies that do a lot of business overseas, including Procter & Gamble, Tiffany, Gap and Avon.
As a result, earnings growth for companies in the S&P 500 index went from 7 percent in 2014 to essentially zero in 2015, Zirin said.
Excluding energy, earnings for the rest of the S&P 500 would be up about 7 percent this year, Zirin said.
With so few companies producing meaningful growth, investors homed in on those that did. Among the biggest gainers: Facebook, Amazon, Netflix and Alphabet, Google's parent company.
"There's only been a handful of really strong performers on a market cap-weighted index that have driven us to performance while the majority of the indices and the majority of the stocks are actually negative for the year," said Darrell Cronk, president of Wells Fargo Investment Institute.
The U.S. economy didn't do the stock market any favors in 2015.
It expanded at a slight 0.6 percent annual rate in the first three months of the year, depressed by unusually severe winter weather and disruptions at West Coast ports. The economy revved up in the next quarter, growing at an annual rate of 3.9 percent, but slowed to a gain of 2.1 percent in the July-September quarter.
Consumer spending remained a bright spot, however. That's one reason why consumer discretionary stocks, a category that includes big retailers and car makers, were the biggest gainers in the S&P 500.