Stocks rose on Friday, led by technology shares after a surprise takeover proposal in the software sector, data pointing to strength in consumer spending and a brighter outlook from McDonald's Corp.

Shares of business software maker BEA Systems Inc rose 33 percent to $18.15, helping to drive the Nasdaq index higher, after Oracle Corp proposed a takeover worth $6.66 billion.

The rally in tech shares followed a sell-off on Thursday that ended four days of Nasdaq gains, which pushed the index to its best level in 6 1/2 years.

People are looking for value across the board after yesterday's sell-off, said Dan McMahon, head of listed trading at CIBC World Markets Inc. People are afraid to fight the Fed. They have a lot of cash and are putting it to work.

The Dow Jones industrial average was up 62.92 points, or 0.45 percent, at 14,078.04. The Standard & Poor's 500 Index was up 7.56 points, or 0.49 percent, at 1,561.97. The Nasdaq Composite Index was up 30.76 points, or 1.11 percent, at 2,802.96.

McDonald's forecast third-quarter earnings above the average Wall Street estimate as September same-store sales rose on strength in Asia. Shares in the world's largest restaurant company rose 1 percent to $56.94.

In technology, Apple Inc gained after the iPod maker's price target was raised by Morgan Stanley. Its shares advanced 2 percent to $166.03.

According to government reports, retail sales rose more than expected last month despite worries the housing slump would cause consumers to keep a tight grip on their wallets.

The retail numbers really surprised everybody that they were as good as they came in, so there's still a focus on that, said Angel Mata, managing director of listed equity trading at Stifel Nicolaus Capital Markets in Baltimore.

In addition, data showed price rises last month were under control.

A Reuters/University of Michigan survey showing a drop in consumer sentiment briefly caused major indexes to retreat, but they soon recovered to move higher.

Coca-Cola Co rose after UBS raised its price targets on several consumer products companies. Coke rose 0.6 percent to $57.57.

On the downside, shares of diversified manufacturer General Electric Co dropped 2 percent to $40.79 after the company posted quarterly results in line with expectations.

(Additional reporting by Caroline Valetkevitch)