NEW YORK (Reuters) - Stocks have been on a tear in January, moving major indexes within striking distance of all-time highs. The bearish case is a difficult one to make right now.

Earnings have exceeded expectations, the housing and labor markets have strengthened, lawmakers in Washington no longer seem to be the roadblock that they were for most of 2012, and money has returned to stock funds again.

The Standard & Poor's 500 Index has gained 5.4 percent this year and closed above 1,500 - climbing to the spot where Wall Street strategists expected it to be by mid-year. The Dow Jones industrial average is 2.2 percent away from all-time highs reached in October 2007. The Dow ended Friday's session at 13,895.98, its highest close since October 31, 2007.

The S&P has risen for four straight weeks and eight consecutive sessions, the longest streak of days since 2004. On Friday, the benchmark S&P 500 ended at 1,502.96 - its first close above 1,500 in more than five years.

"Once we break above a resistance level at 1,510, we dramatically increase the probability that we break the highs of 2007," said Walter Zimmermann, technical analyst at United-ICAP, in Jersey City, New Jersey. "That may be the start of a rise that could take equities near 1,800 within the next few years."

The most recent Reuters poll of Wall Street strategists estimated the benchmark index would rise to 1,550 by year-end, a target that is 3.1 percent away from current levels. That would put the S&P 500 a stone's throw from the index's all-time intraday high of 1,576.09 reached on October 11, 2007.

The new year has brought a sharp increase in flows into U.S. equity mutual funds, and that has helped stocks rack up four straight weeks of gains, with strength in big- and small-caps alike.

That's not to say there aren't concerns. Economic growth has been steady, but not as strong as many had hoped. The household unemployment rate remains high at 7.8 percent. And more than 75 percent of the stocks in the S&P 500 are above their 26-week highs, suggesting the buying has come too far, too fast.

MUTUAL FUND INVESTORS COME BACK

All 10 S&P 500 industry sectors are higher in 2013, in part because of new money flowing into equity funds. Investors in U.S.-based funds committed $3.66 billion to stock mutual funds in the latest week, the third straight week of big gains for the funds, data from Thomson Reuters' Lipper service showed on Thursday.

Energy shares lead the way with a gain of 6.6 percent, followed by industrials , up 6.3 percent. Telecom , a defensive play that underperforms in periods of growth, is the weakest sector - up 0.1 percent for the year.

More than 350 stocks hit new highs on Friday alone on the New York Stock Exchange. The Dow Jones Transportation Average recently climbed to an all-time high, with stocks in this sector and other economic bellwethers posting strong gains almost daily.

"If you peel back the onion a little bit, you start to look at companies like Precision Castparts, Honeywell , 3M Co and Illinois Tool Works - these are big, broad-based industrial companies in the U.S. and they are all hitting new highs, and doing very well. That is the real story," said Mike Binger, portfolio manager at Gradient Investments, in Shoreview, Minnesota.

The gains have run across asset sizes as well. The S&P small-cap index has jumped 6.7 percent and the S&P mid-cap index has shot up 7.5 percent so far this year.

Exchange-traded funds have seen year-to-date inflows of $15.6 billion, with fairly even flows across the small-, mid- and large-cap categories, according to Nicholas Colas, chief market strategist at the ConvergEx Group, in New York.

The market has shown resilience to weak news. On Thursday, the S&P 500 held steady despite a 12 percent slide in shares of Apple after the iPhone and iPad maker's results. The tech giant is heavily weighted in both the S&P 500 and Nasdaq 100 and in the past, its drop has suffocated stocks' broader gains.

JOBS DATA MAY TEST THE RALLY

In the last few days, the ratio of stocks hitting new highs versus those hitting new lows on a daily basis has started to diminish - a potential sign that the rally is narrowing to fewer names - and could be running out of gas.

Investors have also cited sentiment surveys that indicate high levels of bullishness among newsletter writers, a contrarian indicator, and momentum indicators are starting to also suggest the rally has perhaps come too far.

The market's resilience could be tested next week with Friday's release of the January non-farm payrolls report. About 155,000 jobs are seen being added in the month and the unemployment rate is expected to hold steady at 7.8 percent.

"Staying over 1,500 sends up a flag of profit taking," said Jerry Harris, president of asset management at Sterne Agee, in Birmingham, Alabama. "Since recent jobless claims have made us optimistic on payrolls, if that doesn't come through, it will be a real risk to the rally."

A number of marquee names will report earnings next week, including bellwether companies such as Caterpillar Inc, Amazon.com Inc , Ford Motor Co and Pfizer Inc .

On a historic basis, valuations remain relatively low - the S&P 500's current price-to-earnings ratio sits at 15.66, which is just a tad above the historic level of 15.

Worries about the U.S. stock market's recent strength do not mean the market is in a bubble. Investors clearly don't feel that way at the moment.

"We're seeing more interest in equities overall, and a lot of flows from bonds into stocks," said Paul Zemsky, who helps oversee $445 billion as the New York-based head of asset allocation at ING Investment Management. "We've been increasing our exposure to risky assets."

For the week, the Dow climbed 1.8 percent, the S&P 500 rose 1.1 percent and the Nasdaq advanced 0.5 percent.