But the ways that these people become wealthy — and lose everything — are not that far apart. In both fields, after all, the money comes from a potentially volatile asset in a cyclical industry.

I spoke this week to financial advisers for both groups to learn how the executives in these fields think about risk, plan for the fallow periods and make sure that their good fortune lasts.

This is the second of three columns about what we can learn from the investment behaviors, good and bad, of people in a variety of well-paid industries. Last week, I took a look at the highfliers in sports and the oil and gas business, and next week, I plan to look at doctors and lawyers, the slow but steady earners.

Here are some lessons from executives in the high-tech and real estate worlds.

IT ALWAYS LOOKS GREAT ON PAPER Mike PeQueen, a managing director at HighTower Las Vegas, a wealth management firm, is a Las Vegas native who resisted the city’s long, strong property boom. He preferred stocks but felt, at times, as if he were the only one of his friends to believe in diversification.

Only now is the magnitude of their real estate losses sinking in for people who once talked about owning private jets. “Because of the long-term nature in real estate compared to the short cycle in the stock market, they don’t understand cycles exist,” Mr. PeQueen said. “For 25 years, Las Vegas real estate went up, and then it went down. They thought it would be a one-year down market. It’s been five or six years, which is normal.”

Mr. PeQueen said his clients and friends were, in the gambling parlance of the city, letting it all ride on real estate. Not only did they use properties to buy more properties, but they rarely thought of buying property elsewhere.

“Five real estate investments in Vegas is not diversification,” he said. “Any thought that they could buy rental houses in Phoenix seemed absurd. That location bias was very strong.”

Yet this strategy did not affect all investors equally. Owners who did not take on a lot of debt have been able to hang on. But Mr. PeQueen said that many real estate investors misunderstood or ignored the concept of total return.

“They thought the rent was their return, and not the rent plus the continued decline in the house’s value,” he said. “They can’t imagine that they made a fortune and lost it.”

Still, concentrated investments are how most real estate investors have made their money. In New York, for example, where the value of a single office building can reach $1 billion or more, even the wealthiest families own only a handful.

“They have concentrated risk, but they derive comfort in that they know it so well,” said Maureen K. Clancy, a managing director at Barclays Wealth. “There is a certain security that comes from that hands-on involvement.”

Ms. Clancy’s strategy for preserving wealth is to persuade real estate owners to put some of their money in safe investments that have nothing to do with real estate and to work with them on their level of debt.

“Many people would assume real estate means aggressive,” she said. “The underpinning of their wealth is based on this shared belief that conservative leverage gives you incredible staying power.”

Downturns, of course, are the best time to buy properties inexpensively. And Ms. Clancy’s clients, with lower leverage, have been able to undercut competitors who are struggling under greater debt.

LEARN FROM THE PAST Many of the people in the social media world who have gotten wealthy in recent years seem to have acquired their money in the opposite way: with only a tenuous link between time spent at a company and the size of their reward. But the ones who got truly wealthy spent years wondering if their idea was going to pan out.

Now that they have the money, they are acting more cautiously and diversifying their company stock in a way that technology developers did not in the 1990s boom.

“In the ’90s, the theme was companies didn’t want their employees to sell a single share of stock,” said Mark T. Curtis, a managing director at Morgan Stanley in Palo Alto, Calif. “Now, I’d say among our corporate relationships, they want us to help their employees with financial education. They say, ‘We’ve given them equity to reward them for the success of the company but help them not take all of this risk.’ ”