UBS, the world's largest wealth manager, said investors should keep their money in the stock market this year regardless of their risk appetite.

Markets have been volatile in recent months as investors re-position for slower global growth and heightened uncertainties. That's set to continue, leading some investors to consider whether it's time to get out of equities and hold cash before a recession hits — but UBS said there's still money to be made in the stock market.

"You have to stay invested, whatever your risk tolerance can bear," Mark Haefele, global chief investment officer at UBS Global Wealth Management, said on Monday.

"The period of 18 months to 6 months before a recession is often when you get most of your returns because that's when economies do strongly," he told clients at the UBS Wealth Insights forum in Singapore.

He noted that investors would have missed out on a 10-percent rally if they had sold their holdings on Christmas Eve — when U.S. stocks experienced a massive sell-off — and re-entered the market this month. In addition, a recession is not likely to happen this year, so corporate earnings have room to grow, although at a slower pace than before, he said.