Stocks end lower as Dow, S&P retreat from highs; Apple soars 5%

The Dow and S&P 500 finished in negative territory Wednesday as investors digested the latest batch of corporate earnings, while stronger-than-expected results from Apple helped limit losses on the Nasdaq.

(Read more: After-hours buzz: Facebook, Qualcomm, Visa & More)

"It's only a matter of time before we get through 1,700 on the S&P 500—it's a psychological number, but if it breaks, you could see a lot of action," said Alan Valdes, director of floor operations at DME Securities. "There's still nearly $100 billion in cash right now. Volume's been anemic because people are on the sidelines—we may drift sideways for the rest of the summer."

(Read more: Yet another marketbear throws in the growl)

S&P 500

The Dow Jones Industrial Average declined 25.50 points, to end at 15,542.24, dragged by Caterpillar and AT&T, after logging a fresh closing high in the previous session.

The S&P 500 declined 6.45 points, to close at 1,685.94. Meanwhile, the Nasdaq eked out a gain of 0.33 points, to finish at 3,579.60.

The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, ended above 13.

"We have been monitoring the uptrend line support on the S&P from June 24," write Elliot Spar, market strategist at Stifel Nicolaus. "Today it intersects at 1,693 and the 10-day moving average is at 1,685. We have slipped below the former and the latter is being tested now. The major averages have been tracking their respective 10 day moving averages for the last two months. A clear break (two-consecutive days below a key level) on two or more of those averages would probably be the beginning of more than a one-day dip."

Most key S&P sectors ended in negative territory, led by energy and utilities, while techs closed modestly higher.

Among earnings, Apple jumped to lead the Nasdaq 100 gainers after the tech giant reported quarterly results that topped consensus. The company also announced that iPhone sales grew more than expected, helping to offset weak iPad sales. However, the company handed in current-quarter sales guidance that was below expectations.

(Read more: Coring Apple: Good earnings, but no bottom yet)

Ford rallied after the U.S. automaker blew past expectations, thanks to strong pickup truck demand in North America and record profits in the Asia-Pacific region.

Boeing exceeded Wall Street expectations and lifted its full-year earnings forecast, despite ongoing issues with its 787 model. But shares of the aerospace giant declined.

Meanwhile, fellow Dow component Caterpillar fell after the heavy-equipment maker missed quarterly projections and cut its full-year outlook. CEO Doug Olberhelman said the company experienced a number of headwinds during the quarter, but that he expects improvement during the second half of the year.

Broadcom plunged more than 15 percent to lead the S&P 500 laggards after the chipmaker forecast third-quarter revenue below expectations, underscoring worries that smartphone growth might be waning.

Facebook, Qualcomm, Visa and Akamai are among notable companies slated to post results after the closing bell.

(Read more: Here's what you needto know on earnings (so far))

To date, more than a third of S&P 500 companies have posted results this quarter, with 66 percent of firms exceeding earnings expectations and 53 percent topping revenue projections, according to the latest data from Thomson Reuters. If all remaining companies report earnings in line with estimates, earnings will be up 3.8 percent from last year's second quarter.

On the economic front, new home sales jumped 8.3 percent in June to a seasonally adjusted annual rate of 497,000 units, the highest level since May 2008, according to the Commerce Department. Still, the reading was below economists' projections for a 482,000-unit rate. Homebuilders were mostly in the red, dragged by KBHome and Toll Brothers.

Weekly mortgage rates dropped last week for the first time in 2-1/2 months following reassuring comments from Fed Chairman Ben Bernanke, but demand for home loans still declined, according to the Mortgage Bankers Association.

Meanwhile, conditions in the manufacturing sector ticked higher in July to 53.2, hitting a four-month high, according to a report from financial data from Markit. A reading above 50 indicates expansion.

European shares were boosted by better-than-expected flash PMI (purchasing managers' index) data for the euro zone. Euro zone PMI rose to an 18-month high in July. The euro traded higher after the news, hitting a one-month high.

"Encouraging news," wrote Howard Archer, an economist at IHS Global Insight in a note. "With the euro zone purchasing managers surveys supportive to the view that the euro zone has finally stopped contracting and could very well eke out marginal growth over the second half of the year."

However, shares in Asia declined after HSBC's flash estimate of Chinese PMI fell to an 11-month low of 47.7 in July, fueling fears of further slowdown in the world's second-largest economy.

(Read more: Is China about to launch a new round of stimulus?)

Dell gained after founder Michael Dell and Silver Lake raised their bid to $13.75 a share in cash for the PC maker. The company said the special shareholder meeting will be delayed to Aug. 2 while it considers the new offer.

Treasury prices extended their declines after the government auctioned $35 billion in 5-year notes at a high yield of 1.410 percent. The bid-to-cover ratio, an indicator of demand, was 2.46.

—By CNBC's JeeYeon Park (Follow JeeYeon on Twitter: @JeeYeonParkCNBC)

On Tap This Week:

THURSDAY: Durable goods orders, jobless claims, natural gas inventories, Kansas City Fed mfg index, 7-yr note auction, Fed balance sheet/money supply, weekly rail numbers, USDA food prices outlook; Earnings from Bristol-Myers, GM, 3M, Colcate-Palmolive, Credit Suisse, Sirius XM,, Gilead Sciences, Starbucks, Zynga
FRIDAY: Consumer sentiment, AT&T Next debuts; Earnings from Tyco

What's Trending on