I had a good chat this week with a basketball buddy of mine.

He largely avoided one of the worst market sell-offs in history. Yet he was still kicking himself for missing out on the recovery.

I realize this immediately raises two questions. And to answer the first one, yes, I am a 40-something white man of average height and sub-average knees, and I play basketball. I’m not claiming to play well, mind you, and I’m comfortable admitting that I’m a sad, frail shadow of what I used to be.

But I can still hit the three, dammit. And the exercise gets me out of the house and staves off my eventual and inevitable life-ending heart attack by at least a few years.

To answer the second question, no. Under current social distancing guidelines, we are no longer playing. I’ve been bunkered down on a South American ranch for the past month, and he fled to rural Canada.

At any rate, my buddy was really kicking himself. He’s been sitting in cash and completely missing out on the recovery in stock prices over the past few weeks. The S&P 500 is up a shocking 30% from its March panic lows.

But here’s the thing. Rather than kicking himself, he should be patting himself on the back. He started to feel like the market was getting frothy back in January and had started taking his chips off the table. He travels a lot for work and was one of the first people I knew to legitimately worry about the coronavirus outbreak. After seeing what was happening in Europe, he reduced his stockholdings further in February. And by early March, before the bottom fell out, he was completely in cash.

He largely avoided one of the worst market sell-offs in history. Yet he was still kicking himself for missing out on the recovery.

I broke down the numbers for him and showed him that he was far ahead of the game. The market is still a good 20% from its old highs, and it remains to be seen how much damage has been done to corporate earnings. He may still get a chance to buy low.

We’ll see. In any event, you may also be kicking yourself if you’ve been sitting in cash throughout this move.

Don’t do that. Getting upset will only cloud your judgment and probably lead you to make additional mistakes.  Instead, make a plan. We’ll go over a few steps today.

Missing Out on the Recovery? Here’s a Game Plan to Get Back In

Step No. 1: Get your allocation down

Before you do anything else, figure out how much of your portfolio you want in stocks under “normal” conditions. If you’re young, it might be 80% or more. If you’re near or in retirement, it might be closer to 50%. Figure out what sounds right for you, and set that as your baseline. You don’t have to get there tomorrow. But this at least gets you a road map.

Step No. 2: Average in

Regret avoidance can be paralyzing. You don’t invest because you are afraid of buying at the top, losing money and probably worst of all, looking and feeling like an idiot. And then when the market goes up without you, you still end up looking and feeling like an idiot.

I struggle with these emotions, too. We all do. The  best way I have found to deal them is to average into my positions over time. I make an initial purchase of 20% to 50% and then trickle into the rest of the position in even increments over the course of a few months.

It’s not particularly scientific of me, and I don’t claim that it’s optimal. But it helps me manage my emotions and avoid regret.

Step No. 3: Take the win

It’s important to remember that you don’t have to be invested at all times. Like my basketball teammate, you can take the win, sell high and walk away for a while.

Of course, this gets us back to minimizing regrets. It’s painful to sit in cash and watch the market rip higher without you.

This is the beauty of rebalancing. I rarely sell my entire portfolio and sit in cash. But I do regularly rebalance, selling off pieces of my winners and rotating the proceeds into bonds, cash or nonstock alternatives. That way I always have at least a little skin in the game, but I’m also taking profits along the way.

Take the win!

• Money & Markets contributor Charles Sizemore specializes in income and retirement topics, and is a frequent guest on CNBC, Bloomberg and Fox Business.

Follow Charles on Twitter @CharlesSizemore