For the vast majority of the investing community, it's been a rough year. Since hitting all-time closing highs during the first week of January, the iconic Dow Jones Industrial Average (^DJI -0.11%) and widely followed S&P 500 (^GSPC 0.02%) have respectively shed 11% and 14% of their value.

Meanwhile, the tech-driven Nasdaq Composite (^IXIC 0.10%) is lower by 24% since hitting its high in November. This greater than 20% decline places the Nasdaq in a bear market.

The velocity of moves lower has also picked up. On May 5, investors experienced what can arguably be labeled a stock market plunge. The Nasdaq Composite endured its third-biggest single-session point decline in history, with its peak intraday decline totaling 6%. The Dow and S&P 500 also registered top-10 nominal point declines on May 5.

A plunging then rapidly rising stock chart displayed on a computer monitor.

Image source: Getty Images.

When stock market crashes occur, investors often seek the safety of value stocks. At the moment, two value stocks stand out as particularly attractive buys in a swooning market, while another is best avoided by investors.

Value stock No. 1 to buy: AT&T

The first value stock that looks like a screaming buy during the market sell-off is telecom giant AT&T (T 1.88%). Although the growth heyday for telecom companies has come and gone, the predictability of what AT&T can bring to the table, coupled with a handful of organic catalysts, is what makes it such an attractive investment for income seekers and patient investors.

The biggest catalyst for AT&T is the rollout of 5G wireless infrastructure. It's going to be costly and time-consuming for AT&T to upgrade its equipment to handle 5G wireless download speeds. However, it'll be a wise investment, given that it's been close to a decade since wireless download speeds were meaningfully improved.

The desire to take advantage of faster wireless speeds should lead to a persistent device-replacement cycle for businesses and consumers that ultimately increases data consumption. Since data is where AT&T generates its best margins, its investment in 5G wireless infrastructure should be well worth it.

Another key piece of the puzzle for AT&T is the recent spinoff of WarnerMedia, which was merged with Discovery to create the new media entity, Warner Bros. Discovery. When this deal closed roughly five weeks ago, AT&T received over $40 billion in cash

Additionally, it announced just prior to the completion of the deal that it would be lowering its base annual payout to $1.11, which still represents an inflation-fighting 5.5% yield. The $40.4 billion in cash from the Warner Bros. Discovery merger, plus the cash saved from reducing its payout, should help AT&T make a sizable dent in its debt load and vastly improve its financial flexibility.

AT&T trades at just eight times Wall Street's forward-year earnings forecast, so investors appear to have priced all potential bad news into its stock. With smartphones practically a basic necessity these days, the risk-vs.-reward profile for AT&T certainly favors the latter.

Ben Franklin's eyes peering out between prescription drug tablets covering a one hundred dollar bill.

Image source: Getty Images.

Value stock No. 2 to buy: Teva Pharmaceutical Industries

A second value stock to buy hand over fist as the market crashes is brand-name and generic-drug developer Teva Pharmaceutical Industries (TEVA).

Unlike AT&T, which has simply struggled with slower growth and a large debt load, Teva has had a wide range of problems. Since the beginning of 2016, it's settled bribery charges, shelved its dividend, dealt with generic-drug price weakness, grossly overpaid for Actavis and ballooned its debt, and is now knee-deep in litigation tied to its role in the U.S. opioid epidemic. Despite all of these problems, Teva looks to have turned the corner and is a genuine bargain for long-term investors.

The key to Teva's turnaround is CEO Kare Schultz, a turnaround specialist who took over in September 2017. Since Schultz has taken the reins, the company's net debt has declined from around $35 billion to $20.7 billion, as of the end of March 2022.

Schultz has reduced billions in annual operating expenses, sold non-core assets, and used some of the company's roughly $2 billion in annual operating cash flow to pay down debt. By the end of 2023, more than half of the company's net debt could be gone from when he became CEO.

The new CEO is also spearheading Teva's efforts to put nationwide opioid litigation in the rearview mirror. Since early February, the company has settled with Texas, Rhode Island, and Florida over its role in the opioid crisis.

Teva was also on the winning side of a California trial, which found the defendant drug companies not liable for causing the opioid epidemic. By the end of this year, much of the uncertainty that's shrouded the company regarding opioid litigation could be gone.

Thanks to the company's improving financial flexibility, investors will be able to focus on the things that matter, such as the growth of brand-name drugs Austedo and Ajovy. The former is a treatment for tardive dyskinesia and is expected to hit $1 billion in sales this year.

Valued at just three times Wall Street's forward-year earnings forecast, Teva is ripe for the picking.

A blue street sign that reads, Risk Ahead.

Image source: Getty Images.

The value stock to avoid like the plague: WW International

On the other end of the spectrum is a historically inexpensive company that investors would be smart to avoid: WW International (WW -3.49%). This is the company previously known as "Weight Watchers." WW changed its name four years ago to reflect its focus on wellness and not just strict dieting.

On the surface, WW International looked as if it would be set up perfectly to thrive during and after the pandemic. With Americans stuck in their homes during the pandemic, it was expected that a lack of outdoor activity would lead some folks to gain weight.

To add to the above, WW has been investing in and emphasizing its digital solutions since 2018. People were staying home, but it didn't mean they lost access to digital coaching, personalized support, or the machine-learning technology that's helped WW customize meal plans. This digital transition arguably couldn't have come at a better time for WW.

However, weight- and wellness-focused services have a notoriously bad track record when it comes to economic slowdowns and recessions. When consumers need to cut costs, companies like WW are among the first to get the ax. Let's not forget that U.S. inflation hit a 40-year high of 8.5% in April, and first-quarter gross domestic product declined 1.4%. Although we're not officially in a recession, this data certainly suggests a growing likelihood of a recession being declared within a few months.

The company's first-quarter operating results already imply that a recession has arrived. Net sales fell 8.4% from the prior-year period, with digital paid weeks and digital subscribers also declining by single-digit percentages. 

Even though WW has a low forward-year price-to-earnings ratio of 7, I believe we'll see the company's profit forecasts deteriorate significantly until the Federal Reserve's aggressive monetary-tightening phase ends.