If you've been following the news, you're probably aware of the recent string of interest rate hikes we've seen courtesy of the Federal Reserve. When rates go up, it can impact everything from bond prices to mortgages to credit cards, but what it also usually means is more favorable interest rates for bank deposits. And while savings accounts rates may only be slowly creeping their way upward, certificate of deposit (CD) rates seem to be moving a bit more quickly.

In fact, average yields on CDs are highest they've been in five years. According to data gathered by DepositAccounts, over the past nine months, the average yield for a 12-month CD climbed to 0.567%, while the average yield for a five-year CD jumped to 1.504%. And while these numbers may not seem like much to write home about, remember that CDs are a totally risk-free investment as long as you keep your balance below the FDIC insurance limit of $250,000.

Piggy bank with the words "save save save" alongside it


If you're the risk-averse type, you may be thinking that now's the time to open a CD. But while it's OK to play it safe with a small portion of your money, you're better off finding the bulk of your savings a more lucrative home for the long run.

How CDs work

In case you're not familiar with CDs, here's a rundown of how they work: When you open a CD, you're agreeing to lock your money away for a certain period of time in exchange for a higher interest rate than what you'd get from a standard, less restrictive savings account. Now you can access your money in a CD early if you come to need it sooner, but you'll pay a penalty that could wipe out all or part of your returns. That's why you should really only put money into a CD if you're certain you won't be using it for whatever the term you're signing up for entails.

Why open a CD?

Putting money into a CD can be a smart move under certain circumstances. Say you've saved up $20,000 for a down payment on a home you're hoping to buy, but need another $10,000 to meet your goal. Let's also assume you think it'll take one to two years to amass that additional $10,000. At that point, putting your $20,000 in the stock market is a bad idea because your investment window is rather narrow, and if the market takes a dip when you need to access your cash, you could end up taking a significant loss.

On the other hand, if you stick that money in a CD, you'll get a better interest rate than you would with a standard savings account. And, since that cash will be locked away, you won't be tempted to use it on, say, a vacation, when it's really earmarked for something else.

Consider stocks instead

While opening a CD is a good way to generate some risk-free interest, the major downside of going this route is that you'll achieve limited growth relative to what the stock market might give you. Imagine you lock $20,000 up in a five-year CD paying 1.504% interest. In half a decade's time, you'll have $21,550.

But watch what happens if you put that money into stocks instead. Historically, the market's average annual return has been roughly 9%. Let's knock that figure down a couple of points and assume that your investments will bring in 7% a year. After five years, that'll leave you with about $28,050 -- $6,500 more than what you'd get with a CD.

Now as a general rule, you shouldn't invest money in the stock market that you expect to need in the short run -- somewhere between the next five to seven years. Unlike CDs, stocks aren't risk-free, so you need a decent chunk of time to ride out that volatility. But if you're talking about cash you have no near-term plans to use, you're better off sticking most of it in stocks. If you want to invest a small portion of your savings in a CD, by all means, go for it. But if you're in your 30s, for example, you'd be wise to keep 75% to 80% of your portfolio in stocks for the long haul.

One final thing: If you are going to put some money in CDs, you may want to consider a CD ladder. This way, you'll have access to your money at different intervals as your CDs come due, which means you'll have an easier time reinvesting that cash over time. And when you're dealing with a return on investment that's still relatively low in the grand scheme of thing, it definitely pays to have options.