The S&P 500 is up more than 200% over the last six years and that can make finding cheap stocks seem impossible; but don't tell that to Bill Miller.

The legendary value investor has made a career out of uncovering bargains in any environment. In fact, his willingness to bet on head-scratching and stomach-churning stocks earned Legg Mason Value Trust the nickname "The Scariest Portfolio Ever" by Money Magazine in 2002. It was a title that Miller relished while he was in the midst of outperforming the S&P 500 for 15 consecutive years between 1991 and 2005.

Today, Miller runs Legg Mason Opportunity Trust. The name may have changed, but his approach to finding value is the same. Here's how he does it.

"What we try to do is take advantage of errors others make, usually because they are too short-term oriented."

The crux of Miller's approach is simple: Do the opposite of everyone else. This starts with taking a long-term view. 

According the Investment Company Institute, over the last 30 years the average turnover rate among mutual funds has been 60%. This means that the average fund is replacing more than half of their holdings each year. This focus on immediate results leads to swift, and often irrational, decisions based on poor short-term prospects. By investing with a three, five, or even 10-year time horizon, Miller can find value in companies that the market is ignoring.

"... or they react to dramatic events, or they overestimate the impact of events and so on." 

With time on your side, the best bargains are those companies that look miserable today, but have strong long-term prospects.

A great example of this is Miller's investment in UnitedHealth Group. It wasn't the $114 billion health insurance behemoth it is today, but back in 1998 when it was worth a mere $7 billion Miller explained that the company was the "leading independent HMO in the country, generates free cash, [and] is repurchasing its stock." All of which are good signs of a healthy business. 

Even better, UnitedHealth planned to acquire Humana using $5.5 billion worth of stock; a merger would have created a health insurance powerhouse. Unfortunately, weak earnings lead to substantial restructuring of UnitedHealth's operations, which included cutting 4,000 jobs, and absorbing a $600 million loss in the third quarter of 1998. UnitedHealth's stock price plummeted 50% in a matter of months, and the merger fell through. 

Despite the news-worthy events, Miller saw this as a short-term problem. So, he bought the stock in late 1998 and held it until he left the Value Trust fund in late 2011. UnitedHealth was up 1,000% and generated a 20% compound annual return. 

"Sometimes it involves owning things people don't understand properly, such as Amazon." 

Checking the bargain bin for out-of-favor stocks is typical for value investors. However, Miller will also target companies that are widely considered overvalued. One example is Miller's investment in in 1999. 

As Miller explained, there was a lot going against Amazon at the time: "Its business model is unproven (some would say unknown); it does nothing but report losses. The book business is mature, slow growing, and fiercely competitive." He added, "[T]he value of Amazon ... exceeds that of Borders by 30 times, and Barnes and Noble by almost 20 times." 

However, Miller isn't afraid to throw valuation metrics aside. He pointed out that Amazon may not have looked attractive based on traditional measures (price-to-earnings, price-to-book, etc.), but "that speaks more to the weakness of those methods than to the fundamental risk-reward relationships of those businesses." Essentially, traditional measures only work with traditional companies. So, when a disruptive Internet company like Amazon arrives, you end up with its growth potential being compared to brick-and-mortar book stores. This was a clear misunderstanding of what Amazon could be, and that led many investors to view Amazon as overvalued.

"It is trying to invest long-term in a short-term world, and being contrarian when conformity is more comfortable, and being willing to court controversy and be wrong, that has helped us outperform." 

Miller has made a career out of bold bets that paid off huge, but his career is also riddled with blunders. One example is Kodak, which he bought in 2000 and held as it struggled to adapt to digital photography. The company went bankrupt in 2012. Also, and most infamously, he was holding Countrywide Financial and Bear Stearns, as well as AIG and Citigroup during the financial crisis in 2008. 

Over time, his winners have far outpaced his losers, and perhaps the most important reasons for this success has been his temperament. Having the right strategy is important, but to get the most out of the cheap stocks you find, as Miller said, it takes a willingness to be wrong. It is that philosophy that allows Miller to buy and hold stocks that everyone else is selling.