Some people, it seems, would swing a sword to defend their favorite type of investing. Plenty will argue that real estate is best. Others prefer the stock market. But they’re both great investments­…for those who use their heads. Wise people, like Warren Buffett, don’t bother wielding steel to defend what they like. He might be the world’s most famous stock investor, but there’s plenty he can teach about real estate too.

Buffett made his fortune running the insurance company, Berkshire Hathaway. His company insures other corporations. Those corporations make regular payments to Berkshire, known as premiums. In insurance-speak, accrued premiums are known as the float. Over time, Berkshire Hathaway’s float far exceeded what it paid in insurance claims. Buffett invested that float in private and public businesses. Those businesses paid cash dividends. Their shares also increased in value, and Berkshire’s share price reflected that growth. Buffett became the company’s chairman in 1965. If you had invested $100 in Berkshire Hathaway stock back then, it would have grown to $2 million by June 25, 2019.

In other words, Buffett might be the world’s best business-buyer. And when people buy an investment property, they’re buying a business. Like any company, investment properties have a price. They also have earnings, if they’re being rented.

Rule #1: Show Me The Money

Warren Buffett’s investment rules are remarkably consistent. They’re best collated in Lawrence Cunningham’s book, The Essays of Warren Buffett. When he’s looking at a business, Buffett calculates the earning’s yield. In other words, if a company is selling for $1 million, and its annual revenue, after expenses, is $100,000 a year, then the business’ yield is 10 percent (100,000 divided by 1,000,000 = 0.10). When Buffett considers buying a business, he compares the earning’s yield to that of a risk-free 10-year treasury bond. If the yield is much higher than a treasury bond, it piques his interest. By comparing investment yields, Buffett can compare one company to another.

Investors should do the same with real estate too. Property yields can vary a lot. For example, consider two properties. They each cost $500,000. The renters in the first property pay $50,000 a year. That’s a 10 percent yield. The renters in the second property pay $20,000 a year. That’s just a 4 percent yield, which isn’t much higher than the yield on a 10-year treasury bond. If the condition of the properties and the quality of the tenants were the same, the higher yielding property should look like a diamond next to a potato.

Rule #2: Do You Know What Could Change The Yield?

In 1993, Warren Buffett bought some commercial real estate. He reveals the story in his 2013 letter to Berkshire Hathaway shareholders. The yield was 10 percent. He also knew that one of the tenants had signed a long-term contract at a low rent level. When that contract expired, the earning’s yield would soar. “The unleveraged current yield from the property was about 10 percent,” he wrote. “But the property had been undermanaged…[and] the largest tenant — who occupied around 20 percent of the project’s space — was paying rent of about $5 per foot, whereas other tenants averaged $70. The expiration of this bargain lease in nine years was certain to provide a major boost to earnings.”

You might not be so lucky. But if several new businesses are moving into an area of interest, this might also boost rents, raising yields along with it. However, like Buffett did when he made his purchase, make sure any yield is already strong before you buy.

Rule #3: Avoid Speculation When Embracing Location

Plenty of real estate investors focus on location, and for good reason. But Buffett says investors should focus more on earnings. In other words, a great location might mean you can attract great tenants and charge them a premium over a less desirable space. But if real estate investors want to follow Buffett’s tenets, they shouldn’t buy a property just because they think the price will rise. As Buffett wrote, “If you…focus on the prospective price change of a contemplated purchase, you are speculating…I am unable to speculate successfully, and I am skeptical of those who claim sustained success at doing so.”

Rule #4: Buy and Hold

Buffett says his favorite holding period is forever. Plenty of others trade stocks like feverish kids trading Pokemon cards. They might do well, short term, but over the long haul, such investors often see their luck run dry. It’s much the same with properties. Unless you’re especially skilled at buying and fixing (to upgrade a home and increase its market value) consider Buffett’s way. When investors flip properties, it increases their risk. It also increases their transactional costs and their taxes.

Rule #5: It’s About a Billion Razor Blades

Berkshire Hathaway has been a long-time shareholder of Gillette (now part of Procter and Gamble). Buffett says he sleeps well knowing that when he goes to bed, millions of men grow whiskers overnight. When they wake up, many shave with Gillette. This means Gillette has multiple sources of revenue. Every person who shaves with Gillette adds to the company’s sales. In contrast, if Buffett owned a company with just one customer, his risk would be higher and he wouldn’t sleep as well.

Such is the case with homes. That’s why real estate tycoons buy commercial buildings instead of a gazillion single family homes. A single family home has just one source of revenue. In contrast, a duplex or triplex reduces risk. If one tenant moves or can’t pay the rent, the others still provide revenue for the month. What’s more, when all other factors are equal (location and quality of tenants), multi-revenue properties tend to have higher earning yields.

Rule #6: Buy What You Understand

Buffett buys businesses that are within his “circle of competence.” He and co-chairman, Charlie Munger, say it doesn’t matter how big your circle of competence is, but you should stay within its bounds. For real estate investors, that means buying properties in places you understand. Do you know the location well? Do you know the tax laws? Do you know what types of tenants you can expect? Do you know what environmental or economic factors might decrease or challenge your annual revenue? Properties in a new mining town, or those in foreign countries like Thailand or Mexico, might look enticing. But if they’re outside your circle of competence, you’ll be taking higher risk.

This brings us to Warren Buffett’s most important investment rule:

Rule #7: Don’t lose your money.

Championship portfolios, whether they’re real estate or stocks, are rarely the result of a single home run. We like sharing stories about a single hot stock, or how Johnny Lucky retired on a golden property pick. But most fortunes are built with a lot of common sense. If we stick to something sensible, like Warren Buffett does, we should see our profits soar.

Andrew Hallam is a Digital Nomad. He’s the author of the bestseller, Millionaire Teacherand Millionaire Expat: How To Build Wealth Living Overseas