According to Bank of America, there are three ideal times for investors to buy stock.

Joseph Quinlan, Head of CIO Market Strategy for Merrill and Bank of America Private Bank, said in a Wednesday note that investors should do the same thing as they would in real life if they were to encounter a bear.

Whether you are standing on the floor of the New York Stock Exchange or on a deserted road in a national park, the principles are the same.

Quinlan said that buying stocks at current prices should prove to be a good long-term deal with a lot of bad news priced into asset prices.

"We see three entry points for investors, running from June/July as the bear market matures, in the third and fourth quarter as earnings are reset, and early next year when the Fed tightening cycle winds down." Stand your ground means taking the long view and sticking to your investment philosophy.

According to the note, missing just a few days of outsized gains could affect an investor's total returns over the long-term.

Long-term investors should be taking advantage of the S&P 500's decline.

Since 1945, the S&P 500 has delivered "chunky" compounded annual returns of 11 percent. Quinlan said not to run from a bear.

There is an economic recession that could extend the stock price decline. "Don't run, don't panic, and stand your ground" are the rules for bear market sell-offs.

The after effects of an economic downturn are usually salutary. Quinlan said that downturns rid the economy of its excesses, reallocate capital to more productive parts of the economy, and create and destroy.

Every major market downturn in the past has been followed by a recovery, according to Quinlan.

It's not clear whether this time will be different because of the Fed raising interest rates.