Stocks finished lower on Thursday after setting fresh records on Wednesday.

The Dow Jones Industrial Average declined by 97 points, or 0.37%, to 26,018 after rising at the open to a fresh intraday high. The S&P 500 dropped 0.16% and the Nasdaq fell 0.033%.

Boeing Co. (BA)  was the leading laggard on the blue-chip index, falling 3%. Walmart Stores Inc. (WMT)  was the leading gainer, rising 1.6%.

The Dow soared 322 points on Wednesday, Jan. 17, finishing above 26,000 and setting a new record close. The S&P 500 and Nasdaq also finished at new record highs.

Apple Inc. (AAPL) shares rose 0.09% after the tech giant moved to pump around $350 billion into the U.S. economy over the next five years, pay a tax bill of roughly $38 billion on an undefined portion of its $252.2 billion overseas cash pile, announced plans to spend $30 billion on both existing company sites and a new campus, and said it would increase its headcount by around 20,000.

Morgan Stanley (MS)  rose 0.89% after the investment bank posted fourth-quarter adjusted earnings that beat Wall Street forecasts. Morgan Stanley's fourth-quarter profit tumbled 59%, as the firm suffered along with rival Goldman Sachs Group Inc. (GS)  from a slump in bond markets.

KeyCorp (KEY)   fell 2% after fourth-quarter profit matched analysts' estimates.

Amazon.com Inc. (AMZN) narrowed the list of cities under consideration for its second headquarters to 20. Los Angeles, Boston and Atlanta remain in the mix. Most of the contenders are located in the Northeast.

Investors were awaiting earnings from International Business Machines Corp. (IBM)  after the close of trading on Thursday. 

In economic news, weekly jobless claims in the U.S. fell more than expected to the lowest level in 45 years, declining by 41,000 to 220,000.

Housing starts in December also fell more than expected, decreasing 8.2% to a seasonally adjusted annual rate of 1.192 million units. The percentage drop in December was the largest since November 2016.

Wall Street also was paying close attention to news from Washington as lawmakers worked to prevent a partial government shutdown. House Republicans were set to vote Thursday on another stopgap measure to keep the government open.

In Europe, the Stoxx 600 index, the broadest measure of regional shares prices, rose 0.19%, while Asian stocks closed mostly higher after China's economy grew by a faster-than-expected rate of 6.8% in the final three months of 2017. China's full-year 2017 growth rate was 6.9%.

West Texas Intermediate crude, the U.S. benchmark, rose 0.13% to $64.05 a barrel after U.S. crude inventories dropped 6.9 billion barrels last week, according to the Energy Information Administration. The decline was wider than analysts expected.

Apple is a holding in Jim Cramer's Action Alerts PLUS charitable trust portfolio. Want to be alerted before Cramer and the AAP team buy or sell the stock? Learn more now .

More of What's Trending on TheStreet:

More from Markets

Nutrisystem Soars on Deal to Be Acquired by Tivity Health

Nutrisystem Soars on Deal to Be Acquired by Tivity Health

Economist Perspective: Can U.S. Dollar Keep Its Momentum in 2019?

Economist Perspective: Can U.S. Dollar Keep Its Momentum in 2019?

Monday Madness: Apple's Looking Pretty Bruised

Monday Madness: Apple's Looking Pretty Bruised

Stocks End Day in the Green as Dow, S&P Overcome Slow Starts

Stocks End Day in the Green as Dow, S&P Overcome Slow Starts

These Bank Stocks Could Be Oversold in the Market Wreckage

These Bank Stocks Could Be Oversold in the Market Wreckage