One of the first rules of investing is that you should never panic and sell during volatility. Riding out the ups and downs and waiting for the recovery, it is said, gives you the opportunity to make back any losses and enjoy the gains as your investments bounce back.

Many investors found themselves tested on this very subject in the final quarter of 2018 when volatility saw stock markets plunge. Global markets suffered their greatest quarterly falls in more than seven years as the MSCI World Index plunged 13.9 per cent, the S&P 500 13.9 per cent and the FTSE All Share 10.3 per cent.

But those who did not panic and sell have been well rewarded so far in 2019, as many markets have rallied significantly. The question is, have the gains been enough to make up for the volatility at the end of 2018?

Number-crunching by UK investment advice firm Hargreaves Lansdown reveals that of 37 fund sectors, just 15 have rallied enough to offset the losses in the final quarter of 2018. The performance of 22 sectors is in the red over a six-month period.

Ryan Hughes, head of fund selection at fund manager AJ Bell, says: “The past two quarters have been chalk and cheese, but even with the euphoria at the start of 2019, it is interesting to note that in many cases this still hasn’t been enough to recoup the losses from the end of 2018. This highlights the nature of investment returns and just how hard assets have to work to regain lost ground when markets fall.”

Unsurprisingly, it is largely those sectors that were hit hardest at the end of the year which have struggled to recoup their losses.

The Japanese Smaller Companies sector fell 16.9 per cent in the final quarter of 2018. In the first quarter of 2019 it is up 5.3 per cent, but that means it is down 12.3 per cent over that six-month period as a whole.

The European Smaller Companies sector was the worst performer in Q4, down 17.4 per cent, and a 7.9 per cent rally in the first three months of 2019 has not been enough to make up for those falls – it is down 10.9 per cent over the past six months.

Other sectors have recovered to a greater extent, however. Technology and Telecoms was down 12.5 per cent at the end of 2018 as a sharp turn in sentiment against tech giants hit the sector. But in the first three months of 2019 it returned 14.3 per cent, bringing it out flat over the period as a whole.

The property sector has returned 11 per cent in the first quarter of this year, wiping out the 5.3 per cent loss at the end of 2018 and then some, while the China and Greater China sector has eradicated its 9.9 per cent fall in Q4 with a gain of 14.7 per cent in the first three months of 2019.

Federal Reserve sets the tone

Much of the pattern of investment returns over the past six months has been dictated by the outlook for interest rates from central banks around the world, and particularly the US Federal Reserve, says AJ Bell's Hughes.

He says the volatility at the end of 2018 stemmed from panic that the Fed would raise interest rates two or three times in 2019, while the economy was appearing to cool.

Spooked investors then pulled money out of a number of areas and particularly more risky sectors such as technology and smaller companies, leading to a bout of poor performance.

The Fed has now indicated that interest rates will not rise this year and there is some speculation they could even be cut.

“This has given investors the confidence to start investing in risky assets again in the hope that central banks will successfully navigate a slowing global economy and not choke off growth,” says Hughes.

While performance over the past six months has been mixed, it is worth bearing in mind that three months is a very short recovery period – investors often have to hold their nerve for much longer. That much can be seen by looking back to other periods of volatility.

Andy Parsons, head of investments at UK stockbroker The Share Centre, says: “Investing can seem daunting, especially in the midst of political and economic uncertainty. However, the priority is time in the market, not timing the market. The best way to invest for the long term is to drip feed money in little and often and leave it be.”