The S&P 500 has had a solid performance thus far in 2023. With three months left in the year, the index is up 13%, though it's given back some of those gains since the midpoint of the year.

However, not every stock in the broad-market index is a winner, and some of them have had dismal years despite the general upswing.

Sometimes a sell-off in an otherwise strong stock can set up a buying opportunity. Let's take a look at the four worst performers on the S&P 500 so far this year to see if any are worth buying today.

A bear roaring in front of stockchart going down

Image source: Getty Images.

1. Dollar General, down 56.2%

Dollar General's (DG -0.41%) forgettable year primarily owes to a series of disappointing earnings reports as its core low-income customer base has gotten hit hard by inflation, and the company is losing market share to competitors such as Walmart.

The stock's worst day of the year came on June 1, when Dollar General fell 19.5% as the company missed estimates in its first-quarter earnings report.

Dollar General, which has more retail stores than any other banner in the U.S., missed estimates on the top and bottom lines and cut its guidance for the year while warning that its customers continue to be financially strained. The company confirmed those expectations in its second-quarter earnings report, and the stock fell another 12%.

The discount retailer still seems well positioned for the long term, given its widespread footprint and relatively little direct competition, but it's clear the macroeconomic environment is weighing and it will take at least a few quarters to improve.  

2. Enphase Energy, down 54.3%

Like Dollar General, solar storage specialist Enphase Energy (ENPH 3.80%) has steadily declined over the course of the year due to underwhelming earnings reports.

The stock fell 26% on April 26 after revenue growth in the first quarter was flat on a sequential basis, and adjusted earnings per share fell on a sequential basis from $1.51 to $1.37.

Revenue in the U.S. was particularly weak, down 9% because of seasonality and macroeconomic conditions, though the company said European sales were up 25% from the previous quarter. IQ Battery shipments were also down. 

High interest rates and new regulations in California have affected the company's performance this year, but interest rates should start to come down in the next year or two.

Meanwhile, the company has strong profit margins and should benefit from the long-term growth in solar. For risk-tolerant investors, this could be a good buying opportunity. 

3. SolarEdge Technologies, down 53.5%

Like Enphase Energy, SolarEdge Technologies (SEDG 2.81%) is another solar stock that's been hit hard this year. 

SolarEdge specializes in power optimizers that convert energy produced by solar panels to electricity, and its technology helps monitor the performance of the panels. 

SolarEdge stock has taken a dive over the past few months as the company offered weak guidance in its most recent earnings report, noting recent headwinds in the residential solar market resulting from high interest rates. It also saw sequential revenue grow just 5%, and it expects sequential revenue to decline in the third quarter.

Like Enphase, the stock is likely to be impaired until interest rates reverse, but SolarEdge still has a lot of long-term potential.  

4. Insulet, down 47.5%

Finally, Insulet (PODD 1.23%), the insulin-delivery specialist, rounds out the four worst-performing S&P 500 stocks this year, down nearly 50%.

New competition is among the concerns facing Insulet, as the stock has drifted lower on concerns that a new class of diabetes medications that are also prescribed as weight-loss drugs, including Ozempic and Wegovy, could take sales away from its Omnipod.

Insulet is still seeing solid growth, with revenue up 32.4% to $396.5 million. Nearly all of that revenue came from the Omnipod.

While the company also flipped a loss from a year before to a profit, the competitive landscape shouldn't be ignored. However, if Insulet can fend off competition, the stock could have a long way to run in a rebound.