(Bloomberg Opinion) -- A couple years ago, the high-yield savings market was hot — at least to millennials. Internet-only banks entered the market and drove up annual percent yields to above 2% at their peak. This could help you grow your money far faster than the typical .01% of most banks’ savings products.

Two percent APY was a huge score. It made it much easier for people like myself to tout the glories of keeping your emergency savings in cash as opposed to in the stock market. Just put it in a high-yield savings account, and you could, depending on the year, minimize the impact of inflation on your cash.

Well, gone are those days — at least for now. With interest rates and yields dropping on savings accounts, most recently to 0.60% APY, it’s going to be even more tempting for people to funnel their money into investments in order to hedge against inflation and generally keep building wealth.

That’s fine for money you have to spare or want to grow for future use. But that definitely should not include your emergency fund. You want to keep that as cash, in a savings or checking account.

For starters, cash is king. It’s an idiom for a reason. The point of an emergency fund is to have easily accessible cash in a pinch. This operates as a household safety net against job loss, medical emergencies (an emergency fund ideally would have enough to cover your health care deductible too) and home or car repairs. Being able to cover the costs of the unexpected without incurring a debt cycle helps keep the foundation of your financial house strong.

Typically the rebuttal against leaving your emergency fund in cash is that you’re losing out on much higher returns you could get from investing in the market, as well as losing out to inflation as the purchasing power of that cash goes down.

Let’s put some numbers to this. According to an analysis by Goldman Sachs, the S&P 500 returned 13.6% annually since its 2012 report with a forecast of an 8% return. (For the record, the bank is forecasting an annualized return of 6% in the coming decade.)

Let’s expand that out to a decade. If you invested $5,000 in 2010, even if you didn’t contribute another penny, your total would be just shy of $18,000 in 2020. Had you left that $5,000 in a traditional savings account at a bank, where it earned the common 0.01% APY, you’d have earned five whole dollars over that same period. (And $5,000 in January of 2010 would have the same buying power as $5,952.62 in 2020, according to the U.S. Bureau of Labor Statistics’ CPI Inflation Calculator.)

Even had you opted for a high-yield savings account with a 2% APY, you’d only have around $6,100 over the same stretch. That would’ve kept you on pace to protect purchasing power, but it wouldn’t have earned nearly what it would have had you invested.

So I empathize with the argument against keeping funds in cash. However, this logic really works only when you’re looking at ideal market conditions. What if you got furloughed or laid off just as the stock market dropped significantly? We saw this happen in March. Had you needed to sell investments to have cash, it could have meant taking a loss or at least not being able to take advantage of the market’s bounce back.

Yes, money not increasing to keep pace with inflation is a bummer, but so is selling in a down market or, worse, not having cash when you need it most.

How much should you have sitting idle in cash? The rule of thumb for emergency savings is often three- to six-month’s worth of living expenses. That advice comes from a pre-pandemic world, however. So depending on your industry, there’s a chance your current experience has made you crave more like a year’s worth of cash stability.

Whether you’re aiming for three months, six months or a year’s worth of emergency funds, it’s important to remember that it can be your bare essential budget. This doesn’t have to be the amount you need for your ideal lifestyle — it’s how much you need to have the basics. That alone could help reduce how much you truly need in an emergency fund, plus your health care deductible, and the difference can be redirected toward investing.

Ultimately, the right amount comes down to your risk tolerance. Despite the bold headline on this article, this isn’t a black-and-white decision. You can certainly allow for shades of grey, particularly if you want at least a year’s worth of expenses in emergency savings but feel ill at the idea of it all just sitting on the bench doing nothing to build your wealth.

Consider how much you truly need in cash for your peace of mind — perhaps three months — and then invest the rest in a portfolio with a modest risk allocation. Remember: Your emergency fund isn’t designed to be a wealth builder. It’s more of a personal insurance policy for you and your family.

This column does not necessarily reflect the opinion of the editorial board or Bloomberg LP and its owners.

Erin Lowry is the author of “Broke Millennial,” “Broke Millennial Takes On Investing” and the forthcoming “Broke Millennial Talks Money: Stories, Scripts and Advice to Navigate Awkward Financial Conversations.”

©2020 Bloomberg L.P.