The U.S. stock market has been on a roller coaster ride of late, thanks to the novel coronavirus pandemic that has put businesses in a major spot of bother. The economic fallout of the COVID-19 disease is expected to be severe, with Goldman Sachs predicting that the U.S. economy could contract as much as 34% in the second quarter of 2020.

Grim economic forecasts such as the one from Goldman have kept the stock market under pressure, though there has been a partial recovery over the past few weeks. However, stocks continue to remain cheap despite the recent rally, giving savvy investors an opportunity to buy into fast-growing sectors such as 5G networks at a discount.

Skyworks Solutions (NASDAQ:SWKS) and Xilinx (NASDAQ:XLNX) are two stocks that expect to benefit from 5G deployments. Both companies are sitting on a nice pile of cash that should not only help them weather the ongoing crisis but also allow them to initiate stock buybacks to lower their share counts and boost earnings per share.

More importantly, Skyworks and Xilinx are trading at attractive levels after the recent sell-off, giving management all the more reason for repurchasing shares and delivering long-term value. Let's find out a bit more about these two 5G stocks.

SWKS Chart

SWKS data by YCharts

1. Skyworks' near-term pain could be an opportunity in disguise

Skyworks Solutions was in the news last month after slashing its fiscal second-quarter revenue guidance. The Apple (NASDAQ:AAPL) component supplier blamed supply chain disruptions and a weak demand environment caused by the COVID-19 outbreak. That wasn't surprising as Skyworks relies on Apple for 51% of its revenue. What's more, 20% of the company's sales come from China -- the original epicenter of the novel coronavirus pandemic.

Apple is reportedly dialing down iPhone production, while smartphone sales in China have plunged substantially over the past couple of months. These developments will negatively affect Skyworks' business in the near term, which is why investors have pressed the panic button and sent shares down nearly 25% this year.

But the crash has made Skyworks stock cheaper. It is trading at less than 19 times last year's earnings and 4.74 times sales. For comparison, the chipmaker's 2019 price-to-earnings (P/E) ratio averaged nearly 25, while the price-to-sales ratio was at 6.25.

This presents a great opportunity for Skyworks management to repurchase shares, as it has $1.19 billion in cash on the balance sheet and only $160 million in debt. The company had announced a $2 billion share repurchase program in February last year, and it should have ample authorization left. Skyworks repurchased $658 million worth of shares in fiscal 2019 and $74 million in the first quarter of 2020.

So, Skyworks may accelerate its repurchases in the wake of the recent stock market correction and reduce the outstanding share count. This will have a positive effect on the company's earnings per share and also pave the way for stronger growth when the 5G smartphone catalyst actually arrives.

CCS Insights predicts that smartphone sales could start recovering next year -- growing 12% in 2021 and 13% in 2022 -- after an expected decline of 13% this year.

As Skyworks' balance sheet indicates that it is well-positioned to weather the near-term weakness, investors should consider going long given its attractive valuation, a potential bump in buybacks, and an uptick in smartphone sales next year.

Person pressing the buy button on a keyboard.

Image source: Getty Images.

2. Xilinx may emerge stronger from the coronavirus crisis

Xilinx got off to a bad start in 2020 as the company's 5G business lost momentum on account of a pause in network roll-outs. However, the recent stock market recovery has been kind to Xilinx stock, as the company's communications business -- accounting for 31% of the total revenue -- is expected to hit a bottom as per Goldman Sachs.

The investment bank predicts that Xilinx's communications business could hit a higher gear on the back of data center demand. That may well be the case as the rise in telecommuting, online learning, and gaming related to lockdowns and social distancing measures has led to a spike in data center activity. This could boost demand for Xilinx's field-programmable gate arrays (FPGAs) that are being deployed in data centers to accelerate workloads. Similarly, Xilinx may also benefit from an uptick in 5G deployments in China, as it counts Huawei as a client.

But given that Xilinx also relies on the industrial, aerospace, and automotive businesses for a nice chunk of its revenue, things are likely to get worse for the company before they get better. So there's a probability of Xilinx stock getting cheaper in the near future, and that might open up an opportunity for the company to accelerate buybacks.

Xilinx currently has a price-to-earnings ratio of 24.4, lower than the five-year average multiple of nearly 28. The company's balance sheet appears to be in good shape, with a cash position of $2.4 billion and total debt of $1.3 billion. Xilinx's cash pile should help see it through the current downturn and also give management the opportunity to buy back shares at a cheaper valuation.

The company's board had approved a $1 billion share repurchase plan in October last year. Xilinx had repurchased $261 million worth of stock by the end of 2019, according to its last earnings report, so it has enough authorization left to buy back more stock.

Don't be surprised to see Xilinx management boost share repurchase activity in light of the recent pullback in the company's stock price. Such a move bodes well for the company's earnings performance once things get back on track.