NEW YORK - Maybe American consumers are better off than everybody thought.

A key measure of consumer confidence rose unexpectedly this month. Meanwhile, Americans' spending and income rose in April, giving stocks their third straight day of gains Friday. The market was still down slightly for the week.

The Thomson Reuters/University of Michigan Consumer Sentiment index rose to 74.3 in May, above analysts' estimates of 70. Concerns about gas prices and inflation had knocked the gauge down in March and April.

Both personal income and spending rose 0.4 percent in April, in line with what economists expected, according to the Commerce Department. Still, higher prices for food and gas ate up most of the gains in income. The report from the Commerce Department lags by a month, so the recent decline in gas prices isn't reflected in the figures.

The Dow Jones industrial average rose 38.82 points, or 0.31 percent, to 12,441.58. The Standard & Poor's 500 index rose 5.41 points, or 0.41 percent, to 1,331.10. The Nasdaq composite rose 13.94 points, or 0.50 percent, to 2,796.86.

The week started with bad news from Europe. Another downgrade of Greece's already-weak credit rating, a warning on Italy's debt, and a defeat of Spain's ruling party deepened worries about Europe's fiscal crisis.

U.S. stock indexes hit their highs of the year April 29 after a strong run of corporate earnings. The S&P 500 has lost 2.4 percent since then.

Marvell Technology Group Ltd. jumped 11 percent. The maker of chips for data-storage and BlackBerry's smartphones reported a slight drop in earnings. But Marvell's CEO forecast higher sales in the current quarter.

Another chipmaker, Broadcom Corp., rose 5 percent. FBR Capital Markets said Broadcom should benefit from growing demand for smartphones. FBR put the company on its list of top picks.

CVS Caremark Corp. rose 1.7 percent after the pharmacy-benefits company won a three-year contract from the Blue Cross Blue Shield Federal Employee Program.