Investors must deal with uncertainty every day. Without knowing what the markets will bring, they try to get good returns without bearing excessive risk.

The classic solution is diversification — holding a broad array of global stocks and bonds. By spreading your risk, you obtain some protection against a disaster in any single holding. Even through the chaos in the markets brought about by President Donald Trump’s on-again-off-again tariffs, well-diversified portfolios have been shielded from the wildest swings in the markets.

This survival strategy makes sense in thinking about your taxes, too.

Every taxpayer must deal with at least two kinds of uncertainty. First, you don’t know exactly what your income will be in the future. And far more irksome, you don’t know what the tax code will be next year, or over the next decade or two. That’s especially true now, because of the likelihood of a swelling budget deficit stemming from the Trump administration’s tax and budget policies.

Consider the budget negotiations underway in Congress. Will they mean higher or lower taxes in the future? There are major disagreements and it’s not clear how they’ll turn out. Yet this much seems evident: There is little appetite in the White House or Congress for short-term tax increases. So you may conclude that your taxes will stay the same or even be lower, and plan accordingly.

But not so fast. It’s easy to construct an argument suggesting that whatever happens this year, taxes must rise, and fairly quickly. After all, there are already signs that the bond market is reacting negatively to the prospect of ever widening federal budget deficits, which seem baked into every version of the Republican tax legislation now under consideration.

Thinking like this can give you whiplash. So what is a taxpayer to do?

In a word, diversify. Use a variety of off-the-shelf tax shelters available to people with no expectation of becoming a billionaire, and protect yourself against a range of outcomes.

That’s an idea that Joel Dickson, who heads tax planning at Vanguard, has studied and suggested for years. While I practice diversified investing avidly, I’m only beginning, belatedly, to contemplate what Dickson calls “diversifying your tax risk.”

That tax approach has always been recommended for extremely wealthy people and corporations, with high-powered lawyers and accountants at their disposal. But even if you work for a living and have a more modest income and savings, there may be tax planning moves available that could benefit you in the future.

Roths and other shelters

Diversification won’t protect you fully all the time, of course. In investing, for example, there have been periods — most recently, the high-inflation, high-interest-rate environment of 2022 — when stocks and bonds fell, domestically and internationally. But for the most part, the strategy has worked, generating reasonably good returns over long periods with far less volatility than if you had put all your money into the stock market — or into one stock that didn’t turn out to be a world-beater.

Similarly, tax diversification means giving yourself options that will limit the damage, and, maybe, even help you prosper, whatever happens to the tax code. To the extent that you can control your own finances, it’s prudent to consider a variety of simple, widely available tax shelters, without depending totally on just one.

The broad concept is simple. The details, however, can give you a headache.

Dickson suggests spending some time exploring both traditional and Roth accounts in both 401(k)s and Individual Retirement Accounts. The traditional versions allow you to defer paying taxes on the income you put into the accounts — which makes sense if your tax rate will be lower later. The Roth versions require that you pay taxes now, which makes sense if your tax rate will be higher later.

There are some basic rules of thumb for which kind of account to emphasize at different stages of life. Typically, people’s earnings are lower earlier in their career, putting them into a lower tax bracket. So a Roth, which can also be drawn upon as an emergency fund, may be a better choice then. When your earnings are higher and you are taxed more heavily, the traditional version of 401(k)s and IRAs may be more suitable.

But if you don’t know what the case will be, Dickson said, it may make sense to put some money into both versions.

Obviously, when it’s time to draw on the money you have been stashing away, it would be better not to have to pay taxes on it — which is the great advantage of a Roth. But Roths weren’t available until 1997, and people who entered the workforce before then, like me, didn’t have a Roth option when we started out.

Off-brand shelters

Education accounts known as 529s and the high-deductible health savings accounts known as HSAs can be used as tax-sheltered investment vehicles, and not just as tax-favored ways to save and spend on education and health, Dickson pointed out. “You’ll need to check the fine print, there are limitations on both of them but they are more flexible than you might expect,” he said.

Under certain circumstances, for example, after all education expenses are paid, excess funds in a 529 account may be rolled over to a Roth IRA account for the beneficiary.

Similarly, if you can afford to pay your immediate medical bills from other sources, you may want to treat the HSA as a tax-deferred investment account. The money put into the account every year reduces your taxable income, much like the tax treatment of a traditional IRA or 401(k). And if you use the HSA money for nonmedical purposes, it will function roughly like a traditional retirement account, too: You pay taxes on the money as you use it. But if you save your medical receipts, you can withdraw money from the HSA account in retirement, after its value has presumably appreciated, completely tax free. That makes this a sweet tax shelter, for those able to use it.

For people with modest incomes, no single tax-planning strategy will protect you entirely from the vagaries in the tax code down the road.

But these are strange times. Diversifying among a variety of off-the-shelf tax shelters may put you into safer territory, whatever Congress does to the tax code, now and in the future.