Fast-food franchise McDonald's (MCD -0.05%) has generated remarkable wealth for investors over the years. A $10,000 initial investment in 1970 would have grown to nearly $10 million, had you reinvested all your dividends.

Against such a stellar track record, I'm audaciously arguing that U.S. Treasuries, arguably the least-flashy investment you can make, could be a better bet for your money -- at least in the short term. Here are some challenges that McDonald's faces.

A potential reversion to the mean

Investors typically want to put their money where they can get the best return on investment for the least risk possible. With that in mind, you use data to determine how risky McDonald's stock might be today. For example, the stock trades at a price-to-earnings ratio (P/E) of 32, compared to its average over the past decade of 25; that's 28% above average.

Consensus analyst estimates call for the company to grow earnings per share (EPS) by an average of 8% annually over the next three to five years. Can that growth justify the stock's current valuation? Remember that the S&P 500, which has historically averaged 10.7% annual growth, trades at a P/E of 18 today.

MCD PE Ratio Chart

MCD PE Ratio data by YCharts

Stock prices are a popularity contest in the short term, but the market tends to sniff things out over time. It seems unlikely that McDonald's can support its current valuation, and that could mean that the share price stagnates while earnings growth catches up or the price declines to bring the valuation back to Earth.

In other words, McDonald's stock may not generate very much of a price return for investors from today's prices, at least for some time.

Looking at "risk-free" alternatives

That arguably makes McDonald's a riskier investment than if the stocks' valuation were much lower. Remember when I mentioned that investors seek returns for as little risk as possible? That brings Treasury bonds into the discussion. These are debt securities that the United States government issues. Technically, it may be called a bond, note, or bill, depending on the note's duration.

Put differently, buying a Treasury means lending the government money. The amount you lend (the amount of the Treasury) is called the face value. All of these bonds pay interest in exchange for your money, and you'll receive periodic interest payments and the bond's face value back when it matures.

No stock or bond is risk free, but Treasuries are often referred to as such because the U.S. government guarantees them. The only way you don't get paid is if the U.S. defaults on its debt, which is quite unlikely. The 10-year U.S. Treasury note's yield is a standard benchmark throughout the financial sector.

McDonald's versus treasuries

While you will receive a Treasury's face value at maturity, a bond may trade at a premium or discount to its face value. Rising interest rates typically push bond prices down and yields higher. Last year was abnormally volatile for bond markets because of how much interest rates were raised in 2022.

However, the carnage in bond markets has created desirable yields for investors today. The chart shows that some short-term Treasuries yield 4% to 5% at their current prices.

1 Year Treasury Rate Chart

1 Year Treasury Rate data by YCharts

On the one hand, you have McDonald's stock with a 2.3% dividend yield and a seemingly hot valuation that puts you at risk of seeing your principal investment decline. Conversely, you can find far higher yields on short-term Treasuries that guarantee you the face value at maturity.

I would take McDonald's over the long term. It's a good company, and earnings growth will probably exceed returns from Treasuries over time.

But suppose you're concerned about the near-term risks of an overvalued stock in a shaky market. In that case, this potential opportunity in Treasuries could help investors generate passive income without risking their initial investment.