The whole idea is to realize gains when you have them.

In theory, a good investment is one that you buy low and sell later for a higher price. Sometimes that is easier said than done, but the past nine years have delivered good returns for most investors who took some risk.

The only problem is that the prospect of paying capital gains taxes is so unappealing that most investors delay selling until their investment starts to go down and they get nervous. This thinking is somewhat flawed and not always worth the wait for a variety of reasons. Unless you plan on dying with a certain investment or donating it to charity, your built-in capital gains and the ensuing taxation is not an if, it is a when – assuming the value of your investment doesn’t come crashing down below its acquisition price. And, P.S., one way to prevent your investment from crashing down is to sell when you do indeed have a gain.

When you let a portfolio drift, your allocations may become all out of whack and actually increase the risk inside your portfolio without you even realizing it. Imagine if your riskiest investment was intended to occupy about 10 percent of your portfolio all of a sudden represented 25 percent or more of your portfolio simply because of outstanding performance. Should you now sell? Most experts would say yes, unless that money is purely excess that you can afford to lose.

There are some ways to minimize your capital gains tax, and this thinking should be a part of your investment strategy at all times. This starts with a keen awareness of your taxable income and tax rate.

For example, for taxpayers in the 10 or 15 percent tax bracket, the federal capital gains rate is zero percent. You’d be shocked how many retirees that I see in low tax brackets holding on to their granddaddy’s stocks because they are afraid of getting slammed with taxes when they could implement a long term selling strategy and pay no federal taxes at all.

The next strategy is for those in the next group of tax brackets, joint filers with taxable incomes between $77,400 and $500,000 the capital gains rate goes to 15 percent. In my opinion, when it comes to maintaining balance in your portfolio, this should not be a deterrent.

What could be a deterrent, however, is if your sales of appreciated assets bumps you up to the next tax bracket. That would cause your capital gains tax rate for federal purposes sneak up to 20 percent. And, of course, do not forget the 3.8 percent Medicare surtax that is applied to all joint filers with adjusted gross income above $250,000.

I’m sorry if I’m losing you in the details, but who ever said that tax legislation simplified things? Long story short. I believe that it may be unwise to hold onto assets simply to avoid paying taxes on the gain. Get good advice, and make sure that your advisor has a little tax nerd in their DNA.