The S&P 500 and Nasdaq Composite traded in record territory on Thursday as U.S. stocks advanced for a sixth straight session, thanks in part to big gains in shares of Best Buy after quarterly results.

The S&P 500 index rose 10 points, or 0.5%, to 2,415, after setting an intraday record of 2,417.52. Nine of the 11 main sectors traded higher, led by gains in consumer-discretionary shares, but energy stocks were off more than 1%.

Some technical analysts suggested closing at these levels would prompt a further rally in broader markets.

"Assuming the breakout is confirmed, short-term upside is likely greatest for small- and mid-cap stocks given their relatively oversold position," said Katie Stockton, chief technical strategist at BTIG.

If the S&P 500 closes higher Thursday, this would mark the 11th time the large-cap index has risen for six sessions in a row in the past five years. In the 10 previous incidences, stocks were higher two weeks later 80% of the time, with an average gain of 57 basis points, according to Frank Cappelleri, executive director at Instinet LLC.

Continue Reading Below

ADVERTISEMENT

The Nasdaq Composite Index also hit an intraday record at 6,210.50, and was most recently up 44 points, or 0.7%, to 6,207.

The Dow Jones Industrial Average climbed 72 points, or 0.4%, to 21,085, within shouting distance of its record close of 21,115.55 on March 1.

"A 15% earnings growth in the first quarter was all achieved without any fiscal stimulus, so investors can afford to be patient even as tax cuts and deregulation reforms are being delayed," Chiavarone said.

Investors appeared to shrug off a dip in oil prices. On Thursday, crude prices sank nearly 4% after Saudi Arabia's oil minister Khalid al-Falih ruled out deeper cuts (http://www.marketwatch.com/story/oil-prices-turn-sharply-lower-after-saudi-oil-minister-rules-out-deeper-cuts-2017-05-25) to production in any extension to an OPEC output agreement.

But the Organization of the Petroleum Exporting Countries did agree to a nine-month extension (http://www.marketwatch.com/story/opec-says-it-will-extend-production-cuts-through-march-2018-2017-05-25) to the current deal at Thursday's meeting in Vienna, Austria, as expected.

"Oil is very volatile as markets hang on every word coming from the OPEC meeting in Vienna. Headlines so far are not supporting the bull," said Neil Wilson, senior market analyst at ETX Capital, in a note.

Potentially market-moving headlines may also come out as President Donald Trump continues his overseas trip, meeting European Union leaders (http://www.marketwatch.com/story/brexit-fan-trump-meets-eu-leaders-for-the-first-time-2017-05-25)--new French President Emmanuel Macron (http://www.marketwatch.com/story/macron-tests-the-limits-of-frances-fifth-republic-2017-05-19) in particular--and then attending NATO events.