One of the key tenets of value investing is seeking out a wide margin of safety. On this front, Barclays (LSE: BARC) has huge appeal, since it appears to be trading at a significant discount to its intrinsic value. For example, it has a price-to-earnings (P/E) ratio of just 13 and with its bottom line due to grow by 56% next year, this puts Barclays on a price-to-earnings growth (PEG) ratio of only 0.2.

Clearly, Barclays is trading at a substantial discount to its intrinsic value because investor sentiment is weak. Investors are concerned about the prospects for the wider UK banking sector for a number of reasons, notably because there’s a real risk that the UK will leave the EU in less than a month’s time. However, there are other reasons why the outlook for Barclays and its peers is highly uncertain.

Warning! Rate rises ahead

US interest rate rises are just around the corner and with there being the prospect for multiple rate rises over the next couple of years there’s a real risk that the world’s largest economy will experience an economic slowdown. Certainly, the Federal Reserve has stated that it will only raise rates at a modest pace, but with there being a time lag of six-to-12 months following an interest rate rise before it has an impact on the economy, it may prove challenging to judge the right pace of change.

In addition, Barclays’ share price could be trading at a discount to intrinsic value because of fears surrounding the Chinese growth rate, as well as continued weakness in the EU. And with Barclays having a new management team that’s set to implement a new strategy including a cut to dividends, it’s perhaps of little surprise that investors are’t enthused about the bank’s prospects at the moment.

However, with Barclays having such a wide margin of safety, the above risks appear to be more than adequately priced-in. This means that there may be limited downside and vast upside potential for Barclays over the medium-to-long term. And with the bank focused on improving its financial position and selling-off assets it deems to be unfavourable from a risk/reward perspective, Barclays could gradually record improved financial and share price performance over the medium-to-long term.

Of course, many investors may prefer to buy shares in companies that are performing well and that may be viewed as offering less risk than Barclays. However, with such a wide margin of safety, Barclays may in fact offer less risk than many of its peers because the market’s expectations are already well-managed. And with Barclays likely to expand its investment banking operation and become increasingly profitable beyond the short term, now could prove to be an excellent time for long-term investors to buy a slice of it.

Clearly, 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.