The stock market is heating up this year after a chilly performance in 2022. The broad S&P 500 index is up by 5% year-to-date while the more tech-focused and volatile Nasdaq Composite has gained 12%.

Still, some tech stocks remain quite affordable. In particular, memory chip giant Micron Technology (MU -2.46%) is as chronically undervalued as ever and automated ad-buying service specialist PubMatic (PUBM -1.52%) is an underrated cash machine. Here's why you should take a closer look at these two companies the next time you're itching to buy a modestly priced tech stock with generous growth opportunities.

Micron and the cyclical memory chip industry

The memory chip industry is highly cyclical. A few years of high demand and limited supply will let Micron and a few significant rivals enjoy rising chip prices and skyrocketing revenues. Then, the sector participants invariably build up too much manufacturing capacity and/or end-user demand fades for chip-consuming products such as cars, smartphones, and personal computers. Chip prices fall, shipping volumes drop, and stock prices tumble.

And then it'll soon be time for the next upswing. Lather, rinse, repeat.

You can make a lot of money by paying attention to these fairly predictable multiyear trends.

Right now, the memory chip market is seeing plunging revenues and shrinking profit margins. A global shortage of semiconductor manufacturing capacity over the last couple of years has played havoc with many important market qualities, and this downswing started with weak sales of all the usual memory-chip consumers.

Based on the sales, gross margin, and stock price patterns of the last few market cycles, the sector should be close to another dramatic upturn.

MU Chart

MU data by YCharts

Now, chart squiggles and technical analysis are flimsy sciences at best. As a Micron shareholder, I find it comforting that the company has more cash than debt on hand. Moreover, one target market looks ready to accelerate its memory chip orders due to a sudden surge of newfound demand. Of course, I'm talking about the artificial intelligence sector, where more memory helps chatbots and other tools provide better AI services.

So there are several reasons why Micron's business fortunes may turn positive again in the next couple of quarters. Meanwhile, the stock is changing hands at the bargain-bin valuation of 2.4 times sales and 10.7 times earnings. The stock price is down 78% from the 52-week highs of last spring.

So if you're not thinking about Micron's "buy" button lately, perhaps you just don't like semiconductor stocks. In my opinion, you won't find a clearer set of "buy me" signals in today's stock market, and especially not in the chip sector.

Selling ad space in a crowded market

PubMatic is a digital advertising company selling ad space to interested advertisers.

You might be thinking that digital advertising is a crowded market. And, sure, you're not wrong. Also, this sector is going through a period of weak advertiser interest due to inflationary pressure and tight consumer budgets. However, PubMatic stands out from the crowd by building a comprehensive hardware and software infrastructure that makes selling ad space more efficient and easier to manage for vendors. Plus, it works with advertisers, agencies, and demand-side platforms like The Trade Desk, which gives it a wide variety of clients and target markets.

But here's the real kicker: PubMatic is a cash machine. In the first three quarters of 2022, the company generated a whopping $67.9 million in operating cash flow from $182.1 million in top-line revenues. And although net income was only $15.9 million over the same period, this imbalance is actually good news. The combo of low earnings and high cash flows actually proves that PubMatic has a very effective strategy to minimize income-based tax payments while generating robust cash profits.

I know the current economic climate isn't ideal for advertising. However, despite the challenges, PubMatic still managed to grow ad sales by 11% in the third quarter compared to the year-ago period. So imagine what it might do in a healthier advertising market.

And even though the stock is down 50% from its 52-week high due to temporary economic challenges, PubMatic still has a massive long-term target market. The advertising industry is predicted to have a 10% compound annual growth rate and is expected to be worth over $1 trillion by 2031, according to market analytics experts at ResearchAndMarkets.com.

So, what's the bottom line? PubMatic is a substantial investment idea in February 2023 because it has a proven track record of generating cash, a unique and efficient approach to selling ad space, and a wide variety of clients, and is poised to benefit from the predicted growth of the advertising industry. At the same time, the stock seems unreasonably cheap at 3.2 times sales and 20 times trailing earnings. That's another easy-peasy investing idea in this rising market.