Updated

U.S. stocks rose Wednesday as investors bet that technology shares would lead gains this year, led by a rally in shares of Apple Inc. (AAPL), and as Alcoa Inc.'s (AA) stronger-than-expected profit lifted optimism about fourth-quarter earnings.

The Dow Jones industrial average rose 25.56 points, or 0.21 percent, to end at 12,442.16. The Standard & Poor's 500 Index was up 2.74 points, or 0.19 percent, at 1,414.85. The Nasdaq Composite Index was up 15.50 points, or 0.63 percent, at 2,459.33.

Click here to visit FOXBusiness.com's Investing Center.

Apple rose to a record high, boosting both the Nasdaq and S&P 500 index. Several brokerages raised their price targets on the stock a day after Apple introduced its new media-playing cell phone.

Limiting gains were declines in major energy companies, such as ConocoPhillips (COP) and Chevron Corp. (CVX), after a nearly 3 percent drop in oil prices — a third day of losses.

"We're having a rotation out of what was last year's best-performing energy sector and into what people hope is this year's, which looks like technology," said Todd Clark, director of stock trading at Nollenberger Capital Partners in San Francisco. But, he said, oil's fall is a positive for the broader market.

The move to technology helped drive positive momentum in afternoon trading, analysts said. Stocks started the day weaker.

Apple shares gained 4.8 percent, or $4.43, to $97, after hitting a record high of $97.80.

Shares of Alcoa, a Dow component, jumped 6 percent, or $1.71, to $30.23 after the world's biggest aluminum maker posted results late on Tuesday, marking the start of the fourth-quarter earnings reporting season.

"Alcoa sets a positive tone for next week when reports are going to be coming in hot and heavy," said Larry Peruzzi, senior equity trader at The Boston Company Asset Management, a Mellon subsidiary in Boston.

In other earnings news, Sears Holdings Corp. (SHLD) forecast a jump in fourth-quarter profit. Sears shares were up 3.5 percent, or $5.86, to $172.09.

Other gainers included Altria (MO). Credit Suisse said it raised its price target on Altria and other tobacco companies, saying the sector is on better footing than it was when Credit Suisse initiated coverage of the sector in October. Shares of Altria rose 1.2 percent, or $1.07, to $89.19.

Chevron said late on Tuesday it expects financial results in the fourth quarter to be hurt by lower commodity prices.

Shares of Chevron fell 1.7 percent, or $1.22, to $69.41, while shares of ConocoPhillips dropped 3 percent, or $1.98, to $64.53.

In other corporate news, The Wall Street Journal reported that Delta Air Lines Inc. and Northwest Airlines Corp. are in talks on a possible link-up.

Trading was active on the New York Stock Exchange, with about 1.57 billion shares changing hands, below last year's estimated daily average of 1.84 billion, while on Nasdaq, about 2.31 billion shares traded, above last year's daily average of 2.02 billion.

Advancing stocks outnumbered declining ones by a ratio of about 17 to 16 on the NYSE and by 15 to 14 on Nasdaq.

Click here to visit FOXBusiness.com's Investing Center.