The Week on Wall Street

Stocks rallied on Friday but still ended the week lower because of a three-day selloff sparked by higher interest rates.

The Dow Jones Industrial Average closed with a weekly loss of 1.78%. The S&P 500 ended the week with a decline of 1.87%, while Nasdaq Composite fell 1.54%.

The tech sector posted the best weekly sector performance, declining 1.0%. The interest-rate sensitive utilities sector, was the biggest weekly loser, falling 5.4%, followed by basic materials and health care, which both saw weekly declines of 2.4%.

Stocks began the week on a positive note as the markets closed Monday with modest gains. Investors shrugged off sharp declines in China and higher energy prices amid strong mergers activity continued. The Dow and the S&P 500 both closed at new record highs but overall gains were limited.

Acquisitions activity continued, with EMS firm Flextronics International said it was buying rival Solectron for $3.6 billion in a cash-and-stock deal, while Palm said it sold a 25% stake in the company for $325 million to a private equity firm.

Weakness creeped in on Tuesday as investors used rising bond yields and diminished outlook for an interest rate cut as reasons to take money off the table.

"Stronger economic data and a further rise in bond yields have led to profit-taking," said Michael Sheldon, chief market strategist at Spencer Clarke. "There is a strong likelihood that equity prices may consolidate here before moving higher later in the summer."

The Dow fell nearly 130 points, its biggest one-day drop since May 10. Selling was across the board with all of the S&P 500 sectors in the red. Declining shares outpaced advancers on the New York Stock Exchange by about four to one.

Market Wrap

Debating the value of investing in bonds vs. investing in stocks, with C. Kim Goodwin, Credit Suisse managing director and head of equities for asset management; Michael Pond, Barclays Capital director and fixed income strategist and CNBC's Maria Bartiromo

Thursday

The markets declined sharply on Thursday with outsized losses seen for interest-rate sensitive stocks after yields on the benchmark 10-year Treasury climbed about 5% following rate hikes by foreign central banks. Crude oil's charge above $67 a barrel also added to negative investor sentiment.

Rate-sensitive utilities and homebuilding stocks were among the day's losers, along with dividend paying telecoms such as AT&T .

M&A news did little to comfort investors but shares of Biomet gained after the medical device maker accepted a sweetened takeover bid from a group of private equity firms.

"Bond yields have been rising and people stepped back from the market but came back in today and invested money that was piling up on the sidelines in the past couple of days," said David Goerz, chief investment officer at HighMark Capital.

Chip stocks were in focus after National Semiconductor reported quarterly results after Thursday's close of trading.