NEW YORK (TheStreet) -- U.S. stock indices finished Tuesday with a fizzle on quarter-end squaring and profit-taking as the S&P 500 (^GSPC)  took a dive for the month. For the quarter though, all three major benchmarks closed out higher.

The S&P managed to eke out its seventh quarterly gain, an impressive spate of gains that comes only next to the 14 quarters of increases that came to a halt in 1998. 

The Dow Jones Industrial Average (^DJI) was down 0.17% to 17,042.90, higher by 1.3% for the quarter. The S&P 500 (^GSPC) was off 0.28% to 1,972.29, rising 0.64% for the quarter after falling 1.53% for the month. The Nasdaq (^IXIC)   shed 0.28% to 4,493.39, up 1.93% for the quarter. 

The quarter overall was supported by evidence of a gradually improving U.S. economy and expectations that the Federal Reserve would refrain from its first rate hike until mid-2015, offsetting the barrage of geopolitical headlines.

Watch the video below for a closer look at how U.S. markets ended the trading day Tuesday:

Looking ahead, the fourth quarter is expected to once again be the strongest quarter of the year. Since 1950, the SPX has been up over 4%, on average, in the fourth quarter and higher 78% of the time, according to Ryan Detrick, strategist at research firm See It Market.

Amid the fourth-quarter anticipation, Gina Martin Adams, institutional equity strategist at Wells Fargo Securities, urges a degree of caution and suggests a more neutral and selective outlook toward the broad market.

"While we cannot help but marvel at the continued resilience of U.S. stocks, momentum, breadth and volume all failed to confirm the gains in large-cap stock prices, while small caps and high-yield bond prices failed to recover enough to meet former peaks," Adams explained. "We do not wish to fight the trend in large caps, but do consider these limited confirming indicators as well as a looming monetary policy shift as risks to watch going forward."

She recommends investors continue to shed exposure to early cyclical and defensive sectors while adding to positions in mid to later cycle segments of the S&P. Her overweight sector recommendations continue to be healthcare, tech and materials. Her underweights are still discretionary, staples, financials, utilities and telecom. 

In top corporate headlines Tuesday,eBay(EBAY) - Get Report jumped 7.54% on its plan to split off its PayPal business into an independent publicly-traded company.

GoPro(GPRO) - Get Report gained over 3% after a Citigroup analyst raised his price target on the wearable camera company to $94 from $70.

News Corp(NWSA) - Get Report  agreed to buy online real estate business Move Inc. (MOVE) for about $950 million. Move soared 37.08%. News Corp fell 2.68%.

Apple(AAPL) - Get Report said Tuesday the iPhone 6 and iPhone 6 Plus would go on sale in China on Oct. 17. Apple received approval from China's Ministry of Industry and Information Technology after it promised never to install "backdoors" to give other governments access to users' information. The stock gained 0.64%.

Ford(F) - Get Report said Monday it expects a pretax profit of around $6 billion this year, down from its previous guidance of $7 billion to $8 billion. Shares slid 2.12%.

Morningstar downgraded Pimco Total Return Fund to "bronze" from "gold" following the departure of Bill Gross "because of the resulting uncertainty regarding outflows and the reshuffling of management responsibilities." 

-- By Andrea Tse in New York

Follow @AndreaTTse