Stocks End Mixed, but Closes Week Higher

The Dow finished lower Friday after Caterpillar's profit missed estimates, but stocks overall closed the week in positive territory following a handful of robust earnings and a finalized bailout package for Greece.

The Dow Jones Industrial Average slipped 43.25 points, or 0.34 percent, to finish at 12,681.16, led by Caterpillar and Verizon . McDonald's was among the biggest blue-chip gainers.

The S&P 500 gained 1.21 points, or 0.09 percent to close at 1,345.01.

The tech-heavy Nasdaq rose 24.40 points, or 0.86 percent, to end at 2,858.83.

The CBOE Volatility Index, widely considered the best gauge of fear in the market, finished below 18.

For the week, the Dow gained 1.61 percent, the S&P rose 2.19 percent, while the Nasdaq added 2.47 percent.

Techs were the biggest gainers for the week among S&P sectors, while telecoms were the only laggards. For the week, Cisco was the biggest winner on the blue-chip index, while Caterpillar dragged.

Caterpillar slumped after the Dow component posted earnings that fell short of estimates, despite reporting revenue that topped expectations and raising its forecast for the year to reflect the acquisition of Bucyrus.

Among other Dow giants, GE reported a robust rise in profit, helped by strong international demand its heavy equipment including jet engines and electric turbines. But shares still closed lower.

Verizon slipped even after the firm topped earnings estimates, boosted by the wireless communication firm's iPhone sale. The wireless communication company also announced that its current COO Lowell McAdam will take over from long-time CEO Ivan Seidenberg, on Aug. 1. Seidenberg will remain chairman.

Meanwhile, McDonald's gained to hit an all-time high, after the fast-food chain posted earnings that exceeded expectations.

Microsoft reported earnings ahead of analyst forecastson Thursday afternoon, helped by sales of its Office software and Xbox game consoles; but profit from its Windows operating system fell on weak PC sales. Meanwhile, Barclays raised its price target on the tech giant to $30 from $28.

Advanced Micro Devices surged almost 20 percent after the chipmaker said revenue is expected to increase, as it bets new processors will steal business from rival Intel . However, analysts were mixed on the stock—at least two brokerages raised their price targets on AMD while Barclays cut its price target to $8 from $10.

Meanwhile, Apple is in early talks to join the bidding for online video website Hulu, according to sources.

On the IPO front, Apollo Residential Mortgage tumbled in their market debut as investors continued to remain cautious of the housing market prospects.

Meanwhile, Francesca's skyrocketed more than 60 percent in their first day of trading, valuing the women's specialty retailer at about $1 billion.

Volume was light with the consolidated tape of the NYSE at 3.13 billion shares, while 738 million shares changed hands on the floor.

Gold gained above the $1,600 level again as skepticism over Greece's bailout plan and concerns over the ongoing U.S. debt ceiling debate prompted investors to flee to the metal as a safe haven.

European banks and insurers rose after Greece’s private sector creditors agreed to take a 21 percent loss on their debt holdings as part of the Greek rescue plan.

European shares ended higherafter the conclusion of a fresh euro zone debt deal.

With the clock ticking toward an August 2 deadline to raise the U.S. debt ceiling, the focus shifts to Washington where efforts to avoid a U.S. default enter crunch time. The main obstacle remains the issue of tax increases that Obama's Democrats demand and Republicans vehemently oppose.

House Speaker John Boehner, said an agreement is "not even close" but continues to seek a way to avert a U.S. default. At a news conference, Boehner said the House has "done its job" toward resolving the impasse over raising the government's debt limit and says it's time for the Senate to act.

On Tap Next Week:

MONDAY: Dallas Fed survey, USDA food prices outlook; Earnings from Texas Instruments, Broadcom, Netflix
TUESDAY: S&P Case-Shiller home price index, consumer confidence, new home sales, Richmond Fed survey, 2-yr note auction; Earnings from BP, Deutsche Bank, Ford, GlaxoSmithKline, 3M, UBS, UPS, US Steel, Amazon.com, Electronic Arts
WEDNESDAY: Weekly mortgage apps, durable goods orders, oil inventories, 5-yr note auction, Beige Book; Earnings from Boeing, ConocoPhillips, Aetna, AutoNation, Delta, Dow Chemical, Aflac, Symantec, Visa, WholeFoods
THURSDAY: Weekly jobless claims, pending home sales, Kansas City Fed survey, Richmond Fed Lacker speaks, 7-yr note auction, San Francisco Fed Williams speaks, money supply; Earnings from AstraZeneca, Credit Suisse, DuPont, ExxonMobil, Royal Dutch Shell, Sanofi, Bristol-Myers Squibb, DR Horton, Kellogg, Motorola Solutions, Sprint, Time Warner Cable, Chesapeake Energy, MetLife, Motorola Mobility, Starbucks
FRIDAY: Employment cost index, GDP, Chicago PMI, consumer sentiment, farm prices; Earnings from Chevron, Merck

More on CNBC.com