Stocks are on their longest winning streak in three months as retailers, technology companies, household products companies and health care firms made large gains.

NEW YORK U.S. stocks climbed for the sixth day in a row Thursday as strong first-quarter results from retailers like Best Buy and PVH led indexes to record highs. That offset weakness in energy stocks caused by a plunge in oil prices.

Stocks are on their longest winning streak in three months as retailers, technology companies, household products companies and health care firms made large gains.

The Nasdaq composite joined the Standard & Poor's 500 in setting record highs. While retailers that run stores jumped, their online rival Amazon also made a sizable gain as its stock price approached $1,000 for the first time.

Kate Warne, an investment strategist for Edward Jones, said she doesn't think Thursday's retail earnings are a sign that business for traditional retailers is getting better.

"It's probably not something investors should take as a sign of improvement in the retail landscape," she said. "Consumer spending is actually strong, but consumers are spending in places other than traditional retailers."

Small companies were mostly left out of the rally, however. And even though OPEC and a group of other oil-producing nations extended their cuts in production, the price of oil fell almost 5 percent and energy companies took steep losses.

The Standard & Poor's 500 index rose 10.68 points, or 0.4 percent, to 2,415.07. The Dow Jones industrial average gained 70.53 points, or 0.3 percent, to 21,082.95. The Nasdaq composite jumped 42.23 points, or 0.7 percent, to 6,205.26, above the record it notched last week. The Russell 2000 index edged up just 0.88 points, or 0.1 percent, to 1,383.39.

Electronics retailer Best Buy soared after it issued a strong first-quarter report, including better sales of mobile devices and gaming products. Its stock gained $10.83, or 21.5 percent, to $61.25. PVH, the owner of brands including Calvin Klein and Tommy Hilfiger, climbed $4.94, or 4.8 percent, to $106.98 after it raised its annual forecasts in the wake of its own strong report.

Other retailers including Guess, Abercrombie & Fitch and Burlington Stores also made substantial gains. Amazon rose $13.03, or 1.3 percent, to $993.38. Its stock peaked at $999 during the day.

A group of 24 countries including OPEC members and Russia said they will extend their production cuts for nine months in an effort to shore up oil prices. That was what most analysts expected, but investors appeared to have gotten their hopes up for a longer extension. And while oil prices have rallied over the last few weeks, experts were skeptical that the deal will do much to boost prices.

Benchmark U.S. crude lost $2.46, or 4.8 percent, to $48.90 a barrel in New York and Brent crude, the international standard, fell $2.50, or 4.6 percent, to $51.46 a barrel in London. Oilfield services company Schlumberger sagged $1.97, or 2.8 percent, to $69.39 and Marathon Oil dropped $1.03, or 7.1 percent, to $13.50.