NEW YORK – After two months of trading, the stock market is back where it started.

The Standard & Poor's 500 index rose 4.3 percent in February, the biggest gain since October 2013, helped by strong corporate earnings and a Federal Reserve that seems to have Wall Street's back at every turn. But the rise in February must be taken in the context that investors spent the month making up the ground they lost in January.

"February looked a lot like January, just moving in the opposite direction," said Scott Clemons, chief investment strategist with Brown Brothers Harriman Wealth Management.

Investors also are now staring at a stock market — while numbers-wise is basically where it was on Jan. 1 — that is a lot more defensive than it was two months ago.

Utilities and health care stocks — two traditional "safe" places for investors because of their low volatility and higher-than-average dividends — are the biggest gainers so far this year. Utilities are up 5.7 percent in 2014 and health care is up 6.6 percent.

Investor caution was also evident in the bond market, which has done reasonably well in the last two months. The yield on the benchmark U.S. 10-year Treasury note has fallen from 2.97 percent to 2.65 percent in the last two months as investors returned to the relative safety of government debt. The Barclays U.S. Aggregate bond index, which tracks a broad mix of corporate and government bonds, is up 1.6 percent this year.

"The sentiment now is, 'bonds may not be as bad as I originally thought,' " said Michael Fredericks, a portfolio manager of the Multi-Asset Income Fund at BlackRock.

February's rise came despite several economic reports that showed the U.S. economy slowed in the previous month.

It started with the January jobs report, which showed employers only created 113,000 jobs that month. It was far fewer than economists had expected. Other economic reports told a similar story.

Even with the economic concerns, investors were able to set aside the volatility of January for three reasons, market watchers said.

First, corporate earnings for the fourth quarter overall turned out to be pretty good. Earnings at companies in the S&P 500 index grew 8.5 percent over the same period last year. Revenue growth also picked up slightly.

The Federal Reserve, once again, also came to the market's side. Janet Yellen, who in February took over the role as Fed chairwoman, reaffirmed that the central bank plans to keep its market-friendly, low interest rate policies in place for the foreseeable future.

Lastly, weather, by its very nature, is temporary.

The winter storms that have kept businesses closed and consumers away from stores will fade. All that pent-up demand will help the economy recover some of the ground lost in January and February, investors say.

"I think 70 percent, 80 percent, of the weakness we saw in January and February was weather-related, and we will pick up strength in the spring thaw," said Bob Doll, chief equity strategist at Nuveen Asset Management.