In the world of investing, there's a disclaimer that has become practically cliche: "Past performance is no guarantee of future results." Put simply, just because a stock or other investment has produced a certain return in recent history doesn't mean that you can expect it to continue following precisely the same path.

Still, it's instructive to examine how a company and its stock have done over a period of time when attempting to gauge its prospects.

Taking a longer-term view of semiconductor company Advanced Micro Devices (AMD -1.05%), how much would investors have if they'd invested $10,000 in the stock five years ago?

Someone working on a computer with tools.

Image source: Getty Images.

Investment calculation

Advanced Micro Devices doesn't pay any dividends, so that's not a factor in calculating the stock's total return. Over the last five years through Sept. 17, the shares gained 107.9%.

It's important to consider such results in the context of how they compare to broad indexes. Large-cap stocks and megacaps, as measured by the S&P 500 index, returned an average of 111.9% during that period. The Nasdaq Composite, which has a heavy tilt toward technology companies, produced a similar 111.8% return. By both measures, Advanced Micro Devices' shares didn't quite keep up.

So a $10,000 investment in Advanced Micro Devices would have resulted in a holding worth about $20,790 today. That same amount placed into the S&P 500 or Nasdaq Composite would have grown to $21,190 or $21,180, respectively.

Recent results

Advanced Micro Devices has shown impressive year-over-year revenue growth. In the second quarter, its top line increased by 32% to $7.7 billion. However, its adjusted operating income dropped by 29% to $897 million.

While the company aims to profit from the generative artificial intelligence trend, it faces stiff competition from GPU market leader Nvidia (NASDAQ: NVDA).

With Advanced Micro Devices' shares selling at a trailing price-to-earnings (P/E) ratio of 89, the valuation seems expensive. By comparison, that's nearly three times the S&P 500's P/E ratio of 31.