Yields on certificates of deposit (CDs) are at their highest level in years. It isn't difficult to find one-year CDs with yields greater than 5%, or 5-year CDs that have a 4% annual percentage yield or higher.

With these excellent risk-free yields, it's not a surprise that many people are choosing to put their money into CDs instead of into the stock market these days. After all, the historical average return of the stock market is 9%-10% annually over long periods, but it can be extremely volatile in the short term. For many people, a guaranteed 4%-5% yield that lets them sleep soundly at night can be an attractive alternative.

While CDs certainly don't replace the long-term compounding power of stocks, especially when it comes to retirement savings, they can be an excellent addition to a well-rounded investment portfolio. And many don't realize that high-yield CDs aren't just offered at banks as an alternative to savings accounts -- they can be opened in tax-advantaged retirement accounts as well.

Woman on laptop at a desk.

Image source: Getty Images.

You can buy high-yield CD directly through many brokerages

You might not realize it, but you can buy CDs directly through an IRA. Some of the top brokerage firms in the U.S. offer high-yield CDs through their platforms, either through third-party banks or their own, and some of the largest banks in the U.S. offer IRAs for the specific purpose of depositing into CDs or money market accounts.

The advantage of CDs within an IRA

Depositing money into a CD through your IRA takes away one of the biggest pain points of simply opening a CD with a bank: taxes.

When you deposit money into a CD at a bank, the interest you receive in your account is taxable income. Shortly after the end of the year, you'll receive a tax form (and so will the IRS) that documents the interest you were paid. And it's important to note that the interest you receive is taxable even if you didn't take any money out of the account.

On the other hand, investments held within an IRA are tax-deferred. You won't have to pay any tax on the interest you receive each year. Plus, with a traditional IRA, qualifying account owners can even get a tax deduction for the money contributed to the account. You won't pay a penny of tax until you eventually withdraw your money. With a Roth IRA, you don't get a current-year tax deduction, but qualified withdrawals are 100% tax-free after you reach 59 ½ years of age, regardless of how much interest or investment profits you've earned in the account.

Alternatives to consider

If you're looking for a 100% safe way to get high yield from your portfolio, there are a few other options to consider. Treasury securities are a big example. As of this writing (March 10), the yield of a 1-year Treasury bill is about 4.94%, while the five-year Treasury note yield is 4.05%. To be sure, you can likely find a better APY from CDs right now through brokerages and top online banks, but Treasury securities also come in 10-, 20-, and 30-year maturity terms, which aren't readily available in the CD world.

The bottom line is that in the current interest-rate environment, a high-yield CD can be a smart addition to the fixed-income allocation in your IRA. But it's also important to realize that it isn't the only safe, high-yielding instrument available, so be sure to consider the other choices before deciding where to put your money.