Barclays (LSE: BARC) has been a perennial underperformer. Its shares have fallen by 21% this year as its new strategy has seemingly fallen flat with investors. And with its shares having underperformed the FTSE 100 by 40% in the last five years, many investors may have lost hope that they’ll see upbeat capital gains in future.

In the short run, Barclays and the wider UK banking sector faces a major risk in the form of a Brexit. With polls showing that the British public is split almost 50:50 on whether to leave or remain in the EU, Barclays’ share price could be highly volatile in the coming weeks. That’s because if Britain leaves the EU, then all bets are off in terms of what the impact will be on the economy.

The Bank of England has stated that the impact could be significant in the short run. And with a major nation leaving the EU being an unprecedented event, it would be unsurprising if Barclays’ share price came under considerable pressure in the aftermath of a ‘leave’ vote – simply because investors will be very uncertain as to how the British banking sector will perform in future years.

Safety margin

Of course, Barclays already offers a wide margin of safety and it could therefore be argued that its shares may be hit less hard than a number of its more highly rated rivals. For example, Barclays trades on a price-to-earnings (P/E) ratio of just 11.3 and this indicates that the market is already pricing-in near-term challenges for the bank.

Looking ahead, Barclays has considerable growth potential. Certainly, its decision to reduce dividends has been unpopular and it means that the income return that was due to rapidly rise is now likely to be rather subdued. However, it also means that Barclays could move into a more financially sound space, with a greater proportion of earnings being used to beef up its balance sheet and reinvest for future growth.

Evidence of Barclays’ growth potential can be seen in its forecast for next year. The bank is expected to increase its earnings by 49% in 2017 and when combined with its low rating, this equates to a price-to-earnings growth (PEG) ratio of just 0.2. This indicates that while Barclays’ share price has disappointed in the past, it could be a star performer in the long run.

Between now and then, Barclays has an EU referendum to survive and a number of strategy changes that may prove painful and unpopular among investors. However, with a sound asset base, a strong management team, a wide margin of safety and a global economy that may prove to be more resilient than many investors realise, Barclays remains a sound long-term buy for investors who can live with a relatively uncertain outlook.

Of course, Barclays isn't the only company that could be worth buying at the present time. With that in mind, the analysts at The Motley Fool have written a free and without obligation guide called 5 Shares You Can Retire On.

The 5 companies in question offer stunning dividend yields, have fantastic long-term potential, and trade at very appealing valuations. As such, they could deliver excellent returns and provide your portfolio with a major boost in 2016 and beyond.

Click here to find out all about them - it's completely free and without obligation to do so.

Peter Stephens owns shares of Barclays. The Motley Fool UK has recommended Barclays. We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors.