If you are going to take investing advice from anybody, Ray Dalio is a good bet.
Dalio founded investment firm Bridgewater Associates out of his two-bedroom apartment in New York City in 1975. Currently, Bridgewater Associates has $160 billion in assets under management, making it the largest hedge fund in the world.
According to Dalio, "diversifying well is the most important thing you need to do in order to invest well," he wrote on LinkedIn on Monday.
Dalio said in the 2016 book "Money Master the Game: 7 Simple Steps to Financial Freedom" by Tony Robbins that a well-diversified portfolio might include 30 percent allocated to stocks, 40 percent to long-term U.S. bonds, 15 percent to intermediate U.S. bonds, 7.5 percent to gold and 7.5 percent to other commodities. A typical portfolio split of half stocks and half bonds is not really diversified, according to Dalio.
Diversification is important because there is so much you don't know when you are putting your money in an investment, Dalio said in his LinkedIn post.
"It's very hard to make money in the markets for the same reason that it's hard to make winning bets at the racetrack: because the unknowns are so large in relation to what is 'discounted' or 'priced in,'" Dalio wrote.
So "while you can't know which of the items you are betting on will provide better results," Dalio said, if you diversify properly, "you do know that they will behave differently, and by mixing them appropriately you can reduce risk. Diversifying well is a matter of knowing how to reduce your expected risk by more than you reduce your expected return (i.e., improving your return-risk ratio)," Dalio wrote.
Legendary investor Warren Buffett gives similar advice. The so-called "Oracle of Omaha" recommends investing in different companies and buying stocks at different times.
"The best thing with stocks, actually, is to buy them consistently over time," Buffett told "Squawk Box" in February 2017. "You want to spread the risk as far as the specific companies you're in by owning a diversified group, and you diversify over time by buying this month, next month, the year after, the year after, the year after."
Buffett also recommends holding on to stocks.
"I know what markets are going to do over a long period of time: They're going to go up. But in terms of what's going to happen in a day or a week or a month or a year even, I've never felt that I knew it and I've never felt that was important," Buffett told Becky Quick on "Squawk Box" in February 2016.
"I will say that in 10 or 20 or 30 years, I think stocks will be a lot higher than they are now."
Like this story? Subscribe to CNBC Make It on YouTube!
This story has been updated.