Editor's note: This story was originally written going into 2023 and has been added to our CNBC Pro white paper vault. Market whims can throw even the most durable portfolios for a loop, but with some thoughtful planning, investors can turn up a silver lining in the form of tax savings. And that means they can hold onto more of their return. A run-up in bond yields since the Federal Reserve began its rate-hiking campaign last year, along with investors' heightened interest in dividend-paying stocks and exchange traded funds have brought a new planning concern to the forefront: Your portfolio is generating income, so how do you ensure you pocket as much of that return as possible — instead of losing a sizeable chunk to taxes? That's where effective tax planning enters the picture. Create a tax-efficient portfolio Investors ought to have three types of accounts to help them diversify the tax treatment on their investments: taxable, tax-deferred — like a traditional individual retirement account or a 401(k) plan — and tax-free, like a Roth IRA. In a taxable account, you're subject to levies on capital gains. Tax-deferred accounts allow your funds to grow free of taxes in the present, but you're on the hook for levies when you take withdrawals. Roth accounts permit you to stash after-tax dollars, have them grow over time and withdraw them free of taxes in retirement, provided you meet certain conditions. Your income tax bracket, investment time horizon and goals will be key drivers in determining the best account for your investments, particularly the ones that are paying hefty income now — as we're seeing with higher yields on bonds. Taxable accounts might be a great place to hold your Treasury bills, as they are exempt from state and local income levies, but subject to federal income tax. Meanwhile, stocks paying qualified dividends, which are subject to a lower rate versus the ordinary income tax on non-qualified dividends, may be good contenders for taxable accounts in the short term. Certificates of deposit, which are paying attractive rates, might make sense in a taxable account if your needs are immediate. Corporate bonds and taxable bond funds spinning out sizable income payments could fare well in a tax-deferred account, like your traditional IRA. Bear in mind that corporate bonds tend to pay higher yields because of their greater risk, and their interest income is subject to levies — but if you keep the bonds in your IRA, you can hold off on the taxes until you draw down from the account. Municipal bonds are beloved by investors because they spin off income that's generally tax-free (you are exempt from state and local levies if you're a resident of the issuing jurisdiction). They make sense in a taxable account. Municipal money market funds are also a consideration for investors holding cash in taxable accounts. With higher yields, investors may want to minimize their taxes. "More highly taxed investors may benefit from looking at a muni money market fund," said Christine Benz, director of personal finance at Morningstar. Finally, tax-free accounts are a great place to put high-growth assets, like tech stocks. Here, you can capture appreciation without taking a huge hit on taxes. Harvest your losses and deploy proceeds The silver lining to 2022's market discord — in which the S & P 500 lost more than 19% and the Nasdaq Composite shed over 33% — was that it created a large pile of tax-loss harvesting opportunities. Investors could sell off their losing positions in their taxable accounts and use that loss to offset gains elsewhere within the portfolio. If your losses exceed gains, you can apply up to $3,000 a year to offset ordinary income. You'll need to avoid violating the wash-sale rule to ensure you can take the losses. That is, if you sell your investment at a loss and buy one that's substantially identical to it within 30 days before or after the sale, you end up with a wash sale. That means the IRS will block you from claiming the tax loss. Tread carefully when you pick out your losers and buy up replacement assets. "Don't do it in a way that changes your investment allocation," said Jerrod Pearce, certified financial planner and certified public accountant at Creative Planning. If the replacement asset underperforms the one you sold, then "who cares about the taxes? The investment doesn't make sense," he added. Reassess your holdings Chances are that if you hold an actively managed mutual fund in your brokerage account, you may have found yourself receiving a capital gains distribution. There is a range of drivers behind these distributions: For instance, your fund might have had a lot of turnover, and as the manager sells appreciated positions, the distributions are delivered to the shareholder. Redemptions, which occur when investors exit a fund, can also result in distributions as a portfolio manager sells holdings to cash out departing shareholders. You are responsible for taxes on these distributions even if you remain in the fund. However, you can plan to minimize the hit going forward. For starters, that might mean rethinking the account in which you hold that fund — would it be a better fit for a taxdeferred account? You could also consider whether an exchange-traded fund with less turnover might be better suited for your brokerage account. "Buying ETFs and minimizing taxable distributions, you at least control the income on your tax return," said Pearce. Tax-loss harvesting can also help you offset these capital gain distributions. Donate carefully "If you're looking at including charity as part of your plan, you may as well do it tax efficiently," said Pearce. Rather than selling off appreciated positions in your portfolio, paying a capital gains tax and giving cash proceeds directly to your favorite charitable organizations, consider setting up a donor-advised fund. With your donor-advised fund. This way, you can donate highly appreciated assets without incurring taxes and you can generally deduct the fair market value of the property. Be aware that you can only claim a charitable deduction if you itemize deductions on your tax return —that is, your itemized deductions exceed the standard deduction for that tax year. When you are ready to give money to your favorite charitable causes, you can make grants from your donor-advised fund. Investors looking to boost their tax saving can opt to "bunch" their charitable contributions. This means that instead of donating $10,000 annually to your donor-advised fund, you can "bunch" several years' worth of giving into one year. Aside from the feel-good factor and the taxsavings opportunity, you can also trim down heavy concentrations in your portfolio. "I think people miss a lot of opportunities to involve portfolio management with how they give to charity," said Pearce. "It's a good opportunity to give to charity and reduce portfolio concentration without paying taxes."