This article was updated on Jan. 9, 2018 and originally published April 26, 2015.

Whether an investment is appropriate for your portfolio depends on your projected holding period. Money you can sock away for five to 10 years or longer is probably best allocated to stocks, but market fluctuations make the stock market a poor choice for money you might need relatively quickly.

As a general rule, the best short-term investments are those that put preserving capital ahead of growing it. Here are three short-term investments fit for any investor.

1. Certificates of deposit

Certificates of deposit bridge the gap between savings and investing. A certificate of deposit is a deposit that is locked in at a bank for a set period of time, from one month to as long as 10 years. The bank will pay you a higher interest rate on your savings, knowing that you intend to keep your money in the bank for a longer period of time.

But be sure to shop around. Most national banks pay very little on their certificates of deposit. Many smaller and faster-growing banks, however, are frequently looking for long-term deposits, and willing to pay a premium interest rate to attract new accounts.

As of January 2018, Bank of America offered just 0.75% per year on its five-year certificates of deposit. Meanwhile, Goldman Sachs' online bank offered a rate of 2.47% per year on its five-year CDs, one of the best CD rates on the market. The difference may seem small, but as the chart below shows, a higher interest rate will generate significantly more interest income over the life of the CD. 

Bar chart of interest earned on a CD by interest rate

Image source: Author.

One advantage of CDs is that they are FDIC insured. Thus, even if the bank fails, the FDIC will protect investors from loss, up to $250,000 per depositor, per bank. Always make sure that you buy CDs from FDIC-insured institutions. Many institutions with bank-like names are, unfortunately, not FDIC insured.

There's just one downside you should know about: Many banks charge a penalty for cashing in a CD early, usually 5%-10% of the amount invested or a variable amount based on a number of days' interest. Before buying a CD, you need to be confident that you won't need to make an early withdrawal. If you expect to need your cash in one year, then buy a one-year CD to match your needs.

2. I-Bonds

I-Bonds purchased from the U.S. Treasury can be a great short-term investment. I-Bonds are a way to lend money to the U.S. government at a fixed rate plus inflation. Your money is guaranteed to grow at least as fast as the rate of inflation over time, protecting your spending power.

As a reference, I-Bonds purchased between Nov. 1, 2017 and April 30, 2018 yield 2.58% on an annual basis (rates change semi-annually based on the inflation rate).

Alarm clock on a green background

The best short term investments offer safety of principal, liquidity, and current yield. Image source: Getty Images.

Unlike CDs, I-Bonds also allow you to access your money early by paying a small penalty. You can cash in any I-Bond after one year. If you cash in an I-Bond within the first five years, you'll incur a small penalty of just three months interest. I-Bonds held for five years or longer can be cashed in with no penalty at all.

It's easy to buy I-Bonds direct from the U.S. Treasury on its website in an amount up to $10,000 per Social Security Number per year. (A married couple could invest up to $20,000 in I-Bonds in a single year, for example.)

3. A high-quality bond fund

Short-term bond funds offer competitive returns from low-risk investments, in addition to nearly immediate access to your money should you need it. Vanguard Short-Term Investment-Grade Fund (VFSTX 0.10%) offers a competitive 2.3% yield, with a minimum investment of just $3,000.

The only drawback of a short-term bond fund is that your investment is not guaranteed. In market panics, such as the one from 2008-2009, a bond fund can generate a negative return. Those who owned Vanguard's fund saw their investment lose 8% of its value from August 2008-December 2008. By mid-2009, however, investors were back to even, and have enjoyed positive returns ever since.

A short-term bond fund is a riskier choice than an I-Bond or CD, but the risk should be weighed with the benefits: There are no penalties for withdrawing your money on a short timeline as there are for CDs or I-Bonds. In addition, you can add money to Vanguard's fund at any time, in any amount greater than $1, making it a very convenient short-term investment vehicle.