IE 11 is not supported. For an optimal experience visit our site on another browser.

Stocks close out fourth straight week ahead

Stocks finished largely unchanged in lackluster trading Friday, with the S&P 500 squeezing out a small gain to finish at another record high, but a batch of disappointing tech earnings weighed down the market.

(Read more: Ultrawealthyinvestors turn bullish on stocks)

Despite the limp session, the Dow and S&P still logged their fourth-straight week higher.

The Dow Jones Industrial Average closed 4 points lower, dragged by Microsoft and Hewlett-Packard.

The S&P 500 eked out a gain to close at a record high, while the tech-heavy Nasdaq ended in the red. The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, fell below 13.

Among key S&P sectors, techs led the laggards, while health care gained.

Google and Microsoft tumbled after both tech giants disappointed the market after the closing bell Thursday with quarterly earnings and revenue that fell well below Wall Street expectations. At least eight brokerages slashed their price targets on Google, while seven cut their price targets on Microsoft.

(Read More:Microsoft, Google disappoint; shares pay the price)

Also among techs Advanced Micro Devices tumbled more than 10 percent after the chipmaker said its gross margins would fall, even as the company forecast better-than-expected revenue growth in the third quarter. Analysts were mixed on the stock: at least five brokerages raised their price targets on the company, while Credit Suisse and Morgan Stanley lowered their ratings.

(Read More: Market at new high despite some earnings misses)

Offsetting the losses in the tech sector, General Electric jumped to lead the Dow gainers after the conglomerate posted earnings that edged past expectations by a penny a share.

So far, one-fifth of S&P 500 companies have reported quarterly results, with 65 percent of companies posting earnings above estimates, while 51 percent missing expectations, according to the latest data from Thomson Reuters. If all remaining companies report earnings in line with forecasts, earnings will be up 2.9 percent from last year's second quarter.

Barry Knapp, head of equity portfolio strategy at Barclays noted that domestically orientated U.S. stocks have outperformed this quarter.

"This quarter, domestic revenues are starting to go up, which makes perfect sense given those stocks have been telling you that for six months. Companies with foreign-derived revenues remain under pressure," he said.

(Read More:Will earnings punch a hole in the US stock rally?)

The Dow and the S&P set fresh highs on Thursday, after Federal Reserve Chairman Ben Bernanke reiterated his commitment to easy monetary policy, in his second day of testimony before lawmakers.

"What we do know with more certainty is that in September the Fed is going to slow its asset purchases," said Knapp.

Beyond the U.S., markets will also watch a meeting of G-20 finance ministers in Moscow on Friday and Saturday to see if global policy makers can do anything further to calm recent volatility and boost global growth.

Treasury Secretary Jack Lew will be in attendance. Ahead of the meeting, Lew said the U.S.was once more a "source of strength" in the global economy.

"The U.S. is again a source of strength in the world economy, only five years after it was the center of a global crisis. This has not happened by accident," said Lew in an opinion piece published by the Financial Times. "In many parts of the world, such as Europe, growth is too weak to drive job creation, and it is critical to take steps to bolster private hiring."

Meanwhile, the Nikkei fell from a two-month peak on Friday, as investors unwound long positions in the futures and cash market ahead of upper house elections over the weekend. Other Asian stocks also reversed gains, with the Shanghai Composite easing over 1.5 percent and Australia's S&P ASX 200 index retreating further from the 5,000 mark.