| NEW YORK
NEW YORK The S&P 500 fell for a fourth day and the Nasdaq dropped on Wednesday after a rare earnings stumble from Apple, while strong results from Boeing and Caterpillar lifted the Dow.
Apple Inc (AAPL.O), the most valuable U.S. company by market capitalization, reported sales late on Tuesday that fell short of Wall Street's expectations as the European economy sagged and consumers held off buying iPhones before a new version expected in the autumn.
Shares fell 4.3 percent to $574.97. Without Apple's losses, the S&P would have ended higher.
The price-weighted Dow industrials managed gains thanks to Caterpillar (CAT.N) and Boeing (BA.N). Caterpillar rose 1.4 percent to $82.60 after its quarterly profit easily beat Wall Street's expectations.
The world's largest maker of construction machines also raised its 2012 forecast.
"Expectations have been very low and this is a huge positive for the market," said Jack Ablin, chief investment officer at Harris Private Bank in Chicago.
Hope that the Federal Reserve will act soon to provide more stimulus to the economy also supported stocks. A report in The Wall Street Journal on Tuesday said Fed officials may be moving closer to taking more steps to aid the flagging economy.
Because of those expectations "bank stocks are performing relatively well," said Thomas Villalta, portfolio manager for Jones Villalta Asset Management in Austin, Texas. The KBW bank index .BKX was up 0.5 percent.
The Dow Jones industrial average .DJI rose 58.73 points, or 0.47 percent, at 12,676.05. The Standard & Poor's 500 Index .SPX was down 0.42 point, or 0.03 percent, at 1,337.89. The Nasdaq Composite Index .IXIC was down 8.75 points, or 0.31 percent, at 2,854.24.
Housing stocks ranked among the worst performers on data for June showed the biggest drop in U.S. single-family home sales in more than a year. The PHLX housing sector index .HGX tumbled 3 percent, pulled lower by a 3.7 percent drop in D.R. Horton (DHI.N) shares to $17.98.
The S&P 500 once again tested its 50-day moving average around 1,332. The benchmark index broke through that level on Tuesday but rebounded above it after reports the Fed was likely to provide more stimulus.
Boeing also helped the Dow when it reported a larger-than-expected increase in second-quarter profit and raised its full-year earnings forecast. The company said rising airplane deliveries offset higher pension costs. Boeing's stock gained 2.8 percent to $74.03.
Sixty-three percent of S&P 500 companies have surpassed earnings expectations so far, just a touch above the 62 percent long-term average, Thomson Reuters data showed.
Ford Motor Co (F.N) reported a better-than-expected second-quarter profit but roughly doubled its forecast for losses in Europe where a deepening economic crisis pushed the auto industry's sales to their lowest level in nearly 20 years. Ford shares edged down 1 percent to $8.97.
After the closing bell, shares of Internet company Zynga (ZNGA.O), a game publisher, dropped 37.6 percent to $3.17. The company cut its 2012 earnings outlook and reported results below expectations. Shares of Facebook (FB.O), which relies on Zynga for some 15 percent of its revenue, fell 7.5 percent to $27.15.
Shares of Visa (V.N) rose 1.1 percent to $123.58 in extended-hours trading after the credit card company reported an adjusted profit that topped Wall Street estimates and raised its full-year earnings forecast for the second time this year.
Volume was about 6.43 billion shares on the New York Stock Exchange, the Nasdaq and Amex, compared with the year-to-date daily average of 6.74 billion shares.
Advancers beat decliners on the NYSE by about 16 to 13 and on the Nasdaq by about 7 to 5.
(Additional reporting by Rodrigo Campos; Editing by Kenneth Barry)