Stocks gain for week, inch toward all-time highs

dow week march 1
Click the chart for more stock market data.

U.S. stocks ended higher Friday after a report showed that the nation's manufacturing activity picked up more than expected in February.

The Institute for Supply Management's manufacturing index rose to 54.2, a surprise improvement from January's 53.1 and the best reading since June 2011.

The Dow Jones industrial average and Nasdaq rose 0.3%, while the S&P 500 edged up 0.2%, recovering from nearly 1% declines earlier in the day. The Dow is now less than 1% away from its all-time high reached in 2007, and the S&P is off less than 4%.

The day's gains helped all three indexes finish the week with modest gains. The Dow rose 0.6%, while the S&P 500 edged up 0.2%. The Nasdaq ticked up 0.3%.

The strong manufacturing report "takes a little bit of the sting away from the sharp decline in personal income in January," said Jim Baird, chief investment strategist for Plante Moran Financial Advisors.

The Commerce Department reported that personal income fell 3.6% in January, which was the steepest month-to-month drop in 20 years and much worse than economists were expecting. Personal spending notched up 0.2%, as expected.

Related: Spending cuts: When they'll really bite

While manufacturing activity continues to pick up, the near-term outlook for the economy remains murky, said Baird, noting that the consumer sector is particularly vulnerable.

"Confidence has been improving, but the looming cuts in federal spending could throw some cold water on that emerging optimism," he said.

Assuming that no last-minute deal is reached, $85 billion in automatic spending cuts will go into effect Friday, although it may be weeks or months before that pain is felt.

In other economic news, the University of Michigan's final edition of consumer sentiment for February came in better than expected at 77.6. A government report showed that construction spending declined 2.1% in January.

Related: Best Buy buyout push ends

On the corporate front Friday, Best Buy's (BBY) stock gained ground after the electronics retailer reported its quarterly revenue rose slightly year-to-year, despite the closure of 49 stores.

Best Buy also announced that founder Dick Schulze will not buy out the retailer. Schulze, who owns about 20% of Best Buy's shares, was leading a group that wanted to take the company private. The company had given him until Thursday to present a qualified offer, but CEO Hubert Joly said the deadline passed without an offer.

Groupon (GRPN) shares rallied after the daily deals site announced that embattled CEO Andrew Mason would be replaced.

Gap (GPS) shares edged up following fourth-quarter earnings Thursday that beat expectation s.

Shares of (CRM) gained following strong earnings announced after the bell.

Following the closing bell, Warren Buffett's Berkshire Hathaway (BRKA) raised its per-share book value 14.4% in 2012, less than the S&P 500's 16% total return. Shares were flat after hours.

Fear & Greed Index: Greed is good

Forced spending cuts: How we got here
Forced spending cuts: How we got here

Meanwhile, investors also digested lackluster economic data out of Europe and Asia.

Eurostat reported eurozone unemployment edged up to 11.9% in January. Italy's unemployment was slightly lower, at 11.7%, but its youth unemployment has reached a staggering 38.7%.

In Asia, China's Purchasing Managers Index fell to 50.1 in February from 50.4 in January, signaling a stalling economic recovery.

European markets and Asian markets ended mixed Friday.

The dollar rose versus the euro, the British pound and the Japanese yen.

Oil and gold prices inched lower.

The price on the 10-year Treasury rose, pushing the yield down to 1.85% from 1.89% late Thursday.

CNNMoney Sponsors