"If you don't study any companies, you have the same success buying stocks as you do in a poker game if you bet without looking at your cards." So says Peter Lynch in his book Beating the Street.

Anyone who has played poker knows that it is a game of skill, odds, and little bit of plain old luck. Some players may have an edge over others sitting at the table. That edge may be nothing more than the ability to quickly calculate odds or pick up on subtle "tells," or maybe it is just the moxie to put all of their chips at risk on a stone-cold bluff.

But imagine that the rules of the game were changed so that no one could look at their cards. Or worse yet, imagine that everyone else could look at their cards, but you had to make all of your bets without taking a peek at your hand. Any edge you had would be gone, and you would be at a severe disadvantage. The great Doyle Brunson, also known as the Godfather of Poker, has been known to bet without looking at his cards, but even he would not be able to succeed against those odds over a lifetime of playing.

There's an old poker saying that goes, "If you've been in the game 30 minutes and you don't know who the patsy is, you're the patsy." The same can be said about investing. If you aren't attempting to stack the odds in your favor every time you put money on the table, then you'll see the patsy every time you look in the mirror.

The good news is, we don't have to treat the stock market like a game of blind man's poker. You can stack the deck in your favor. In the short run -- days, months, or sometimes even years -- the price of a stock may have little to no correlation with the success of the underlying company, but over the long term, the success of a stock becomes directly tied to the company's operations.

That's important to remember, because people often disassociate stocks with their underlying companies. They opt instead to view the stocks as standalone entities. When that happens, decisions to buy or sell are based on price swings, chart patterns, and momentum indicators. With the click of a few buttons, millions of dollars pour in and out of stocks, driving prices up or pushing them down at what can feel like a breakneck pace of uncontrollable daily volatility.

But is this really the best way to go about analyzing an investment decision? In the quote I cited to open this article, Peter Lynch argues just the opposite. He says that buying stock without studying the fundamental value of the underlying company greatly diminishes your chance of success. Notice that the emphasis is on studying companies, not studying stocks.

That means that the key to a successful investing career does not necessarily lie in just buying successful companies at bargain prices and holding on to them for the long term. Unfortunately, stocks that trade at bargain prices sit at those prices for a reason. Before you invest, it is important to figure out which companies have temporarily fallen on hard times and still have the ability to turn things around, and which companies are headed for the graveyard.

Currently, the homebuilding industry is out of favor with many analysts and investors as the nation continues to cool off after one of the hottest real estate markets in more than a quarter-century. Well-known, successful companies such as Home Depot (NYSE:HD) and Toll Brothers (NYSE:TOL) are trading at historically low valuations. Will these companies be the next batch to significantly outperform the market as economics shift and investor sentiment changes? Only time will tell.

But whatever you do, remember some wise words as we shift from Peter Lynch to Shakespeare: "There is a tide in the affairs of men which, taken at the flood, leads on to fortune." Don't miss out on fleeting opportunities, but if you're looking for genuine value, be sure you invest wisely.

Home Depot is a Motley Fool Inside Value recommendation. If you're looking for help finding quality companies at discount prices, consider joining the Inside Value community by signing up for a free 30-day trial.

Fool contributor Elliott Orsillo wishes he were a professional poker player. He lives in Pasadena, Calif., with his wife and his basset hound, Lola. He welcomes your feedback and holds no positions in any of the aforementioned companies. The Motley Fool has a disclosure policy.