Updated from 4:04 p.m. EDT

Tech stocks and blue-chips collected big gains Thursday as the major averages raced to their third straight solid session. Financials benefited from news that a bailout package has been arranged for Brazil, but the retail sector was a little weaker after the nation's chain stores reported mixed results for July.

The Dow Jones Industrial Average ended with a gain of 255.87 points, or 3%, to 8712.02. The Nasdaq rose 35.62 points, or 2.8%, to 1316.52, and the S&P 500 added 28.69 points, or 3.3%, to 905.46.

Stocks were flat to slightly lower in the early part of the session, but buyers became interested around the midpoint of the day and the averages climbed steadily from there on.

Financial services giants Citigroup ( C) rose 8% and J.P. Morgan Chase ( JPM) was up 10% on the New York Stock Exchange after the International Monetary Fund said it will pump $30 billion to restore depositor and investor confidence in Brazil.

FleetBoston ( FBF) climbed 8%. Several big banks have been under pressure in recent weeks for a variety of reasons, including worries that they might have too much exposure to ailing economies such as Brazil's. The NYSE Financial Index was up 4.1%.

Separately, Citigroup said after the close Wednesday that it will start expensing stock options and will certify its financials with the Securities and Exchange Commission. Intel ( INTC), on the other hand, announced that it wouldn't account for options given to employees as an expense. The chip heavyweight did sign off on its financial statements though. Intel's stock was up 3.7% to $18.38.

A number of retailers released monthly sales figures Thursday, including the world's biggest retailer, Wal-Mart ( WMT). The company reported a 4.5% rise in same-store sales and said it would meet or possibly beat estimates for the second quarter. Shares of Wal-Mart rose 1.7% to $49.19.

Women's clothier AnnTaylor ( ANN) said sales at stores open at least a year rose 7.4% in July. Shares were up 9% to $26.36. Teen apparel merchant Pacific Sunwear ( PSUN) tacked on 1% to $18.49 after the company said it would beat analysts' expectations for the second quarter due to a 7.2% rise in July same-store sales.

On the whole, the sector was weaker. The Dow Jones U.S. Retail Index was lower by 0.1%, but that was well above its worst level of the day.

The news flow had been relatively quiet after the opening of trading, but General Motors ( GM) changed that in the afternoon. The automaker reaffirmed its prior forecast, saying it should still earn 60 cents a share in the third quarter and $6 a share for the full year. Shares of GM closed up 34 cents to $44.20.

A couple of economic reports were released before the bell but seemed to have little impact on trading. The Labor Department said the producer price index , a key measure of inflation, fell 0.2% in July as a result of a drop in car and truck prices. Analysts were looking for a 0.1% increase. Excluding the food and energy sectors, prices dropped 0.3%.

In a separate report, the Labor Department said initial jobless claims fell to 379,000 in the week ended Aug. 3, compared with 386,750 the previous week. Economists were expecting the number of first-time jobless insurance claims to come in at 385,000.

Among the companies report earnings, Qwest ( Q) posted a second-quarter loss of $1.14 billion, or 68 cents a share. The company lost $3.31 billion, or $1.99 a share, in the year-ago quarter.

This year's number includes various charges, including the writeoff of the company's remaining investment in KPN Qwest, a European network operator. On what it called a normalized basis Qwest said its loss was 13 cents a share, reversing a year-ago normalized profit of 8 cents, as revenue plunged 17% to $4.32 billion. Qwest finished unchanged at $1.20.

El Paso ( EP) rose 1% to $14.89 after reporting a quarterly loss of 8 cents a share, citing weaker energy prices and an industry-wide slowdown. On a pro forma basis, the company said it earned 44 cents a share, 2 cents better than Wall Street's estimates.

Standard & Poor's said handheld computer maker Palm ( PALM) will be replaced by Monsanto ( MON) in the S&P 500, citing Palm's low-ranking market capitalization and paltry share price. Monsanto was up 9% to $17.34, while Palm fell 16% to 82 cents.

Federal investigators are reportedly willing to offer immunity to a Merrill Lynch ( MER) trading assistant in exchange for his testimony against Martha Stewart in the ImClone Systems ( IMCL) insider-trading case, according to The Wall Street Journal. The news comes one day after a grand jury indicted ImClone's former CEO Samuel Waksal for securities fraud.

U.S. Treasury issues were lower around 4 p.m. EDT. The 10-year note was down 5/32 at 99 25/32, yielding 4.399%. The long bond was off 3/32 at 102 5/32 and yielding 5.228%.

In Europe, London's FTSE 100 gained 3.6% to 4241, while Germany's Xetra DAX climbed 6.2% to 3679. Japan's Nikkei 225 fell 0.4% to 9800, and Hong Kong's Hang Seng closed down 0.2% to 9962.