The Dow Jones industrial average 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.

advertisement | advertise on newsday

The Dow 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, editor of the Stock Trader's Almanac, adding that the market may struggle to gain further in February.

Stocks have also benefited as investors put money into equities in January.

However, Thursday, stocks drifted lower as investors digested more earnings results and reports on the economy.

The Dow fell 49.84 points to 13,860.58. The S&P 500 dropped 0.26 percent 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.