Updated from 4:16 p.m. EDT

Mostly solid earnings kept stocks positive for much of the session Thursday, but the broad averages closed lower as traders grew cautious ahead of a report on second-quarter economic growth.

The tech-heavy Nasdaq Composite was the worst performer, falling 15.99 points, or 0.77%, to 2054.47. Pressuring the index was a 15.9% decline in Tellabs ( TLAB) following the company's weak revenue forecast.

The Dow Jones Industrial Average, having risen 85 points earlier, finished with a loss of 2.08 points, or 0.02%, to 11,100.43, and the S&P 500 shed 5.21 points, or 0.41%, to 1263.19.

Robert Pavlik, chief investment officer with Oaktree Asset Management, said that while the market seems to be doing well over the short term, "after earnings we will have to deal with signs of a slowing economy. The question is how strong and how far we can go with this week's small rally."

About 1.82 billion shares changed hands on the New York Stock Exchange, with decliners beating advancers by a 9-to-7 ratio. Volume on the Nasdaq was 2.17 billion shares, and three stocks fell for every two that rose.

The 10-year Treasury bond was down 1/32 in price to yield 5.04%, and the dollar was lower against the yen and euro. The dollar was pressured by the fallout from Wednesday's beige book, the Federal Reserve's economic report, which found "evidence that the pace of growth has slowed" from June to mid-July.

On Thursday, the Commerce Department said durable-goods orders rose 3.1% in June after rising a revised 0.3% in May. Economists had expected the headline number to rise to 2%. Excluding transportation, durable-goods orders were higher by 1%.

At 8:30 a.m. EDT Friday, investors will get a look at the government's report on second-quarter GDP. Economists anticipate a growth rate of 3% after a rise of 5.6% the previous quarter.

"The problem is a lack of confidence and the fear of a hard landing instead of a soft landing" for the economy, said Al Goldman, chief market strategist with A.G. Edwards. "We are still unsure of what the Federal Reserve is going to do. People's confidence about the economy next year is what's important."

Crude rose as Israel reportedly dug in for an extended assault on Hezbollah positions in southern Lebanon after eight of its soldiers died in an ambush on Wednesday. September crude gained 60 cents to close at $74.54 a barrel Thursday after rising 19 cents in the previous session on an unexpectedly sharp decline in U.S. gasoline inventories.

To view Gregg Greenberg's video take on today's market, click here .

Stocks swung in a 100-plus-point range Wednesday before settling little changed in New York, as a crosscurrent of mixed earnings and economic news left traders groping for direction. On the session, the Dow lost 1.2 points to 11,102, and the Nasdaq lost 3 points to 2070.

On Thursday, Exxon Mobil ( XOM) posted second-quarter earnings of $10.36 billion, or $1.72 a share, beating forecasts for EPS of $1.64, according to Thomson First Call. Revenue rose to $99.03 billion from $88.57 billion last year. Shares gave back 13 cents, or 0.2%, to finish at $66.47.

Shell ( RDS-A) said second-quarter net income rose 40% from a year ago, bolstered by strong production and the ever-appreciating price of crude oil. Shell earned $7.32 billion in the latest quarter, up from $5.24 billion a year ago. Shell's exploration and production segment saw profits rise to $4 billion from $2.75 billion a year ago. Shell climbed $1.01, or 1.5%, to $70.51.

Sony ( SNE) swung to a first-quarter profit of $276 million, helped by a rebound in its electronics division, which benefited from sales of flat-panel televisions. Sales were $14.9 billion, up 11% from last year, as the company also saw a big revenue contribution from its movie studio. Sony jumped $2.56, or 6%, to $45.51.

A sore spot was Aetna ( AET), which plunged 16.8% after saying high costs cut second-quarter earnings and warning that enrollment growth will be down this year. Aetna shares sank $6.71 to close at $33.25.

Also on the economic docket, the Commerce Department said new-home sales fell 3% to an annualized rate of 1.13 million units in June, down from a revised 1.17 million units the previous month. Economists expected a decline to 1.16 million annualized units.

"There was a net downward revision of 81,000 to the previous three months' data, so this report is even weaker than the headline suggests," said Ian Shepherdson, chief economist with High Frequency Economics. "Sales still remain above the level implied by the mortgage applications numbers, but the gap has shrunk considerably."

Separately, the Labor Department said initial jobless claims fell by 7,000 to 298,000 last week. Economists expected claims to rise to 310,000 from 304,000 last week.

By sector, the Philadelphia Housing Sector Index sank 1.3% after the new-home sales report. Elsewhere, the Philadelphia Semiconductor Sector Index was higher by 1.1%, and the Amex Airline Index was off 1.3%.

Coca-Cola Enterprises ( CCE) saw second-quarter net income of $339 million, or 71 cents a share, up nearly 2% from the year-ago quarter. After adjustments, the company earned 57 cents a share, beating the Thomson First Call consensus by 2 cents. Quarterly revenue reached $5.5 billion, up 6% from last year and ahead of expectations. Coca-Cola was lower by 19 cents, or 0.9%, to $21.40.

Comcast ( CMCSA) said second-quarter net income came in at $460 million, or 22 cents a share, up 7% from a year earlier. Revenue rose to $6.2 billion from $5.6 billion. The Street expected earnings of 21 cents a share and revenue of $6.1 billion. Shares ended the session up $1.50, or 4.6%, to $34.02.

Medical-device maker Boston Scientific ( BSX) swung to a second-quarter loss of $4.26 billion, or $3.21 a share, compared with a profit of $205 million, or 24 cents a share, last year. The loss was blamed on charges absorbed from the purchase of Guidant. Excluding charges, the company earned 31 cents a share, beating estimates. However, revenue for the quarter missed estimates. Still, Boston Scientific rose 69 cents, or 4%, to $17.75.

Bristol-Myers Squibb ( BMY) said second-quarter earnings dropped to $667 million, or 34 cents a share, from $1 billion, or 50 cents a share. Excluding some items, the drugmaker earned 35 cents a share, 3 cents ahead of expectations. Overshadowing the report, however, was word that the Justice Department has started a criminal investigation of the company related to a proposed settlement with a generic-drug maker. Bristol-Myers dropped $1.95, or 7.5%, to $24.04.

XM Satellite Radio ( XMSR) said its second-quarter loss swelled to $229 million, or 87 cents a share, from $148.8 million, or 70 cents a share, a year ago. The loss was greater than expected by 20 cents, according to Thomson First Call. Still, the stock gained 53 cents, or 5.1%, to $10.89.

Cereal producer Kellogg ( K) had a second-quarter profit of $266.5 million, or 67 cents a share, up slightly from a year ago. Results beat the Thomson First Call average forecast for EPS of 65 cents. Kellogg was off $1.13, or 2.3%, to close at $47.80.

Shares of Blockbuster ( BBI) tanked even after the company swung to a second-quarter profit of $68.4 million, or 31 cents a share. However, excluding items, the video rental chain lost 13 cents a share, greater than an expected loss of 8 cents a share, according to Thomson First Call. The stock tumbled 56 cents, or 12%, to $4.12.

Casino operator Harrah's Entertainment ( HET) posted second-quarter earnings of $129 million, or 69 cents a share, rising from $106 million, or 65 cents a share, a year ago. The company said it had earnings from continuing operations of 95 cents a share. The Thomson First Call average estimate was for EPS of $1.02. Harrah's lost $3.49, or 5.5%, to $60.36.

Among ratings moves, Bear Stearns downgraded FedEx ( FDX) to peer perform from outperform. The stock has fallen 3.4% since Monday's close after rival UPS ( UPS) had weaker earnings and issued poor guidance. Shares ended Thursday down another 4.5% to $101.82.

Elsewhere, both Prudential and UBS raised their stock price targets for General Motors ( GM) after the company posted better-than-expected earnings on Wednesday. UBS raised its target to $24 from $18, while Prudential upped its target to $36 from $32. GM tacked on 11 cents, or 0.3%, at $32.11.

Overseas markets had strong sessions, with London's FTSE 100 gaining 0.9% to 5933 and Germany's Xetra DAX rising 1.4% to 5661. In Asia, Japan's Nikkei rose 2% overnight to 15,180, and Hong Kong's Hang Seng added 1.8% to 16,917.

Earnings reports will taper off as the week comes to a close, with Chevron ( CVX) and Office Depot ( ODP), among others, due tomorrow.