You can learn a lot from observing animals in the wild — if you have time and patience. As a decidedly impatient sort, I find it easier to watch David Attenborough on television, where the distinguished naturalist compresses years of research and months of on-site filming into an hour or so.

Don’t get me wrong. I love a hike in the Scottish Highlands as much as anyone, especially now when the pandemic makes such trips impossible and therefore more tempting. However, even on the longest walk it’s hard to spot a fraction of the fascinating fauna shown in a single episode from Sir David.

Among his favourite themes is herd behaviour — the way animals stick together when it seems irrational — at least in the eyes of the rational human observer. For example, wildebeest plunging into a foaming river to get to the other side, even when they see those entering the water first dragged away by the current.

It’s an image that finance experts have often applied to the markets, especially at times when investors seem to be throwing logic aside in pursuit of a fast-flowing stock surge.

Wildebeest figure prominently in a report this week from bankers Rothschild & Co, which says that investors often exhibit the same “herding behaviour” as animals, seeking “the safety and comfort of the herd”. In a boom, they pile in together into overvalued markets; in a bust, they collectively panic and dump stock.

Rothschild’s timing is no accident, coming amid growing warnings of a global investment bubble, notably in US tech stocks. Veteran fund manager Jeremy Grantham, co-founder of the GMO investment company, warned this month of a “bubble that is beginning to look like a real humdinger”.

Mark Wallace, senior portfolio manager at Rothschild, said: “People see their neighbours getting very rich and they want to do the same. It’s extremely difficult to restrain yourself from herd-like behaviour.”

The report includes some fascinating science, including a Leeds university study which tracked people who had been asked to walk about in a large hall. A few were given secret instructions to follow a specific route. Although participants were forbidden to communicate, the “uninformed” ended up following the “informed” in a snake around the floor. And they did that with no benefit in sight — the comfort of following others was enough reward.

Rothschild cautions that even professional investors fall for the lure of the herd, even when they know they are breaking their own investment rules. Some do so knowingly, buying overvalued stocks in a boom in the belief that others will drive prices even higher.

Now, professional investors are far from agreed that we actually have a market bubble today, even in high-priced US tech stocks. Howard Marks, founder of Oaktree Capital and just as experienced a fund manager as Mr Grantham, this week rejected suggestions that it was time to switch out of tech and into lower-priced, out-of-favour shares, such as financials and energy — the so-called value stocks.

Criticising traditional valuation models, which generally say value stocks are cheap now and tech is super-expensive, Mr Marks said: “Investing on the basis of rote formulas and readily available fundamental, quantitative metrics should not be particularly profitable.”

So what has all this to do with the retail investor? Clearly, if the professionals were 100 per cent sure that tech was in bubble land, those stocks would already be collapsing.

Instead, there is widespread uncertainty. For the moment, worries about high asset prices are offset by the confidence generated by the huge injection of ultra-cheap money by central banks into markets and, in tech, the sense that a entrepreneurial revolution is creating unmissable opportunities.

In a clear sign that the bulls aren’t ready to concede, Affirm, a US consumer finance start-up, saw its stock almost double on its stock market debut on Thursday, giving it a $23bn-plus valuation.

With so much cash around, many well-off households in the UK and other developed countries are well-placed to invest — having mostly seen their savings rise in the past year, as Covid-19 has led to cancelled holidays and entertainments. While the pandemic has left the poor worse off, the rich are in a stronger financial position.

As returns on bank deposits and safe bonds are negligible, the opportunity cost of holding equities is limited. So stocks remain in fashion, even when they trade at historically high price levels.

Moreover, even in equities there are still safety plays. The UK market, which has underperformed because of Brexit and because of a lack of tech stocks, is widely seen as ripe for recovery. Alexander Wright, a Fidelity fund manager, recently told an FT panel that the UK was “the best-value market globally”.

More generally, past precedent shows that investing in equities makes sense as a long-term strategy, as long as you are in a position to ride out a sell-off that might last a year or two. Tom Holmes, managing director of Salisbury House Wealth, a London-based wealth manager, says: “Equities . . . have outperformed all other asset classes”, returning 12.4 per cent a year in the UK since 1925, compared with 6.6 per cent for global bonds and 4.9 per cent for cash.

Rothschild recommends picking stocks on the basis of careful analysis of individual companies. It is currently backing Ryanair (on travel recovery hopes), US cable television companies (stay-at-home entertainment), and London-listed construction equipment rental group Ashtead (good management coping well with the pandemic).

Still, retail investors need to take care in today’s markets. If you think that global equities are near a likely peak, it may be a good time to break with the herd and take profits, especially with “risk-on” assets such as tech stocks — even if you believe prices may have a little further to climb.

A surprise shock could come from anywhere. Andrew Slimmon, of the investment management arm of US bank Morgan Stanley, says that the moment the US Federal Reserve hints at ending easy money policies, “sky-high valuations” will be hard to justify. He also warns in a report that investors don’t seem to be taking account of geopolitical risks. “When they do come to the surface, expect to see panic.”

Private investors are generally less well informed than professionals and, typically, in no position to move as quickly. Unless you are willing to sit in front of screens night and day, you will rarely have a good sense of market direction. You will be the wobbly-kneed weakling of the wildebeest herd, easily taken by the torrent.

Stefan Wagstyl is editor of FT Wealth and FT Money. Email:  Twitter: