NEW YORK (CNNMoney) -- Stock market investors finally broke even for 2011, after a choppy trading week.
The Dow Jones industrial average and Nasdaq rallied Friday, moving both indexes into positive territory for the year. The S&P 500 came close.
The Dow Jones industrial average () closed up 166 points, or 4.9% for the week, and the S&P 500 ( ) moved up 21 points Friday, or 6% for the week. The tech-heavy Nasdaq composite ( ) was up 38 points, or 7.6% for the week.
The S&P offered up its best weekly gain since July 2009, and for the Nasdaq, since March 2009. The Dow had its best weekly gain since the last week of June.
"Recent economic data reinforces our belief that the U.S. economy is not in a recession," said Joseph Tanious, market strategist at JPMorgan Chase Asset Management. "The consumer is in fact coming back and starting to spend."
Investors clung onto positive data, and by Friday appeared to have at least temporarily shrugged off fears over the fate of Europe and a drop in profit at JPMorgan Chase, the first major bank to report quarterly earnings.
"I would call this a 'pray trade' today," said Sam Ginzburg, head of capital markets at First New York Securities. "People are hoping there's some good news out of Europe this weekend or some other good news that will reward people for buying."
With looming uncertainty over Europe and several large U.S. banks poised to report paltry earnings, some investors and traders questioned whether this week's rally would be sustainable.
Google (Fortune 500) was among the biggest gainers Friday, a day after the search giant issued a stellar earnings report. The buying spilled over to other big tech names, with shares of Dow component Hewlett-Packard ( , Fortune 500) moving up.,
The Commerce Department released September retail sales figures before the opening bell that signaled a more positive reading on the buying patterns of the American consumer.
Meanwhile, thousands of consumers lined up outside Apple stores waiting to become among the first iPhone 4s buyers in another sign that spending is picking up. Apple's ( , Fortune 500) shares jumped Friday too.
Expectations of more robust consumer demand caused a run-up in stocks in the oil and industrials sectors. Among the biggest Dow gainers were Chevron (Fortune 500), Exxon ( , Fortune 500) and General Electric ( , Fortune 500). Oil prices hovered around a recent high of $87 a barrel.,
But investors are still wrestling with whether European leaders will take the appropriate steps to prevent massive fallout from Europe's debt crisis.
As finance ministers from the Group of 20 economies start a two-day meeting in Paris to discuss Europe's debt crisis, Treasury Secretary Timothy Geithner reiterated U.S. support to help Europe address its sovereign debt crisis.
In Friday morning trading, financial sector stocks hovered around break-even but occassionally moved into positive territory. Shares of JPMorgan Chase (Fortune 500), Goldman Sachs ( , Fortune 500), Morgan Stanley ( , Fortune 500), Credit Suisse ( ), and Bank of America ( , Fortune 500) had traded down yesterday and in early morning trading following JPMorgan Chase earnings.,
Economy: Early Friday, the Commerce Department reported retail sales rose 1.1% in September, an improvement after sales rose only 0.3% the month before. The data beat economists' expectations of a 0.6% increase.
The Bureau of Labor Statistics reported export prices rose 0.4%, and import prices rose 0.3% in September.
Because consumer spending makes up more than two thirds of the U.S. economy, these numbers are closely watched as a gauge of the recovery.
This development pushed European stocks higher Friday morning, but investors are expected to soon shift their focus to other problems -- such as the size of losses Greek bondholders may be forced to take.
European all finished the week higher. On Friday, Britain's FTSE 100 () added 1.2%, the DAX ( ) in Germany gained 0.9%, and France's CAC 40 ( ) ticked up 1%.
Investors appear to largely ignore the overnight Standard & Poor's downgrade of Spain's credit rating once again on weak growth and banking sector risks.
Asian markets closed lower following a report on Chinese inflation. The Shanghai Composite ( ) shaved 0.3%, the Hang Seng ( ) in Hong Kong dropped 1.4% and Japan's Nikkei ( ) lost 0.9%.
Oil for November delivery added $3.08 to $87.31 a barrel.
Gold futures for December delivery gained $13.50 to $1,682.00 an ounce.
Bonds: The price on the benchmark 10-year U.S. Treasury fell slightly, pushing the yield up to to 2.3%.
|What we want Apple to unveil at WWDC|
|Millennials squeezed out of buying a home|
|7 traits the rich have in common|
|Big Data knows you're sick, tired and depressed|
|Your car is a giant computer - and it can be hacked|
|Overnight Avg Rate||Latest||Change||Last Week|
|30 yr fixed||3.98%||4.26%|
|15 yr fixed||3.03%||3.15%|
|30 yr refi||4.09%||4.34%|
|15 yr refi||3.13%||3.22%|
Today's featured rates: