If there is a golden rule to beating the stock market, members of the United States Congress seem to know it.

Members are allowed to trade stocks, although trading on insider information is illegal. And representatives of both parties have posted impressive returns, some gaining triple figures over the past decade — a political record that many investors would be keen to replicate.

One of the most popular portfolios offered by the investment app Autopilot, which allows retail investors to mimic politicians and hedge fund managers, is the Pelosi Tracker — named after the Democratic congresswoman and former speaker of the house Nancy Pelosi.

The @PelosiTracker­­ account on the social media site X has almost 900,000 followers. Be warned, however, that Autopilot has rated its risk level as “high”.

The portfolio mirrors the stocks sold and bought by Nancy Pelosi’s husband, Paul, an investor who owns and runs the real estate and venture capital firm Financial Leasing Services.

The S&P 500 has returned 230 percent since 2014, while his portfolio gained almost 800 percent over the same period, according to the investment research company Quiver Quantitative.

So, should we be voting with our feet when it comes to political investments?

How good is the Pelosi Tracker?

Last year the tracker finished up 54 percent, beating the performance of almost every US hedge fund.

The return of Donald Trump to the White House has triggered a flurry of trades by Congress members and their spouses hoping to capitalize on his presidency. Pelosi this month bought options on Amazon, Google, the chipmaker giant Nvidia and the healthcare company Tempus AI — locking in a price to buy it later.

Members of Congress are legally required to report within 45 days any trades worth more than $1,000 they or their spouses make. Once publicly disclosed, copycat trackers and investors replicate their stock picks.

The Pelosi Tracker’s top holding is Nvidia (making up 20 percent) followed by Google (14 percent), the power company Vistra Corp (11 percent), the cyber-security company Palo Alto (10 percent), Amazon (10 percent) and the infrastructure software company Broadcom Inc (9 percent).

Nvidia, one of the so-called magnificent seven stocks that dominate the tech sector, has emerged as one of the biggest winners of the AI race. Garry White from the wealth management firm Charles Stanley said: “Pelosi is buying into the sectors that are doing very well already and that strategy has worked for him so far. But if some clouds start to appear on the technology horizon, for example if Trump’s policies mean that inflation starts to rise sharply, then a tech sell-off could mean losses.”

Autopilot rated @PelosiTracker­­ account’s risk level as “high.”

One tech stock to have recently bucked the trend is Apple, which last week slipped to its lowest level since October after a weaker sales forecast. Pelosi sold 31,600 shares in the company in December, and since then its price has fallen about 10 percent, although it remains in the top 10 holdings of the Pelosi Tracker.

White puts this down to political tensions with China and financial pressures. He said: “There is lots of negative sentiment around Apple. Part of that may be economic slowdown and households being unable to afford new technology. And also the Chinese government has started to ban Apple phones, so the company is having to make compromises.”

A spokesman for Nancy Pelosi said she does not own any stocks and “has no prior knowledge or subsequent involvement in any transactions.”

Should you be a copycat?

Other stellar political performers include David Rouzer, a congressman from North Carolina, and Roger Williams, from Texas. They increased the value of their portfolios by 149 percent and 111 percent respectively last year, according to analysis by Unusual Whales, a data platform that publishes the trading activity of Congress members.

Anyone purely seeking to copy one person, however, should proceed with caution.

White said: “You shouldn’t really follow other people’s investment strategies and especially beware of those who call themselves gurus. Everyone has a different investment goal depending on what they want to achieve in life, whether that’s spending their money as soon as they can or saving it for old age.

“The best way to play markets over the long term is with a balanced portfolio, designed to meet your objectives.”

Experts have also cast doubt over how much higher technology stocks can rise. Laith Khalaf from the investment platform AJ Bell said: “What has been driving progress in technology for the past two years is an expectation for AI to drive revenues, which to an extent it is. Nvidia is a big winner, its chips are best in class for powering the required infrastructure, although other members of the magnificent seven are trying to develop their own chips.

“Beware those who call themselves gurus.”

“People have cried wolf about the dominance of the technology sector for a long time yet it seems to have gone from strength to strength. But it is potentially due for a correction.”

One of the biggest risks in following a politico’s portfolio is the 45-day lag in which Congress members have to disclose any trades, which can change outcomes significantly. Khalaf said: “You should be making your own decisions when it comes to investing. If it goes wrong then you can’t exactly write to Nancy Pelosi and ask for your money back.”

Who’s buying what?

US politicians are privy to extensive information, which has allowed some to make lucrative trades immediately before significant events — including the Covid-19 lockdown, the Russian invasion of Ukraine and the collapse of Silicon Valley Bank.

There is a debate over whether members of Congress should be allowed to make trades given their influence and access to confidential tradeable information, with critics calling for a ban on active members investing.

In 2020 Richard Burr, at the time chairman of the Senate intelligence committee, faced calls to resign after selling up to $1.7 million in stocks, including large holdings in hotel companies, on the eve of the pandemic lockdown and a market crash.

But for now many investors have decided that until they can beat trading politicians, they will join them. In August the trading platform eToro launched three portfolios linked to political activity in the US — including one that copies Congress members’ stock buys.

In 2023 Unusual Whales and Subversive Capital — an investment firm in favor of banning Congress members from active trading — launched two ETFs that invest in securities bought by the different party’s Congress members and their families. They are: the Unusual Whales Subversive Democratic Trading ETF (ticker NANC in reference to Nancy Pelosi) and Unusual Whales Subversive Republican Trading ETF (ticker KRUZ after the Republican senator Ted Cruz).

Many investors have decided that until they can beat stock-trading politicians such as Ted Cruz, they will join them.

Across the board, many US politicians seem to be investing in tech stocks. NANC is overwhelmingly tech-heavy and has returned more than 29 percent in the past year, beating the S&P 500, which has returned 25.48 percent. KRUZ, which last year had its top holdings in the oil giant Shell and its competitor ConocoPhillips, underperformed the same benchmark index, returning just under 20 percent.

But this year Republican investing has changed tack.

The top three holdings in KRUZ are JPMorgan Chase (JPM), Nvidia and Comfort Systems USA, a mechanical contractor.

KRUZ holds 25 percent of its assets in the technology sector and roughly 17 percent in financial services. Industrials make up 14 percent and energy 10 percent.

The Democrats have stayed loyal to the industries that delivered so well for them last year. Seven of the top 10 holdings in NANC are tech stocks — topped by Nvidia, Microsoft and Amazon — and they make up 41 percent of the fund’s holdings. Roughly 12 percent of the fund is invested in both communication services and consumer cyclical industries, and about 10 percent in healthcare.

What to watch out for

Subversive Capital warns investors in its ETFs of the fact that they do not buy and sell securities at the same time as members of Congress and may buy at a higher price or sell at a lower price.

One strategy Democratic and Republican lawmakers unequivocally have in common is their investment in home soil. US stocks make up almost 99 percent of the NANC fund and just shy of 95 percent of the KRUZ fund.

But gains in the US stock market are predominantly driven by technology stocks and the more recent artificial intelligence surge — a sector in which the UK’s FTSE 100 fails to compete on the same level, and one that is likely to already feature heavily in your portfolio.

Khalaf said: “Many investors will have exposure through US and global tracker funds. A typical global fund is going to have 75 percent invested in the US, and 33 percent of that will be going into the magnificent seven. Most investors have high exposure to the tech sector and valuations are already lofty. It is worth giving careful thought as to whether you should be ramping that up any further.”

Pelosi’s picks

Former House of Representatives speaker Nancy Pelosi — or rather her husband — has such a good reputation for DIY stock selection that some American tracker funds follow her. Indexation is the sincerest form of flattery (Ian Cowie writes).

“Indexation is the sincerest form of flattery.”

But anyone tempted to blindly follow should beware of the lag between politicians making a trade and declaring it. So some holdings could prove a bit past tense.

Pelosi’s portfolio is full of household names in newish technology and you don’t need any financial services qualifications to find them. They have served Pelosi, and anyone else who holds them, well — as I know from personal experience.

Apple used to be the most valuable holding in my 50-stock portfolio until I sold more shares last year than I ever did before. My reasons were purely personal and spurred by the worry that paper profits are all very well, but we haven’t really made a penny until we sell.

Now Pelosi’s decision to dispose of shares has prompted speculation that a bubble might be about to burst. We don’t know what the motivation was, but his actions do give cause for thought.

The artificial intelligence mania might yet succumb to natural stupidity, if investor emotions of greed and fear drive stock markets from extremes of exuberance to the depths of despair. Share prices cannot rise forever. A trend is only a trend until it stops.

Rachel Mortimer is assistant money editor at The Times and The Sunday Times of London