S&P 500 ekes out record close; Salesforce up nearly 4%

S&P 500 ekes out record close; Salesforce up nearly 4%

U.S. stocks closed modestly higher on Thursday, with the Nasdaq outperforming, as investors eyed slightly lower bond yields and mostly shook off the morning's mixed economic data. (Tweet This)

"The Nasdaq is looking pretty good, trading (near) all-time highs," said Robert Pavlik, chief market strategist at Boston Private Wealth. "I think people are afraid of missing out."

The S&P 500 ended mildly higher, above its previous record close of 2,129.20 to post its 10th closing high for the year.

Read More Divergence creates spooky undercurrent for stocks

The Nasdaq failed to top its closing high of 5.092, despite Apple (AAPL) gaining 1 percent and Amazon closing up nearly 2 percent. The Dow Jones industrial average ended just 0.34 points higher after repeatedly dipping into negative territory.

Yields edged lower after disappointing existing home sales, with the 10-year yield dipping below 2.20 percent. The dollar weakened, with the euro at $1.113. The major averages turned to trade mostly in positive territory after the 10 a.m. data releases.

"Outside of claims the other data points were soft," said Peter Boockvar, chief market analyst at The Lindsey Group. "We're getting a little relief from the bond bounce."

Salesforce (CRM) ended 3.95 percent higher after a solid earnings report after the bell Wednesday. The business software provider beat estimates by 2 cents with adjusted quarterly profit of 16 cents per share, while revenue was in line with forecasts. The firm also increased its full-year forecast on increased subscription and services revenue.

Amazon.com (AMZN) closed up 1.8 percent after jumping more than 3 percent following the announcement that Amazon Prime Now is offering one-hour delivery from local stores In New York's Manhattan, including groceries, meals, and baked goods.

Shake Shack (SHAK) surged nearly 8.5 percent on a trademark filing that indicated the burger chain might be adding chicken to its menu.

Markets mostly shrugged off mixed morning economic reports. The Consumer Price Index, a key indicator for inflation, is due Friday morning.

"Collectively the data today signals to me that we're seeing a reasonably firm economy, while there's nothing (supporting) that the Fed is going to do anything at its June meeting," said Mark Luschini, chief investment strategist at Janney Montgomery Scott. "I think the market is very tolerant of that."

Still, lack of significant strength in corporate earnings and continued moderation in economic growth keeps a cap on gains, he said.

"I think the market today is going to focus on economic data," said Peter Cardillo, chief market economist at Rockwell Global Capital. "Basically I think we're heading for a mixed session and the post-Fed focus continues to support the bond market and that should support equities."

Existing home sales for April fell 3.3 percent, missing an expected 1 percent gain to 5.24 million units. Earlier in the week, reports showed home builder sentiment fell in May, but housing starts for April came in much better than expected.

"We think the housing market is set for a prolonged period of moderate improvement but not rapid acceleration," said Michael Baele, managing director for private client research at U.S. Bank.

Manufacturing PMI came in at 53.8 for May, below expectations of 54.5. The initial read showed slowing growth for the second straight month, with new orders increasing at their slowest pace since January last year, financial research firm Markit said.

The May U.S. Philadelphia Fed Index showed a gain of 6.7.

The Conference Board's leading indicator index, which forecasts future economic activity, showed a gain of 0.7 percent in April. The index was expected to register the 15th consecutive increase, given a decline in initial unemployment claims.

Read More Leading indicators in April soar past expectations

Art Hogan, chief market strategist at Wunderlich Securities, said the leading indicators was encouraging for stocks. "The second quarter is looking stronger," he said.

Weekly jobless claims came in at 274,000, above expectations of an increase to 271,000 from the prior week's 264,000. The 4-week moving average remains the lowest since April 2000.

"It's still indicative of a modestly improving job environment but not gangbusters that the Fed has to raise rates," said Nick Raich, CEO of The Earnings Scout.

"Whenever global markets start to have a bit of uncertainty global banks (give) support," he said.

The Fed minutes showed policymakers mostly brushed aside the wobbly start the U.S. economy has had in 2015, attributing the lack of growth to "transitory" factors that will abate soon. However, only a few policymakers supported a June rate hike.

"The market really is pricing out any move by the Fed (in the near future)," said Patrick Maldari, senior fixed income specialist at Aberdeen Asset Management. "As long as growth stays around 2 percent it's going to be very difficult for the Fed to meet it's objectives."

Fed Chair Janet Yellen is scheduled to speak on Friday at the Greater Providence Chamber of Commerce Economic Outlook luncheon at 1 p.m. She is not expected to take questions.

U.S. Federal Reserve Vice Chair Stanley Fischer said on Thursday at a forum that the euro zone crisis had made the monetary union stronger and proved that the European Central Bank has the ability to carry out effective policy in the region.

The S&P 500 hit a new intraday high on Wednesday and the Nasdaq briefly traded above its closing high before both indices pared gains.

"Yesterday's failed breakout above intraday resistance by the S&P futures makes a pullback likely in the days ahead," BTIG Chief Technical Strategist Katie Stockton said in a morning note. "In a departure from trend, we think the transportation sector is likely to outperform during a broad-based pullback given its relatively oversold status."

The Dow transports gained half a percent after plunging nearly 2 percent on Wednesday, dragged down by airlines.

The Dow Jones Industrial Average (Dow Jones Global Indexes: .DJI) closed up 0.34 points, or flat, at 18,285.74, with Caterpillar (CAT) leading gains and McDonald's (MCD) the greatest laggard.

The S&P 500 (^GSPC) closed up 4.97 points, or 0.23 percent, at 2,130.82, with energy leading seven sectors higher and financials the greatest decliner.

The Nasdaq (^IXIC) closed up 19.05 points, or 0.38 percent, at 5,090.79.

The CBOE Volatility Index (VIX) (^VIX), widely considered the best gauge of fear in the market, traded near 12.5.

About eight stocks advanced for every seven decliners on the New York Stock Exchange, with an exchange volume of 707 million and a composite volume of nearly 3.1 billion in the close.

Crude oil futures for July delivery settled up $1.74, or 2.95 percent, at $60.72 a barrel on the New York Mercantile Exchange. Gold futures settled down $4.60 at $1,204.10 an ounce.

Earnings expected on Thursday after the bell include Hewlett-Packard (HPQ), Gap (GPS) and Intuit (INTU).

Be fore the bell, Best Buy (BBY) reported adjusted quarterly profit of 37 cents per share, 8 cents above estimates, with revenue beating forecasts, as well. Comparable-store sales were up 0.6 percent, compared to consensus estimates of a 0.1 percent increase

Hewlett-Packard (HPQ) announced it is selling 51 percent of its China-based data networking operation to China's Tsinghua Holdings.

Read More Early movers: BBY, OCR, HPQ, PFE, NKE, BABA & more

European equities eked out gains on Thursday despite flash manufacturing and services PMI data that showed the euro zone's economy continued to lose momentum in May.

-Reuters and CNBC's Peter Schacknow contributed to this report.

On tap this week:

Thursday

Earnings: Hewlett-Packard, Gap, Intuit, Marvell Tech., Ross Stores, Aeropostale, Aruba Networks, Brocade, Fresh Market, Lions Gate

07:00 p.m.: San Francisco Fed President John Williams on impact of form

Friday

Earnings: Campbell Soup, Deere, Foot Locker, Ann, Mentor Graphics, Krispy Kreme

08:30 a.m.: CPI

09:45 a.m. Manufacturing PMI

01:00 p.m. Fed Chair Janet Yellen at the Greater Providence Chamber of Commerce on economic outlook

More From CNBC.com:



More From CNBC