By Saumya Vaishampayan 

U.S. stocks rose Wednesday, with the Nasdaq Composite Index trading within striking distance of its all-time high reached in March 2000.

The Dow Jones Industrial Average rose 80 points, or 0.4%, to 18029 and the S&P 500 gained 11 points, or 0.5%, to 2108.

The Nasdaq Composite added 21 points, or 0.4%, to 5035. The tech-heavy index is approaching its record of 5048.62 hit in March 2000.

Stocks opened higher Wednesday and then quickly turned lower, pushing the Dow down 62 points at its low of the session. Stocks pared losses by midmorning and pushed to session highs in afternoon trading.

Recent action in the major indexes has been choppy, leaving indexes trading in a range below all-time highs. The Dow is 1.4% away from its record of 18288.63 and the S&P is trading 0.4% below its closing high of 2117.39.

"We've really been in a trading range since earnings started," said Tom Wright, director of equities at JMP Securities. "For me, one of the key factors is that on selloffs, we definitely see new money coming to the market. We are encouraged by that," he added.

Investors focused on corporate earnings Wednesday. Including results from 113 companies in the S&P 500, earnings are on track to fall 3.9% from a year earlier, according to FactSet. About 76% of those companies have beaten profit expectations that were slashed heading into the reporting season.

Among individual stocks, McDonald's Corp. reported a 2.6% drop in a key revenue metric in the U.S. during its first quarter. The fast-food giant posted a larger-than-expected decline in profit amid foreign-currency impacts and restructuring charges. Shares rose 3.1% as total revenue was in line with Wall Street expectations, adding 20 points to the Dow's gain.

Visa Inc. shares rose 4.1%, contributing 18 points to the Dow's overall gain. On Wednesday, China unveiled rules that allow domestic and foreign companies to set up bank card-clearing operations, a move that is expected to offer Visa and MasterCard Inc. a chance to expand in China. MasterCard shares rose 4%.

Coca-Cola Co. reported better-than-expected profit and revenue in its first quarter, as beverage volumes inched up 1%. Shares added 1.5%.

Boeing Co. said first-quarter profit rose 38%, but its revenue growth didn't keep pace and costs tied to its flagship 787 Dreamliner program continued to mount. Shares fell 1.8%.

"I really don't feel like we're getting the growth in revenues that makes me enthusiastic about earnings going forward," said Carlton Neel, who manages about $1.4 billion as a senior managing director and portfolio manager at Euclid Advisors LLC.

Many portfolio managers say that while valuations are elevated, they aren't yet worrisome. The S&P 500 trades at 17.4 times the previous 12 months' earnings, according to FactSet. That is above the 10-year average of 14.6.

"The market is not cheap...but the reality is there's nowhere else to go, " said Tom Digenan, who manages $6.5 billion as head of U.S. equities at UBS Global Asset Management.

Mr. Digenan said he has become more aggressive in looking for opportunities in the energy sector. "We're trying to play the names that are a little bit more sensitive to the price of oil," he said. Mr. Digenan said that earlier this year, he bought stocks of oil-services companies, which could benefit from a stabilization in oil prices.

Tech stocks rose 1%, leading the S&P 500 higher. Energy stocks in the S&P rose 0.7% Wednesday, notching one of the biggest sector gains.

In commodity markets, gold futures fell 1.4% to $1186.40 an ounce. Crude-oil futures slipped 0.7% to $56.21 a barrel.

The yield on the 10-year Treasury note rose to 1.967% from 1.913% on Tuesday. Yields rise as prices fall.

Overseas stock action was mixed. France's CAC 40 rose 0.4%, while Germany's DAX lost 0.6%. Japanese stocks gained, pushing the Nikkei Stock Average to close above 20000 for the first time since 2000.

In economic news, U.S. existing-home sales rose 6.1% in March from February to an annual rate of 5.19 million, reaching the highest level in 18 months. Economists surveyed by The Wall Street Journal had expected March sales to rise to a rate of 5.03 million.

Write to Saumya Vaishampayan at saumya.vaishampayan@wsj.com

Access Investor Kit for The Dow Chemical Co.

Visit http://www.companyspotlight.com/partner?cp_code=P479&isin=US2605431038

Access Investor Kit for JMP Group, Inc.

Visit http://www.companyspotlight.com/partner?cp_code=P479&isin=US46629U1079

Access Investor Kit for MasterCard, Inc.

Visit http://www.companyspotlight.com/partner?cp_code=P479&isin=US57636Q1040

Access Investor Kit for McDonald's Corp.

Visit http://www.companyspotlight.com/partner?cp_code=P479&isin=US5801351017

Access Investor Kit for The NASDAQ OMX Group, Inc.

Visit http://www.companyspotlight.com/partner?cp_code=P479&isin=US6311031081

Access Investor Kit for Visa, Inc.

Visit http://www.companyspotlight.com/partner?cp_code=P479&isin=US92826C8394

McDonalds (NYSE:MCD)
Historical Stock Chart
From Mar 2024 to Apr 2024 Click Here for more McDonalds Charts.
McDonalds (NYSE:MCD)
Historical Stock Chart
From Apr 2023 to Apr 2024 Click Here for more McDonalds Charts.