Signs that a solution to Greece's debt problems could be near helped the stock market eke out its first week of gains since April.
Germany softened its conditions for giving Greece more loans on Friday, putting Greece closer to getting more financial support and avoiding a default. Global financial markets were rattled earlier this week when a default by Greece seemed imminent.
The Dow Jones industrial average closed up 42.84, or 0.4 percent, at 12,004.36. The Standard & Poor's 500 index rose 3.86, or 0.3 percent, to 1,271.50.
The gains weren't widespread. The technology-focused Nasdaq composite index lost 7.22, or 0.3 percent, to 2,616.48 after signs that large companies are faltering.
BlackBerry maker Research In Motion Ltd. plummeted 21 percent after giving a surprisingly weak forecast for the current quarter and the remainder of the year. The company is struggling to compete with Apple Inc.'s iPhone and Android phones. Other technology companies like Intel Corp. and Cisco Systems Inc. fell 0.3 percent, the biggest drop among the 10 industries that make up the S&P index.
Among other U.S. companies, credit research firm Moody's Corp. dropped 5 percent after analysts downgraded the company. McGraw-Hill Cos., which owns rival rating agency Standard & Poor's, fell nearly 4 percent. And BJ's Wholesale Club Inc. dipped nearly 1 percent after two private equity firms made a bid for the warehouse club chain.
The S&P 500 finished the week just 0.04 percent higher than where it started. That tiny gain was enough to break a six-week losing streak that went back to the last week in April. The S&P 500 index hits its high for the year on April 29, and has fallen nearly 7 percent since then.
Nearly two stocks rose for every one that fell on the New York Stock Exchange Friday. Consolidated volume came to 4.4 billion shares.
The BATS 1000 rose 43.41 points, or 0.30%, to close at 14,527.15.
Stocks of local and regional interest:
Capitol Federal Financial rose 1 cents, or 0.08%, to close at $11.89.
Cerner Corp. rose 84 cents, or 0.72%, to close at $117.08.
Commerce Bancshares Inc. rose 18 cents, or 0.44%, to close at $41.39.
Compass Minerals fell 68 cents, or 0.80%, to close at $84.85.
DST Systems Inc. fell 13 cents, or 0.25%, to close at $51.10.
Garmin Ltd. rose 67 cents, or 2.03%, to close at $33.66.
Great Plains Energy rose 23 cents, or 1.12%, to close at $20.84.
H&R Block Inc. rose 2 cents, or 0.13%, to close at $15.40.
Inergy L.P. rose 68 cents, or 1.99%, to close at $34.82.
Kansas City Southern rose $1.51, or 2.90%, to close at $53.53.
Sprint Nextel Corp. fell 2 cents, or 0.38%, to close at $5.19.
UMB Financial Corp. rose 14 cents, or 0.34%, to close at $41.02.
Waddell & Reed Financial Corp. rose 3 cents, or 0.08%, to close at $36.19.
YRC Worldwide Inc. fell 1 cents, or 1.64%, to close at $0.60.