As anyone who remembers 2008 can attest, recessions are nasty. The S&P declined 37.2% in 2008, and didn't return to its previous levels for five years. Those kinds of losses can be devastating, and they take a long time to make back.

That is why Bridgewater founder Ray Dalio's recent prediction for the future was so unsettling. While he believes that the U.S. economy is doing well now, he also believes "that whatever the magnitude of the downturn that eventually comes, whenever it eventually comes, it will likely produce much greater social and political conflict than currently exists."

While you may, or may not, agree with Dalio's take on things, Foolish long-term investors hoping to protect their portfolio from the next downturn should look to these quality safe-havens. Here are three stocks you can hold through doomsday.

angry cartoon bear throwing coins and growling

Image source: Getty Images.

Lockheed Martin

Lockheed Martin (NYSE:LMT) is the largest defense contractor in the U.S. Founded in 1909, the company is one of the few that  produce the high-end defense equipment the U.S. military needs. It operates four segments: Aeronautics, Mission and Fire Systems, Rotary and Mission Systems, and Space Systems. Basically, if you need to fight a war, Lockheed's got what you need. As such, the company is likely to get paid no matter what happens in the greater economy.

The company is also under long-term contract to produce the F-35 fighter jet, which should be a cash cow for years to come. The U.S. military has committed to procuring 2,443 F-35s, along with orders from 10 other partner countries as well. As of July 2016, Lockheed had only produced 168 F-35s, which means the company has years of production ahead of it for this lucrative product line.

While the fighter jet has come under scrutiny for cost overruns, the plane has been in development since 2001. Those sunk costs are unlikely to be abandoned. Moreover, Lockheed has touted cost reductions, projecting the latest batch will cost $94 million per plane, as opposed to the $122 million per plane in the previous batch.

While the F-35 is Lockheed's cash cow, the company has its moonshots as well. Its famous Skunk Works R&D segment conducts classified, high-level research on everything from nuclear fusion reactors to nanotechnology to robotics. If there's a new technology that will take over the world, there's a good chance Lockheed will be involved.

Wheaton Precious Metals

Stock market volatility usually leads to a spike in precious metals, often thought to be a safe haven. As such, Wheaton Precious Metals (NYSE:WPM), formerly known as Silver Wheaton, may be worth owning. The company is a streaming company, which means that it does not actually own any mines. Rather, it acts more like a finance company for gold and silver miners that need to develop or expand their mines, in exchange for future production.

The best part? Wheaton Precious Metals is guaranteed a low price. Its average prices were $4.54 and $391 per ounce of silver and gold, respectively. That's far below current prices of $16.65 and $1,231. Thus, Wheaton Precious Metals will benefit greatly from any spike in gold or silver prices -- the company gets roughly half its revenue from each metal -- while not owning any costly fixed mining assets. Moreover, the company can diversify streams among different mining companies, decreasing the risk of any particular mine wreaking havoc on its earnings.

Costco

Finally, everyone needs to eat,  wear clothes, and pump gas to get to work, recession or not. As such, Costco (NASDAQ:COST) is likely to survive a downturn.

That's because Costco's business model makes virtually all its profit from membership fees, then basically sells goods at cost plus overhead expenses. As such, Costco's members would be hard pressed to find better deals anywhere else. Moreover, once you sign up for a membership, it's a sunk cost. Therefore, it's unlikely penny-pinchers would stray from Costco after joining. In fact, the company has a renewal rate of roughly 90%. Once you become a member, you're treated to the lowest costs for many goods, from steaks to eyeglasses to gasoline. Thus, it's not unthinkable that a severe recession may cause Costco memberships to actually rise.

The company is also generous to its shareholders, sporting a 1.2% dividend, along with semi-frequent special dividends, including the recent $7-per-share special payout.

In preparing for the next big downturn, investors should seek safe-haven stocks. To that end, Lockheed Martin, Wheaton Precious Metals, and Costco fit the bill.

Billy Duberstein owns shares of Lockheed Martin and Wheaton Precious Metals. The Motley Fool owns shares of and recommends Costco Wholesale. The Motley Fool owns shares of Wheaton Precious Metals. The Motley Fool has a disclosure policy.