2018 has not been kind to a large swath of stocks, especially in the past couple of months. The S&P 500 index is down for the year, and it's off around 15% from its peak. Shares of Hanesbrands (NYSE:HBI) and Skechers (NYSE:SKX) have fared even worse. Both stocks are down more than 40% since the start of this miserable year.

One person's disaster is another's opportunity. These two stocks are now trading for peanuts, a gift for strong-stomached, long-term investors who can look past a scary chart. Further declines are certainly possible, especially if the stock market continues to head lower. But that shouldn't prevent you from taking advantage of these killer deals.

Four wooden "sale" signs.

Image source: Getty Images.

Hanesbrands

Apparel manufacturer Hanesbrands expects to produce adjusted earnings per share between $1.69 and $1.73 in 2018. That puts the price-to-earnings ratio just barely above 7. The stock also sports a dividend yield of 4.9%, with a low payout ratio of 35% based on the midpoint of the company's guidance.

Other than general concerns about trade wars and the health of the major retailers that Hanesbrands depends on, there are some company-specific issues at play. First, Hanesbrands' core innerwear business is struggling, with sales in the U.S. down 7% in the third quarter. Second, the bankruptcy of Sears led to some charges and a reduced outlook for the full year. And third, Hanesbrands is set to lose an exclusive deal with Target for a line of Champion athletic wear.

These issues justify some caution on the part of investors, but the sell-off this year looks overdone. The company is still growing, albeit slowly, with organic constant-currency sales up 1% in the third quarter. Strong growth for the Champion brand of athletic wear and for the international business has been offsetting slumping sales of innerwear. And the company is making progress paying down its debt.

Hanesbrands isn't a growth company, but at seven times earnings and with a sustainable near-5% dividend yield, the stock is a steal.

Skechers

Like Hanesbrands, footwear company Skechers has been hit hard this year. Skechers stock isn't as cheap relative to earnings, but the company is growing much faster. Earnings per share should come in between $1.82 and $1.87 for the full year, based on Skechers' fourth-quarter guidance. That puts the price-to-earnings ratio just over 12.

Skechers is growing, with revenue up 7.5% in the third quarter. The international business is the company's growth engine, so risks related to tariffs and trade wars are certainly on investors' minds. Skechers does expect its fourth-quarter revenue growth to accelerate, driven by growth in all its segments. But the trade war between the U.S. and China could become a bigger problem for the company in future quarters.

Skechers doesn't pay a dividend, but its balance sheet is pristine. Net cash totaled $815 million at the end of the third quarter, allowing the company to easily fund a small share buyback program. If you back out the net cash, Skechers' price-to-earnings ratio falls below 10.

A cheap valuation won't stop the stock from getting caught up in a market sell-off. But it does raise the odds of Skechers being a great long-term investment.

Timothy Green owns shares of Hanesbrands and Skechers. The Motley Fool owns shares of and recommends Skechers. The Motley Fool has a disclosure policy.