Over the last five years, the S&P 500 and Nasdaq Composite have both produced total returns (including dividends) of over 100%. It's been an incredible period in the broader stock market, but especially in the tech sector, which is the largest sector by weighting in both indexes and has been the best-performing sector over the last five years (by far).

Investors who don't own a lot of megacap growth stocks may have had a difficult time keeping up with the market's gains. However, there have been some standout winners in underperforming sectors like industrials and materials.

Here's how Deere (DE -0.87%), Hubbell (HUBB -1.71%), and Southern Copper (SCCO -1.47%) have outperformed the S&P 500 and Nasdaq Composite over the last five years and why all three dividend stocks are worth buying now.

A person smiling while looking at a tablet with renderings of various bar graphs and upward-trending arrows overlapping the image.

Image source: Getty Images.

Deere has a multi-decade runway for earnings growth

One look at Deere's earnings growth in recent years, and it's easy to see why the stock has done so well.

DE EPS Diluted (TTM) Chart

DE EPS Diluted (TTM) data by YCharts

Deere's trailing-12-month earnings per share are up more than threefold in just five years, outpacing the gain in its stock price and leading to a decline in its price-to-earnings (P/E) ratio. So, despite more than doubling in five years, Deere is cheaper from a valuation perspective. But there's a bit of a catch.

Deere is a cyclical company that tends to go through periods of outsized growth followed by stagnating or declining earnings. It all has to do with the investment cycle, which is dependent on crop prices, interest rates, and other factors. Basically, if business is good for Deere's customers, there's a better chance they'll make a big capital investment. But if business is down, they may delay that big purchase.

Supply chain disruptions over the last few years led to soaring crop prices, which led to higher food prices and were a key inflation driver. However, higher crop prices helped the agriculture industry and, in turn, demand for Deere's tractors and other equipment.

Earnings are expected to come down as business cools or gears up for a downturn. But the good news is Deere's P/E ratio is just 11 -- meaning earnings can take a sizable hit and the stock would still be dirt cheap.

Deere has made successful product improvements centered around automation, artificial intelligence (AI), and robotics. However, we are still in the early innings of the next technological agricultural revolution. Deere has a compelling long-term investment thesis because it is well-positioned to capture expansion periods in the industry while taking market share over time as it brings more sophisticated machinery and software to market. The stock only yields 1.6% -- but that's partially because Deere reinvests so much back into its business and repurchases a lot of its stock, too.

The industrial sector has higher yield options than Deere (including many of its competitors). But for investors looking for a balance of growth and income, Deere stands out as a top buy now.

The megatrend toward grid modernization and electrification make Hubbell stock attractive

Lee Samaha (Hubbell): Up almost 187% over the last five years (and with an even higher total return thanks to dividends), Hubbell's stock price performance is a testimony to the benefits of management restructuring the business toward the right end markets. In Hubbell's case, it means shifting from the majority of its revenue from electrical solutions in the non-residential, residential, and industrial markets in 2017 to almost two-thirds of its sales from utilities.

DE Total Return Level Chart

DE Total Return Level data by YCharts

It's a shift that plays into the need for utilities to modernize grids and spending to support the electrification trend in the economy. The latter reflects investments in renewable energy (not least to connect to the grid), electric vehicles (charging networks), AI (data centers), and other secular growth trends like smart buildings/infrastructure and industrial automation. The former indicates the need to replace aging western transmission and distribution infrastructure.

The shift resulted in revenue growing from $3.7 billion in 2017 to an estimated $5.9 billion in 2024, with adjusted operating profit margins moving from mid-teens levels to 21% in 2023.

Those increases in revenue and profitability mean Hubbell's dividend per share has risen significantly over the last five years. Let's put it this way: Although the current dividend yield of 1.3% isn't anything to text home about, the annual dividend payout of $4.88 per share would mean a dividend yield of 3.8% based on the stock price five years ago. The point is that dividend growth follows earnings growth, and with Hubbell set to report 8.9% and 5.2% revenue growth over the next couple of years, there's plenty more growth to come from its end markets.

Significant copper production growth will fuel Southern Copper's future dividend payments

Scott Levine (Southern Copper): Oftentimes, investors looking to supplement their passive income don't place metals stocks at the top of their watch lists. Businesses committed to metal production often allocate their capital toward growing and sustaining their various projects -- not making hefty dividend payments. There's always an exception, though; in this case, that exception comes in the form of Southern Copper. A leading copper investment opportunity, Southern Copper stock has soared more than 200% over the past five years, and it currently offers a forward dividend yield of over 2.7%.

With many industries roaring back after the onset of the pandemic in 2020, the price of copper throttled higher, presenting a boon for Southern Copper. Whereas the price of copper was around $2.72 per pound in 2019, it rose to about $4.24 per pound in 2021, and for 2024, Southern Copper forecasts the price of copper to be about $4 per pound.

SCCO Cash from Operations (Annual) Chart

SCCO Cash from Operations (Annual) data by YCharts.

While it's impossible to say what history holds in store for copper prices, it's worth recognizing that the company projects steady copper production growth over the next decade. Whereas it produced 911,000 tons of copper in 2023, management forecasts production rising steadily to 1.6 million tons of copper in 2032.

Deftly managing its assets, Southern Copper has excelled at generating free cash flow -- an encouraging sign for prospective dividend investors. Should the company achieve its 2024 free-cash-flow guidance of $2.5 billion, it will mean that the company will have averaged free cash flow of $2.5 billion from 2020 through 2024.