NEW YORK (CNNMoney) -- The Dow broke its six-week losing streak on Friday, ending the day with modest gains following a sharp decline in oil prices and another wave of mixed economic data.
However technology shares continued to struggle, with the Nasdaq posting a weekly decline of 1%. The S&P also broke its six-week losing streak, barely, gaining less than 0.1% for the week.
The Dow Jones industrial average () rose 43 points, or 0.4%, to close at 12,004. It was the first weekly gain for the blue chips since late April.
The S&P 500 () gained 4 points, or 0.3%, to 1,271.50; ending the week essentially unchanged.
"At the pace we've been selling off, you should expect bounces along the way, but the question is whether these short-covering bounces are part of a shift in market sentiment," said Quincy Krosby, market strategist with Prudential Financial.
Technology shares weighed on the broader market, after Research in Motion (slashed its full-year earnings outlook by 30% and announced layoff plans after the market closed Thursday. Shares plummeted more than 20%.)
The tech-heavy Nasdaq Composite () fell 7 points, or 0.3%, to 2,616.
With less than an hour before the closing bell, credit agency Moody's said it was putting Italy on watch for a possible credit rating downgrade. The news took some steam out of Friday's rally, but it wasn't enough to end the Dow and S&P's modest gains.
Earlier this week, oil prices plunged more than 4% on Greek debt woes and are now trading at four-month lows. Oil prices settled down an additional 2% on Friday to $93.01 a barrel.
"The froth we saw in commodities a month ago has dissipated and it's helping lower inflation expectations," said Jim Dunigan, managing executive of investments for PNC Wealth Management.
U.S. stocks closed mixed on Thursday, as weakness in the tech sector countered stronger-than-expected reports on the housing market and unemployment.
Economy: Investors got another mixed bag of economic data to work through. The University of Michigan consumer sentiment survey for June fell to a reading of 71.8, worse than the 73.5 reading that economists had expected.
While economic data has largely disappointed in recent months, there may be a slight uptick in optimism emerging.
The Conference Board's Leading Economic Indicators rose 0.8% in May, compared with the rise of 0.4% economists had forecasted.
Shares of BankRate.com () fell 1% in its public debut. The financial data website priced its initial public offering at $15 a share late Thursday and started trading under the ticker "RATE."
Gold futures for August delivery rose $9.20 to $1,529.20 an ounce.
Bonds: The price on the benchmark 10-year U.S. Treasury fell, pushing the yield up to 2.95% from 2.91% late Thursday.
Also related to the Greek debt situation, German Chancellor Andrea Merkel backed away from her earlier statement that private banks be required to help bail out Greece's economy.
European stocks closed solidly higher. Britain's FTSE 100 edged up 0.3%, the DAX in Germany was up 0.8% and France's CAC 40 gained 1%.
|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.84%||3.85%|
|15 yr fixed||2.96%||2.96%|
|30 yr refi||3.95%||3.96%|
|15 yr refi||3.06%||3.06%|
Today's featured rates: