More Videos:

S&P, Nasdaq Clinch Sixth Quarterly Gain Though Markets Close Mixed

Tickers in this article: BK DHI GM LEN MNKD PHM YHOO ^DJI ^GSPC ^IXIC
NEW YORK ( TheStreet) -- The S&P 500 and Nasdaq clinched their sixth consecutive quarterly gain, a feat not seen in more than a decade, even though benchmark U.S. indices closed mixed.

In the second quarter of 2014, the S&P added 4.7%, the Nasdaq climbed 5% and the Dow Jones Industrial Average  gained 2.2%.

Pending home sales in May jumped 6.1% to 103.9, an eight-month high and the highest monthly gain since April 2010. The month-on-month jump was also the highest since April 2010, significant given that increase was driven by the looming expiration of tax credits for first-time buyers. Economists had expected a 1.5% rise. However, the measure still remains 5.2% below a May 2013 reading of 109.6.

June 30 Premarket Briefing: 10 Things You Should Know

Stocks End Week Lower on Rate Hike Chatter, Sparse Macro News

European Stocks Are Mixed, Steady Inflation in Eurozone

Major homebuilders rallied in response.  D.R. Horton  closed 3.2% higher to $24.58, while  Lennar Corporation gained 0.87% to $41.95 and PulteGroup added 0.4% to $20.16.

Strength in the housing recovery overshadowed weakness in manufacturing data. The Chicago PMI slipped to 62.6 in June from a seven-month high a month earlier. Still, the measure remains above the 50-level which is indicative of expansion.

"Activity [is] slowing a little between May and June, but it remains at a high level supported by the strength in production and new orders," MNI Indicators' chief economists Philip Uglow wrote in a note.

At market close, the S&P 500 had slipped 0.04% to 1,960.23, the Nasdaq added 0.23% to 4,408.18, and the Dow dropped 0.15% to 16,826.6.

Oil prices slid as fears extended fighting in Iraq would affect supply eased slightly. Brent crude slipped 0.75% to $112.45 a barrel, while U.S. crude dipped 0.34% to $105.38 a barrel. This was even as leaders of ISIS, now holding regions of northern and western Iraq, declared a separate Islamic state.

European and Asian stocks closed mixed with the Shanghai, Nikkei and DAX higher, and the Hang Seng, FTSE 100 and CAC 40 lower. Eurozone inflation was stable at 0.5%, its ninth straight month below the European Central Bank's 1% barometer for deflation and far from its target 2%.

Argentina is facing technical default on interest payments to bondholders Monday. Should the South American nation not pay, it will then enter into a 30-day grace period to make a payment and avoid its second default since 2001.

In corporate news, Yahoo! climbed 2.6% to $35.13 after being upgraded to "overweight" by Piper Jaffray analysts, who cited its stake in Alibaba as currently undervalued.

Bank of New York Mellon spiked 3.5% to $37.48 after Trian Fund Management disclosed a stake of more than 9 million shares.