U.S. stocks closed mixed Friday with tech stocks leading declines after major earnings in the sector disappointed.
Microsoft closed 7.17 percent lower, its worst day since Jan. 27, 2015, after missing on earnings. (Tweet This) Shares of Google's parent Alphabet declined more than 5 percent after reporting earnings that missed on both the top and bottom line as the firm increased investments in new projects. Both Microsoft and Alphabet closed in negative territory for the year so far and below their 50-day moving average for the first time since March 10.
The Dow Jones industrial average and S&P 500 ended little changed on the day and posted their second-straight week of gains amid mixed earnings.
"Part of it may just be the market is taking a breather off the rally we had at the beginning of April because the moves lower are on low volume and it doesn't feel panicky," said Lance Humphrey, portfolio manager at USAA Asset Management.
The Dow closed higher, above the psychologically key 18,000 level with Travelers recovering from Thursday's plunge to contribute the most to gains. Microsoft contributed the most to declines.
Information technology closed 1.9 percent lower, barely in positive territory for the year after briefly joining health care and financials in the red for 2016.
"The real story is tech. It's a group that got out of itself in terms of expectations," said Art Hogan, chief market strategist at Wunderlich Securities. "When you think about the recovery in general, the Dow and S&P are still in positive territory year-to-date. The Nasdaq never did."
The Nasdaq composite posted two-straight weeks of declines and is 2 percent lower year-to-date, more than 6 percent below its 52-week intraday high. The Dow and S&P are up more than 3 percent and 2 percent, respectively, for the year so far, and about 2 percent or less below their 52-week intraday highs.
Energy was the best S&P sector on the day, rising 1.33 percent, and is the top S&P 500 performer year-to-date with gains of nearly 11.5 percent.
U.S. crude oil futures settled up 55 cents, or 1.27 percent, at $43.73 a barrel, for its third-straight week of gains. The weekly oil rig count showed a decline of 8 to 343, down 360 rigs from the same period last year, according to Baker Hughes.
McDonald's reported earnings that beat on both the top and bottom line, and gave comparable same-store sales that topped expectations. The stock ended 0.2 percent lower, holding gains of 6.2 percent year-to-date.
Excluding restructuring costs, Caterpillar reported earnings of 67 cents a share, down from $2.07 a year ago. The company also trimmed its 2016 sales outlook range to the lower end of the previously forecast range, despite recent gains in commodity prices and signs of improvement in the China market. Shares fell 0.43 percent but are still up more than 15 percent year-to-date.
Visa reported earnings above expectations on both the top and bottom line, but lowered guidance for annual net revenue growth. The stock closed nearly 2.1 percent lower but are up 2 percent for the year so far.
Starbucks earnings matched estimates, while revenue was a touch lower. Global comparable same-store sales missed expectations. Shares fell 4.88 percent and are 3.9 percent lower year-to-date.
"Big companies, iconic brands, but nonetheless a very mixed picture," said Mark Luschini, chief investment strategist at Janney Montgomery Scott.
"We had a pullback yesterday, no technical damage, nothing life-threatening, but what happens from here?" he said.
In economic news, the Markit flash U.S. manufacturing PMI fell to 50.8 in April from 51.5 in March.
Treasury yields held mostly higher, with the near 0.81 percent and the 10-year yield around 1.88 percent.
The U.S. dollar index held nearly 0.6 percent higher, with the euro near $1.122 after hitting its lowest against the dollar since March 29. The yen hit its weakest level against the dollar since April 1 and was last near 111.68 yen against the greenback.
U.S. stocks closed lower Thursday, with telecoms leading declines. The Dow closed below the psychologically key 18,000 level, while the S&P 500 ended at 2,091.
"Technically the markets are in a much more positive trend. We have broken the May downtrend. Internals have improved," said Lance Roberts, chief investment strategist at Clarity Financial. But "this is a very short-term improvement."
Overseas, European stocks closed lower, but held weekly gains of nearly 1.7 percent or more. The DAX outperformed with a 3.2 percent gain for the week.
Asian stocks closed mixed, with the Hang Seng falling about 0.7 percent. The Shanghai composite closed up about 0.2 percent but down more than 3.8 percent for the week, its worst since the one ended Jan. 29.
The Nikkei 225 closed up 1.2 percent on the day and up 4.3 percent for the week, its second-straight weekly gain. A late-afternoon Bloomberg report that the Bank of Japan may consider applying negative rates to its lending program for financial institutions helped stocks rise and weaken the yen against the U.S. dollar.
The index gained 0.59 percent for the week, with American Express outperforming and Microsoft the worst performer.
The gained 0.10 points, or 0.00 percent, at 2,091.58, with energy leading eight sectors higher and consumer discretionary and information technology the only decliners.
The S&P rose 0.52 percent for the week, with energy the top performer and utilities the worst.
The Nasdaq composite closed down 39.66 points, or 0.8 percent, at 4,906.23.
The Nasdaq lost 0.65 percent for the week. Apple closed lower on the day and fell 3.8 percent for the week, holding in bear market territory or more than 20 percent below its 52-week intraday high.
The Russell 2000 gained nearly 1 percent to end in positive territory for the year so far.
The Dow transports closed nearly 1 percent higher with shares of Norfolk Southern leading advancers. The transports are up more than 7.5 percent year-to-date and out of correction territory, or within 10 percent of their 52-week intraday high.
The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, declined to end slightly above 13.
About three stocks advanced for every decliner on the New York Stock Exchange, with an exchange volume of 1.0 billion and a composite volume of 3.7 billion in the close.
High-frequency trading accounted for 49 percent of April's daily trading volume of about 6.99 billion shares, according to TABB Group. During the peak levels of high-frequency trading in 2009, about 61 percent of 9.8 billion of average daily shares traded were executed by high-frequency traders.
Gold futures for June delivery settled down $20.30 at $1,230.00 an ounce. The precious metal lost 0.37 percent for its second-straight weekly decline.
—CNBC's Peter Schacknow contributed to this report.