In the beginning, I was afraid. Later, I was greedy and reckless.

Neither worked out for me very well.

I spent my first few years in the real estate industry helping other investors get financing to renovate old homes. I was in my early 20s and wanted to get involved, but wasn’t quite “ready” emotionally.

Then I bought my first buy-and-hold deal, and it worked out pretty well. After that, I became a vacuum cleaner, sucking up every deal I could find.

I lost a boatload of money. Some of these bad deals still cost me to this day.

I wish I had a time machine, so I could go back and slap some sense into my younger self. Here are the seven lessons I’d use my time machine to teach myself. Learn from my mistakes, so you don’t have to suffer the results like I did!

7 Lessons I Wish I’d Known When I Started Investing in Real Estate

1. Learn how to forecast cash flow accurately.

The first lesson of cash flow is that it’s a long-term average, not what happens in a “typical” month.

Cash flow works like this: For nine months, you’ll be sitting pretty, banking the (hopefully wide) margin between your rent and your mortgage. Then you’ll be slapped with a $3,000 furnace repair.

Or your tenants will decide to stop paying. Or they’ll sue you because the neighbor’s dog looked at them funny. Or whatever.

Novice landlords say to themselves, “What bad luck! Oh well, this was a freak one-time expense, next year will be better!” Which is, of course, bull$%#t.

By contrast, experienced landlords say to themselves, “Good thing I budgeted for these expenses in my cash flow calculations.”

You need to include repairs, maintenance, CapEx, vacancy rate, property management fees, accounting costs, administrative costs, property taxes, insurance, HOA fees (if applicable), and maybe even your shrink’s bill.

Sound like it’s difficult to find deals that will still cash flow properly after all those expenses? It is! Finding good deals is work—they’re not just strewn all over the MLS.

But if you learn to forecast these expenses accurately and you only invest in properties that still cash flow well, you are virtually guaranteed to make money. If you get cash flow forecasting wrong, prepare to lose money. The good news is that it’s not hard to get right, once you know what questions to ask.

Related: 4 Lessons We Learned as Our Property Management Company Grew

2. House hacking is an ideal way to get started.

What’s better than living for free? Not much.

If you aren’t deeply familiar with house hacking, read this case study about an ordinary guy with no real estate experience who house hacked and now lives for free. It’s rich in detail and will show you exactly how you can do the same thing.

When your neighboring renters pay your mortgage and other housing expenses for you, you can throw your savings into hyperdrive. For most people, their highest expense is housing. Remove that, and suddenly they can devote all the money they would have spent on rent or a mortgage toward savings and investment.

Lower expenses, higher savings rate: This is the formula for reaching financial independence very, very quickly. The really ambitious set a goal of living on half their income and investing the rest!

3. The perfect deal is a myth; look for a good deal.

New investors sometimes wind themselves up looking for the “perfect” deal. It doesn’t exist.

In personal development circles, there’s an adage that “perfect is the enemy of progress.” It’s true: If you refuse to act until conditions are “perfect,” you’ll never act. No, today’s housing markets are not as advantageous to buyers as housing markets six years ago. Get over it. That market is gone, and this is the market available to you now.

This is not to say you should buy indiscriminately. Quite the opposite—set targets for ROI and for cash flow, and commit to yourself that you will not buy any properties that don’t meet those standards.

Choose a few neighborhoods to target with care, and then focus on finding good deals within those neighborhoods. Don’t be afraid to negotiate hard to drop a property’s price to meet your standards.

Most importantly, keep at it. There are good deals out there, finding…