NEW YORK (AP) -- The Dow logged its best start to the year in almost two decades.
Stocks rallied in the first week of the year after U.S. lawmakers reached a deal to avoid the "fiscal cliff," and then pushed higher toward record levels as optimism about the housing market recovery grew. Decent company earnings for the fourth quarter and an improving job market also helped lift markets.
The Dow Jones industrial average ended the month up 5.8 percent, its strongest January since 1994, according to S&P Capital IQ data. The Standard & Poor's 500 finished the month 5 percent higher, its best start to the year since 1997.
"There's not a whole lot of bears left here," said Jeff Hirsch, the editor of the Stock Trader's Almanac, adding that the market may struggle to gain further in February.
Stocks have also benefited as investors have put money into equities in January. By one measure, the monthly flow into stock funds was the largest in nine years.
About $51 billion in net deposits was moved into stock funds and so-called hybrid funds, which invest in a mix of stocks and bonds, consultant Strategic Insight said Thursday. That's the most since $56 billion flowed in during January 2004.
On Thursday, stocks drifted lower as investors digested more earnings results and reports on the economy.
The Dow Jones industrial average fell 49 points to 13,860.58. The S&P 500 dropped 4 points to 1,498.11 and the Nasdaq composite was little changed at 3,142.13.
The Dow is just 304 points from its all-time high.