The stock market may not have been a happy hunting ground so far this year, but investors shouldn't forget that buying shares of solid companies is a tried and tested way of enhancing one's wealth.

The S&P 500, for instance, has averaged annual returns of 13.9% from 2011 through 2020. That's why investors looking to get started in the stock market -- even with a small amount such as $100 -- should focus on the bigger picture and consider buying some solid stocks that are trading at relatively attractive valuations following their slide in 2022.

Fortinet (FTNT -2.17%) and Marvell Technology Group (MRVL 4.06%) are two stocks trading under $100 that investors can consider buying right now. Let's see why.

1. Fortinet

Fortinet provides firewalls, antivirus software, intrusion prevention systems, and other computer security products. So far in 2022, its shares are down nearly 13%  despite the company's impressive growth. This could be an opportunity for investors to get their hands on this cybersecurity stock at a relatively cheap valuation.

Of course, Fortinet isn't all that cheap considering that it trades at 82 times earnings and 14 times sales, but the company is growing at a terrific pace to justify that valuation. In the first quarter of 2022, for instance, Fortinet's revenue shot up 34% year-over-year to $955 million. 

More importantly, its bookings, which refers to the total value of orders it received during the quarter, increased at a faster pace of 50% year-over-year to $1.28 billion. What's more, Fortinet's order backlog, which refers to the orders that have been received but not yet fulfilled, shot up to $278 million last quarter from $162 million at the end of 2021.

The growth in these metrics indicates that Fortinet should be able to sustain its fast pace of growth. Not surprisingly, the company expects to finish the year with $4.37 billion in revenue and $5.54 billion in billings. These numbers would translate into top-line growth of 31% and billings growth of 32% compared to 2021.

The prospects of the cybersecurity market suggest that Fortinet could keep growing at a solid pace for years to come. For example, the company's total addressable market in the cloud security space is expected to go up to $31.2 billion by 2026, compared to $17.7 billion this year. Its overall addressable market, including multiple cybersecurity niches, is expected to jump to $199 billion in 2026, compared to an estimated $138 billion this year.

The healthy end-market prospects are the reason why Fortinet expects annual revenue to hit $8 billion in 2025, while billings could jump to $10 billion by then. As such, investors looking to buy a top cybersecurity stock trading for less than $100 a share should take a closer look at Fortinet as it seems built for long-term upside.

2. Marvell Technology Group

Shares of Marvell Technology have taken a big beating in the stock market recently, losing 46% of their value so far this  year. But this has opened an opportunity for investors to buy this fast-growing chipmaker at a relatively attractive valuation. And its business is actually quite good. The company's earnings are expected to grow at an annual pace of 42% for the next five years.

It is easy to see why analysts are expecting Marvell's earnings to increase at such a terrific pace. Lucrative end markets such as data centers, 5G wireless infrastructure, automotive, and storage are driving impressive growth at Marvell. The chipmaker's fiscal 2023 first-quarter revenue shot up 74% year-over-year to $1.45 billion. The company's adjusted earnings soared to $0.52 per share, from $0.29 per share in the prior-year period.

Marvell's design wins -- which means its chips that have been selected for use by customers -- indicate that the chipmaker should be able to sustain its momentum. In the data center market, for example, the design wins secured by Marvell over the past year and a half could help it clock incremental revenue of $400 million next year and $800 million in the following year. That points toward a nice bump in the data center segment as it generated $640 million in revenue in the first quarter of the current fiscal year, or an annual revenue run rate of $2.5 billion.

It is worth noting that Marvell sells a wide range of data center chips ranging from data processing units (DPUs) to ASICs (application-specific integrated circuits) to ethernet adapters to switches to networked storage for hyperscale data centers. Given that the demand for data center accelerators such as ASICs and data processing units is expected to grow at an annual pace of 44% through 2027, Marvell has a solid secular growth opportunity ahead of it.

All this makes Marvell a top semiconductor stock under $100 to buy right now. What's more, the stock is trading at 7.7 times sales now, which is significantly lower than last year's multiple of 16.8. And the forward earnings multiple of 20 is also attractive, sitting well below the five-year average of 26. Buying Marvell at these multiples looks like a no-brainer.