US Markets

Stocks close lower for the week amid Greece, earnings

We're not in a bubble, too cautious: Pro
Market bubble debate
Pisani's market open: MS comments on China

U.S. stocks closed mixed on Friday, posting a loss for the week, as investors digested earnings reports and awaited resolution on the Greece debt talks. (Tweet This)

"I think overall in spite of Nike's good earnings... the stock market, especially the large caps, are just not ready to break out here," said Marc Chaikin, CEO of Chaikin Analytics.

The Dow Jones industrial average closed 56.66 points higher after briefly gaining more than 100 points. Leading blue chips, Nike ended more than 4 percent higher at a record following a strong earnings report.

In contrast to the blue-chip gains, the Nasdaq Composite dipped 1 percent as tech stocks declined. Micron plunged 18 percent to below its 52-week low on a weak earnings report. The iShares Nasdaq Biotechnology ETF (IBB) closed about 0.80 percent lower. Information technology fell about 1 percent to weigh on the S&P 500.

The Dow and S&P ended about 0.40 percent lower to post their first weekly loss in three.

The Nasdaq Composite closed 0.71 percent lower for the week, its fourth weekly drop in five, despite closing at records on Monday and Tuesday.

"Greece is certainly the focus. It's the main driver of investors not going into this weekend in any big way on a summer Friday ahead of what could be a big decision over the weekend," said Art Hogan, chief market strategist at Wunderlich Securities.

Read MoreCheckmate: is this Greece's final, final deadline?

Greek Prime Minister Alexis Tsipras called an urgent cabinet meeting on Friday evening to discuss a bailout deal, Reuters reported.

The country's finance minister Yanis Varoufakis said in a Reuters report that Saturday's meeting with the euro group of finance leaders will try to converge on a deal that includes debt and funding. He added that Greece has made concessions and that Athens rejects a 5-month funding proposal from lenders.

Earlier, European Commission President Jean-Claude Juncker said in a Reuters report he was "quite optimistic but not over-optimistic" of a deal with Greece on a cash-for-reform deal at a crucial meeting of euro zone finance ministers on Saturday.

The cash-strapped nation failed to reach a resolution with its creditors during several meetings this week. Leaders are scheduled to meet Saturday for another attempt to reach a deal ahead of the imminent June 30 repayment deadline.

Bond yields rose, with the U.S. 10-year Treasury yield near 2.48 percent and the 2-year note yield near 0.70 percent. The 30-year yield climbed to 3.25 percent, the highest since last September 24. German 10-year bund yields leaped to 0.92 percent.

"The bump up in yields suggests that a Greece deal is imminent," said Peter Cardillo, chief market economist at Rockwell Global Capital.

What's in a Bund?

The U.S. dollar traded higher, posting its first positive week in 4, with the euro below $1.12.

European stocks edged out a mostly higher close amid hopes of resolution on Greece. Chinese stocks plunged on Friday, with the Shanghai Composite tumbling more than 7 percent, its biggest one-day loss in five months.

Read MoreMorgan Stanley: It's no time to buy Chinese stocks

In the United States, "the market seems range-bound. You've got a few good days. ... Then you've had a bit of profit taking," said James Meyer, chief investment officer at Tower Bridge Advisors."The next market-moving thing is earnings season itself."

The bulk of second-quarter earnings reports come in July.

Analysts note the S&P 500 has remained between 2,130 and 2,070 for the last few months.

The only U.S. economic data out Friday was the Michigan Consumer Sentiment, which posted a final read of 96.1 for June.

"I think it's pretty consistent with the general trajectory of things," said Todd Hedtke, vice president for investment management at Allianz Investment Management.

"I still think wages are the one thing to watch for the Fed," he said. "The short-term here is Greece. After that, the Fed's story comes back into the limelight."

The Russell 2000 held lower amid the annual rebalancing of the index on Friday.

Read More These stocks may be winners of Russell's rebalance

Stocks closed lower on Thursday as another meeting between Greece and its creditors failed to reach a deal. Health care stocks rallied on the U.S. Supreme Court's decision upholding federal subsidies for health plans under the Affordable Care Act.

The health care sector continued to rally on Friday, touching a fresh intraday high. It is the best performing sector in the S&P 500 so far this year.

The Dow Jones industrial average closed up 56.66 points, or 0.32 percent, at 17,947.02, with Nike leading gains and Intel the greatest laggard.

The Dow transports eked out a gain of 0.03 percent for the day but closed 2.01 percent lower for the week.

The closed down 0.70 points, or 0.03 percent, at 2,101.61, with information technology leading three sectors lower and utilities leading advancers. Telecommunications was the best performer for the week, up 1.16 percent.

The Nasdaq closed down 31.68 points, or 0.62 percent, at 5,080.51.

The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, traded near 14.

About eight stocks declined for every seven advancers on the New York Stock Exchange, with an exchange volume of roughly 1.8 billion and a composite volume of about 4.8 billion in the close.

High-frequency trading accounted for 49 percent of June to date's daily trading volume of about 6.1 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.

Crude oil futures for August delivery settled down 7 cents, or 0.12 percent, at $59.63 a barrel. Gold futures settled up $1.40 at $1,172.90 an ounce.

Major U.S. Indexes

In corporate news:

Zoetis—Canadian drug maker Valeant is interested in buying the animal health company, according to a Wall Street Journal report.Shares of Zoetis plunged 12 percent on Friday.

Nike—Nike reported quarter profit of 98 cents per share, beating estimates by 15 cents, with revenue also above estimates. The athletic shoe and apparel maker was able to register higher prices and increased profit margins, among other positive factors.

Read MoreEarly movers: FNL, CYH, NKE, MU, JD, HMC & more

Micron Technology—Micron missed estimates by 2 cents with adjusted quarterly profit of 54 cents per share, with revenue also slightly below forecasts. Micron also gave a downbeat forecast for the current quarter, amid a continuing decline in computer chip prices.

CNBC's Peter Schacknow contributed to this report.