With 2018 coming to a close, one thing is painfully clear: The stock market doesn't go up in a straight line.

At one point recently, stocks were on pace for their worst December in 90 years, with the tech-heavy Nasdaq Composite and broad-based S&P 500 dipping into bear market territory (i.e., a decline of at least 20% from recent highs). Even though stock market corrections are fairly common, it was nevertheless the S&P 500's steepest correction in nearly a decade, and it caught a lot of investors, including professionals on Wall Street, off guard.

Of course, these declines are nothing compared with what some industries and investors have endured. A quick screen of publicly traded stocks with a market cap in excess of $300 million reveals that 175 are down by at least 50% over the trailing-12-month period (through Dec. 30, 2018), with 1,224 stocks down at least 20%. That's more than a third of all publicly traded companies with a market cap in excess of $300 million.

An investor using a red felt pen to mark the bottom of a large decline in a stock chart.

Image source: Getty Images.

Two beaten-down stocks worth buying in 2019

Sometimes when a stock gets pulverized, it makes complete sense. For example, online discount retailer Overstock.com skyrocketed in 2017 after its CEO announced plans to pursue blockchain projects. However, when the cryptocurrency bubble finally burst in January 2018, blockchain no longer looked as appealing or immediately beneficial to corporate society. Shares of Overstock have shed 79% year to date, and the decline in its shares makes perfect sense.

But on occasion, beaten-down stocks can present an intriguing, albeit still risky, buying opportunity. If you're looking for a couple of really intriguing contrarian stocks to buy in 2019 that've been massacred in recent years, consider Bed Bath & Beyond (NASDAQ:BBBY) and Yamana Gold (NYSE:AUY).

Retracing Best Buy's footsteps

Few stocks have generated a more gruesome return for shareholders over the past five years than home-products retailer Bed Bath & Beyond, which has lost 86% from its top.

The big issue is that its physical locations have been losing market share to the likes of Amazon.com, which has lower overhead, thereby undercutting Bed Bath & Beyond on pricing, and preferred convenience since consumers never have to leave their homes to shop. After generating in excess of $5 per share in profit, Bed Bath and Beyond's full-year EPS may not even reach $2 in 2019.

But this isn't the lost cause that much of Wall Street believes it is. Bed Bath & Beyond is pulling out the Best Buy (NYSE:BBY) playbook after the big-box electronics retailer successfully pulled itself out of a similar predicament in 2013.

Miniature boxes stacked in a pyramid next to a small orange shopping cart, both of which are lying on a smartphone, which, in turn, is on top of a laptop.

Image source: Getty Images.

The first part of that playbook involves pricing its products competitively to draw foot traffic and improve engagement. Best Buy did this by price-matching products with online and brick-and-mortar retailers starting in February 2013. Bed Bath & Beyond won't be copying Best Buy down to the fine print. Rather, it's implementing a dynamic pricing platform online and in select stores that cover all facets of its business (core, competitive, and markdown pricing), and work on a more local level than any of its previous pricing strategies. In theory, this should seriously minimize any showrooming that might be going on and give consumers incentive to purchase their products with Bed Bath & Beyond now, rather than later.

Second, like Best Buy, Bed Bath & Beyond will be emphasizing its online segment. It takes time for online sales to blossom into a major contributor of a company's total sales, but we're seeing signs of strong growth already from Bed Bath & Beyond's e-commerce division.

Lastly, the Best Buy playbook calls for near-term cost-cutting and downsizing. It's possible Bed Bath & Beyond could choose to close underperforming stores, or build smaller locations as Best Buy did, in the future.

If you're willing to take a stab on a rebound in this stock, you'll be getting a company valued at just 7 times next year's EPS, trading at a little over half of its book value, paying out a 5.6% yield, and that generated $1.1 billion in operating cash flow over the trailing-12-month period. That's an excellent risk versus reward, in my view.

A messy pile of gold ingots stacked atop of each other, with a rising chart in the background.

Image source: Getty Images.

Lustrous once more

Safe-haven investments don't always work as planned. Just ask the shareholders of gold and silver mining company Yamana Gold, which is down 74% over the trailing five-year period.

Why the train wreck, you ask? Most of the blame can be attributed to a multi-year decline in gold from 2011 through 2015, and an even larger percentage decline in silver from its 2011 peak. When precious metals vaulted higher in the early part of the decade, mining companies such as Yamana Gold spent freely on new projects and acquisitions. Unfortunately, this free-wheeling operating style came back to bite many mining companies by the midpoint of the decade as gold and silver spot prices fell. Higher debt levels and reduced cash flow led to depressed stock prices.

However, a number of long-awaited projects are becoming a reality for Yamana Gold, which should result in a reduction of its all-in sustaining costs, and significantly improve the company's operating cash flow. And let's face it -- cash flow is a much better measure of mining health than earnings per share, since cash flow encompasses a mining company's ability to meet its debt, mine maintenance, and exploration obligations.

An underground excavator operating in a precious-metal mine.

Image source: Getty Images.

The single-biggest positive for Yamana is the opening of the Cerro Moro mine, which, before it opened, was expected to generate 150,000 ounces of gold and 7.2 million ounces of silver production per year for the first three years. Cerro Moro just completed its first quarter of commercial production in Q3, and, according to Yamana, is already on track to meet production and cost estimates for its 2018 and 2019 guidance. Cerro Moro will play a key role in seeing gold equivalent ounce (GEO) production rise from 892,000 GEO in 2017 to about 1.15 million GEO in 2020.

This close to an 30% increase in GEO, much of which will come from Cerro Moro, and some of which will result from the Suruca development within the Chapada mine, means plenty of extra operating cash flow in the coming years. Based on Wall Street estimates, Yamana's cash flow per share should rise by 35% between 2017 and 2020 to $0.69, placing the company at 3.4 times 2020's cash flow per share. Historically, I've personally found mining companies to be fairly valued at a price-to-cash flow per share of around 10

Assuming Yamana shuffles some of its added cash flow to debt reduction ($1.7 billion in net debt), this is a company that should start to see a nice uptick in full-year earnings per share. Currently valued at 12 times forward earnings and 54% of book value, it suggests Yamana could be a steal for patient investors.