Cramer tracks Hurricane Harvey's impact on stocks
As federal and local authorities rush to mitigate the devastating effects of Hurricane Harvey, CNBC's Jim Cramer took to tracking the storm's impact on industries in its path.

"No two horrendous storms are alike. They're all terrible, and while it continues, the only thing that matters is that people are dying. Anything else is just much, much less important," the "Mad Money" host said. "But I know that many of you want to know if Harvey has any impact on investing, specifically on your portfolios, so I've got some ideas based on history."

So Cramer put together a worst-case scenario for those invested in the storm based on the havoc wreaked by Hurricane Katrina, a massive 2005 storm that killed 2,000 and caused $100 billion in damage, according to the Federal Emergency Management Agency.

The "Mad Money" host began with the losses incurred by the oil and gas industry. The United States exports roughly 5 million barrels of oil a day, including 3 million barrels of refined crude.

Considering the major refinery shutdowns that have occurred in Houston, Galveston and Corpus Christi, Cramer assumed that some 30 percent of the product will be taken out of the equation.

"That should jack up the price of refined product considerably around the country, even more than what's occurred. Now, Valero is the single most dominant refiner in the country, and on the company's website it says that it's not experiencing any material shutdowns in its operations. There should be an immediate spike to Valero's earnings," Cramer said.

While Cramer added that the impact on other oil refiners would be too difficult to gauge, he said the stock of Valero, a San Antonio, Texas-based oil producer, should see more gains thanks to the jump in gasoline prices.

But the drop in crude oil prices, paired with the refinery closures, has hit oil producers hard, particularly those in Texas' oil-rich Permian Basin.

"So much of their capacity is exported, particularly refined product, which makes it even worse for them," Cramer said.

Cramer also examined Harvey's impact on insurers. After Hurricane Katrina hit in 2005, large insurance companies like Allstate , Progressive and Chubb rallied for the following three months.

Allstate shares gained 10 percent in the three months after Katrina, Progressive's stock jumped 20 percent, and Chubb shares vaulted 27 percent.

"I think these insurers are all buys after another day or two of selling," Cramer said, including Hartford as another option. "In fact, it might not be an apples-to-apples comparison, as I expect the federal flood program will bear the brunt of the losses here. But it's safe to expect that insurers will be able to raise rates after a storm of this magnitude."

The National Flood Insurance Program is part of FEMA, which announced Monday that over 450,000 people are expected to seek some form of flood-related disaster assistance.

Re-insurers like AIG and Warren Buffett's Berkshire Hathaway , which help smaller insurance companies manage risk, will likely see a more complex outcome, Cramer said.

After Katrina, most re-insurers' stocks took an initial hit, but recovered over the medium term because they were able to raise insurance rates.

"I like this choice most of all given that Becky Quick from CNBC interviews Warren Buffett Wednesday and he will, no doubt, be extremely bullish about his company's prospects," Cramer said.

Insurance brokers' stocks like Marsh & McLennan rose alongside the insurers. As for the outliers, real estate giant CBRE gained 35 percent after the 2005 disaster due to mass re-locations.

While home improvement stocks like Lowe's and Home Depot ticked up on Monday, Cramer said not to expect substantial gains for do-it-yourself names.

"Look, I feel miserable telling you how to profit from this very sad event. But history tells us what can happen in the worst-case scenario, and that case would end up applying here, which is why it's something we need to consider, and perhaps even act on," Cramer concluded.