The powerful truth often repeated in financial circles is that making a lot of money doesn’t require a high IQ, either in the market or in business. It takes ruthless cost control, a disciplined routine, and a focus on doing what is right for the long term. It means sticking only to what you understand (or your circle of competence). The formula for success hasn’t changed in the past couple of centuries, and it seems unlikely to change in the foreseeable future. Here are five rules for making money during a stock market crash.

Rule No. 1: Buy Into Good Businesses

Buy shares of good businesses that generate real profits and attractive returns on equity, have low to moderate debt-to-equity ratios, improve gross profit margins, have shareholder-friendly management, and have at least some franchise value.

Rule No. 2: Follow a Formula

Dollar-cost average into and out of your positions, buying and selling at fixed rates and set amounts of money. That will allow you to avoid buying a position at a peak or selling it at a bottom. You’re never going to be able to time the market, so stick to a routine policy of regular share accumulation or liquidation.

Rule No. 3: Reinvest Your Dividends

Reinvest your dividends, because it will supercharge your dollar-cost averaging program. The work of renowned finance professor Jeremy Siegel has shown, time and again, that reinvested dividends are a huge component of the overall wealth of those who have made their fortunes by investing in the market.

Rule No. 4: Watch Out for Fees

Keep your costs low. In 2018, the average management fee for actively managed mutual funds was 0.67%. An index fund, alternatively, just buys and holds a basket of stocks established to mirror an index—most often, the S&P 500 or the Dow Jones Industrial Average. With almost no maintenance expenses, a low-cost mutual fund or ETF could cost a mere 0.10% of assets per year or $100 for every $100,000 you have invested.  For example, consider a 25-year-old who invests $10,000 in a retirement account. She plans to retire in 40 years. At age 65, that $10,000 would be $57,435, assuming a 6% rate of return. Her total fee costs:

$1,698 if her expense ratio is 0.10%$9,197 if her expense ratio is 0.58%

Think about that—the same investment, with only slightly lower expenses, could get you about $7,500 in additional after-tax retirement income without ever having to touch your portfolio.  Most investors don’t realize the importance of fees, because the money is automatically deducted from the mutual fund itself. In other words, they don’t have to write a check, so it’s a case of “out of sight, out of mind.”

Rule No. 5: Have a Backup Plan

Finally, the last secret to building your fortune when Wall Street is in a storm is to create backup cash generators and income sources. That is one of the single most important things you can do to cut your risk.  Even if you are an attorney earning $300,000 per year or an actor making $2 million per film, you will have a much more enjoyable life if you know that you aren’t dependent upon your next paycheck to maintain your standard of living. Consider the method of legendary investor Warren Buffett, known as the Berkshire Hathaway Wealth Model, which takes a two-prong approach to acquire wealth. This method makes it far easier to amass the first few million dollars in net worth.  In essence, you live off your day job, funding your retirement out of your regular salary. Then, you build other cash generators that you use to build your investment portfolio. These could be passive income investments, like rental homes, patents, or royalties. Or they could be small businesses managed fairly independently by a team you hire, like a franchise business location or retail storefront. That way, while you’re doing your regular thing—going to work, picking up the kids, having staff meetings, and putting gas in the car—your cash generators are pouring money into your brokerage, retirement, and other investment accounts. This strategy can shave decades off your quest for financial independence, not to mention protect you if you happen to lose your job. Think about Warren Buffett’s company’s subsidiaries. If Duracell were to go bankrupt, he would still be rich from Berkshire Hathaway’s ownership of GEICO. If that were to go down, too, he still has Nebraska Furniture Mart. If that were destroyed, there’s always Benjamin Moore and Co., the paint company. If that were wiped away, he could always fall back on Ben Bridge Jeweler. There are also KraftHeinz, Fruit of the Loom Companies, Borsheims, and Brooks, the sports clothing manufacturer. All of this started with a paper route that provided Buffet’s initial capital more than 70 years ago. Consider the small backups you can begin building into your financial plan today. Funding your investments from a variety of sources will better position you to handle a stock market crash. The Balance does not provide tax, investment, or financial services or advice. The information is being presented without consideration of the investment objectives, risk tolerance, or financial circumstances of any specific investor and might not be suitable for all investors. Past performance is not indicative of future results. Investing involves risk, including the possible loss of principal.