The S&P 500 (^GSPC -0.51%), which tracks the 500 largest publicly traded companies on U.S. markets, is the stock market's most followed index, largely due to the companies it contains and how important they are to the U.S. economy. After a rough 2022, the S&P 500 has had an impressive year so far, with a gain of more than 7%.

The index rose by 3.5% in March alone, and its top three movers each increased by at least 24%. If you're wondering if you still have time to take advantage of the following three stocks, the answer is yes.

1. Advanced Micro Devices

Advanced Micro Devices (AMD 1.34%) declined 55% in 2022, but things have seemed to turn around. The stock is up 45% year to date, including 25% in March. The chipmaker's bread and butter has always been CPUs (central processing units) and GPUs (graphic processing units), but its future growth will likely rest on its success in artificial intelligence (AI) and data centers. Both are relatively young, high-growth industries.

As AMD diversifies its business and strengthens its ecosystem of products and services, it should benefit from the increase in corporate clients. In a tough economy, consumers might cut spending on PCs (many of which use AMD parts), but it's less likely that businesses will cut back on their data center use.

AMD's latest data center chip -- which is specifically made to process data-intensive tasks like AI machine learning -- already has Microsoft, Alphabet, and Oracle as customers.

2. Intel

Intel (INTC 1.54%), a big AMD rival, had a tough first two months of this year, but in March, the company saw its stock price increase close to 30%. The PC market has been hit hard recently, so part of the debate surrounding Intel is whether we've seen the worst in the PC market or if it'll continue to decline.

Either way, it's all but certain that Intel will face a rough 2023 and possibly 2024. But the long-term value is still there for patient investors, with its commanding market share and many resources at its disposal.

3. First Solar

First Solar (FSLR -1.56%) is the country's largest solar panel manufacturer. It focuses on large-scale utility projects, so its business isn't as sensitive to economic conditions as companies that operate more on the consumer side. In its fiscal 2022 fourth quarter, the company's revenue increased to more than $1 billion, a gain of 10 from a year earlier. The shares are up 40% so far this year, including a 27% gain in March alone.

First Solar says it expects sales to be between $3.4 billion to $3.6 billion in 2023, and the company has $17.7 billion worth of bookings secured into 2029. With the International Energy Agency projecting the solar market to hit a compound annual growth rate of 25% through 2030, the company is in a good position to keep its momentum going.

Consider buying into an S&P 500 index fund instead

Investing in individual companies has many benefits, with one being the chance for outsize returns. It's much more likely that an individual company will soar than a broad index like the S&P 500.

But with individual companies also comes increased risk. To help hedge against it, you should consider investing in the S&P 500 as a whole.

The automatic diversification that comes with the index ensures your portfolio doesn't rely on too few businesses or sectors. If one sector has a down period, you still have 10 others to (hopefully) carry the weight.

Investing in the S&P 500 also reduces the amount of time you spend researching or analyzing individual companies. By investing in the index, you're essentially investing in the broader U.S. economy, so a single company's quarterly financial performance doesn't matter as much in the grand scheme.

An S&P 500 index fund is one of the quickest ways for investors to solve multiple problems simultaneously.