Wal-Mart helps lift Dow industrials to record finish

U.S. stocks fluctuated on Thursday after the S&P 500 and Dow rose to records, with energy companies slammed as the price of oil fell, countering upbeat earnings from the world's largest retailer and data showing jobless claims holding at a 14-year low.

"If you think of it as the distribution of wealth and income from producers of petroleum to consumers, it makes sense oil stocks get hurt and consumer discretionary does better. We are seeing that mix," said Jeff Greenberg, senior economist at J.P. Morgan Private Bank..

"Today we're right around those unchanged levels that happen to be all-time highs, which are causing investors to be cautious," said Erik Davidson, deputy chief investment officer for Wells Fargo Private Bank.

"The volatility is probably being driven by oil, which is off pretty significantly," Davidson added of the decline that had West Texas Intermediate falling to a four-year low below $75 a barrel.

Oil and gas well-drilling contractors Helmerich & Payne and Nabors Industries led declines on the S&P 500.

The Labor Department on Thursday reported initial claims for state unemployment benefits climbed 12,000 to 290,000 last week, above the 280,000 forecast but beneath 300,000 for a ninth consecutive week.

Separate figures from the Labor Department had hiring at its highest level in more than six years.

"It makes sense that the U.S. equity market is near all-time highs when our read on the U.S. economy is the strongest that it's looked since the financial crisis," said Greenberg.

Of the 460 S&P 500 companies that have reported quarterly earnings, 74.6 percent have topped expectations, according to numbers compiled by Thomson Reuters.

Wal-Mart Stores climbed after the company reported a larger-than-expected profit as comparable sales at U.S. stores climbed for the first quarter in seven. J.C. Penney shares declined after the retailer posted a less-than-estimated quarterly loss but said same-store sales were flat.

Read MoreMidday movers: Amazon, Macy's SunPower & more

Symbol
Name
Price
 
Change
%Change
DJIA
---
S&P 500
---
NASDAQ
---

After a 93-point gain that had it at its loftiest level, the Dow Jones Industrial Average fell as much as 28 points, and ended up 40.59 points, or 0.2 percent, at 17,652.79, with Wal-Mart pacing gains and Caterpillar leading blue-chip losses.

The S&P 500 added 1.08 point to 2,039.33, with energy falling the most and telecommunications faring best among its 10 major sectors.

The Nasdaq rose 5.01 points, or 0.1 percent, to 4,680.14, its highest close since March 2000.

For every share rising, less than two fell on the New York Stock Exchange, where 708 million shares traded. Composite volume approached 3.5 billion.

Traders work on the floor of the New York Stock Exchange, Oct. 29, 2014.
Lucas Jackson | Reuters
Traders work on the floor of the New York Stock Exchange, Oct. 29, 2014.

On the New York Mercantile Exchange, gold futures rose $2.40 to $1,161.50 an ounce, and crude-oil futures dropped $2.97 to $74.21 a barrel, its lowest since September of 2010.

The U.S. dollar drifted lower against the currencies of major U.S. trading partners; the yield on the 10-year Treasury note fell 3 basis points to 2.3487 percent.

On Wednesday, U.S. stocks wavered, largely erasing a retreat from records, as investors mulled the slowdown in Europe's economy and earnings from Macy's and other retailers.

Read More Stocks end little moved near records; utilities hit

The NYSE issued a notice Thursday morning saying hardware issues resulted in a halt of nine securities, including Alpha Pro Tech, Cornerstone Progressive Return, Denison Mines, Aberdeen Asia-Pacific Income Fund, Ibio, inTest, Provectus Biopharmaceuticals, TherapeuticsMD and Uranerz Energy.

Coming Up This Week:

Thursday

12:30 p.m.: Philadelphia Fed President Charles Plosser

12:45 p.m.: Fed Chair Janet Yellen welcoming remarks at Fed/ECB conference

1:00 p.m.: $16 billion 30-year bond auction

2:00 p.m.: Treasury budget

3:30 p.m.: Minneapolis Fed President Narayana Kocherlakota

4:30 p.m.: Fed balance sheet

Friday

8:30 a.m.: Retail sales

8:30 a.m.: Import and export prices

9:10 a.m.: St. Louis Fed President James Bullard

9:55 a.m.: Consumer sentiment

10:00 a.m.: Business inventories

10:30 a.m.: Natural-gas inventories

4:00 p.m.: Fed Vice Chair Stanley Fischer on panel

4:00 p.m.: Fed Gov. Jerome Powell on panel

More From CNBC.com: