If there were an investing hall of fame, Peter Lynch would deserve a spot in it. He achieved a 29% average annual return during the 13 years he ran Fidelity's Magellan Fund. Lynch also wrote investing best-sellers, including One Up on Wall Street and Beating the Street.

In a recent interview with Yahoo! Finance's Kerry Hannon, Lynch reflected on his career. He also gave a staunch warning: Don't invest in the stock market unless you do these four things.

A person looking at a laptop.

Image source: Getty Images.

1. Buy companies you know

Probably the most famous investing advice from Lynch is to buy companies you know. He certainly practiced what he preached. 

For example, Lynch liked Dunkin' Donuts coffee. He looked into the company's business in more detail. That led to him buying shares. The stock went on to become one of his biggest winners. Dunkin' Brands Group was later acquired by privately held Inspire Brands.

2. Read investor presentations

An important corollary for Lynch to buying companies you know, however, is knowing the companies you buy. He told Hannon, "You need to understand the company story."

Lynch thinks that one of the best ways to understand companies better is to read investor presentations. He noted that earlier in his career, he and his team would have to wait for companies to mail their quarterly reports. Today, though, retail investors have instant access to much of the same information professional investors do.

He said in the Yahoo! Finance interview: "The information for the public has increased dramatically. If they want to do the work today, it's simple. There's way more information available."

3. Understand the "inning of the ball game"

A big part of understanding a company's story is to know what stage it's in. Lynch referred to this as understanding "the inning of the ball game."

He used Walmart (WMT -0.08%) as an example. Lynch noted that the retail stock was a 10-bagger after 25 years in business. Some might have thought Walmart was in its later innings.

But Lynch knew that the company was only in 18% of the U.S. market at the time. It continued to move into new areas. Over time, the stock became a 30-bagger.

Today, Walmart is in a later stage of its geographical expansion. However, the company could be in the early innings of using AI to boost profitability.

4. Summarize your investment thesis 

Lynch believes that anyone who is considering buying a stock should be able to summarize the investment thesis for doing so. But an investment thesis doesn't have to be complicated or long. He said, "You ought to be able to write at least three or four bullets -- not full sentences even."

Writing these bullet points down can help investors fully think through exactly why they should (or perhaps shouldn't) buy a given stock. The process can also help in determining when to sell a stock. Lynch told Hannon, "The main thing is to keep an eye on the fundamentals of what happens to the company's business." 

Don't be concerned if your investment thesis doesn't pan out. Lynch noted, "I was probably right six times out of 10, maybe six and a half." But if his thesis remained intact, he'd buy even more shares when stocks fell. Doing so helped him become the legendary investor he is today.