The first half of 2022 is all but over, and it's been a lousy one for the stock market. The Nasdaq Composite index is down 29.3% year to date. But some individual Nasdaq stocks are down even more. Take Advanced Micro Devices (AMD 2.44%); it's down 42.7% so far this year.

That said, bargains can be found amid the stock market wreckage. So is now the time to load up on shares of AMD? Here are two reasons to buy the stock now and one reason to wait.

1. Buy: AMD is flush with cash and has no net debt

One familiar knock on the semiconductor industry is that it is cyclical. There are frequent technological advances in microprocessors, meaning chips can quickly grow obsolete. Moreover, with chips used in so many products (cars, planes, appliances, and smartphones), economic downturns can ruin chipmakers.

Nothing a company can do will prevent a recession, but it can prepare for one. And on that front, AMD's balance sheet has never looked better.

AMD Net Financial Debt (Quarterly) Chart

AMD Net Financial Debt (Quarterly) data by YCharts

For most of its history, AMD was saddled with long-term debt. However, over the last five years, the company has paid off its debt and stockpiled massive amounts of cash. It currently has $4.7 billion of cash on hand. And it could use that cash in any number of ways: buying back shares, making an acquisition, or riding out a recession.

2. Buy: AMD's valuation looks attractive

There are many ways to gauge a company's value, such as P/E ratio, PEG ratio, and P/S ratio. One you may not be familiar with is EV/EBITDA. This calculation compares a company's enterprise value (EV) to its earnings before interest, taxes, depreciation, and amortization (EBITDA). EBITDA can be found in the company's financials. EV is calculated by taking a company's market capitalization (share price times shares outstanding), adding its total debt, and subtracting its cash holdings. By dividing EV by EBITDA, you get a measure of a company's value over time. 

AMD EV to EBITDA Chart

AMD EV to EBITDA data by YCharts

As you can see, AMD's ratio is approaching a five-year low and is much lower than its five-year average of 53.86. While this measure of valuation doesn't tell the whole story, it clearly points to AMD being cheap on a relative basis.

3. Wait: A recession on the horizon?

There's no getting around it: The economy is in a rough patch. We might be heading toward a recession, or we may already be in one. As mentioned earlier, that tends to be tough on chipmakers. Sure, we could stave off a recession or this time could be different for the semiconductor industry, but an economic downturn might still hurt AMD by slowing its sales or shrinking its margins. 

However, recession or not, AMD is a terrific company with excellent management, that makes sought-after products. And there's never a wrong time to buy shares of a company like that.