NEW YORK (TheStreet) -- Storms such as Hurricane Joaquin can make people in affected areas think about how to be better prepared for the next big one. And savvy investors can benefit from this.

Stifel, Nicolaus & Son analyst Stanley Elliott recently told Bloomberg: "hurricanes have been the best creators of awareness," when it comes to the need to buy emergency products such as generators.

Here are three companies whose sales typically spike during meteorological meltdowns-a big-box hardware chain, a major building-material supplier and a pure play on storm-related havoc.

From Flashlights to Sandbags

For many people, the local Home Depot (HD - Get Report) is stop No. 1 when weather worries hit. That was certainly the case in late October 2012, when Hurricane Sandy slammed into the northeastern United States.

The storm hit one day after the company's fiscal 2012 third quarter ended, but wary shoppers still drove up its same-store sales by 40 basis points as they rushed to get ready. In the fourth quarter of that year, sales of generators and building materials helped lift the chain's net income by 32% year-over-year. The company also beat expectations on both the top and bottom lines.

None of this, of course, has been lost on investors: Home Depot shares jumped 2.2% last Wednesday, before forecasters said it was unlikely Joaquin would make landfall in the United States. Rival chain Lowes Companies Inc.  (LOW - Get Report) saw its stock pop 3.2% on the day, though a price-target upgrade from Credit Suisse was likely part of the reason.

Of course, both retailers go far beyond emergency preparedness: they continue to benefit from the housing recovery, which is feeding renovation spending that's forecast to accelerate from 3.5% year-over-year growth in the third quarter of this year to 4.0% in the first quarter of 2016, according to July figures from Harvard University's Joint Center for Housing Studies.

At Investing Daily, we first recommended Home Depot in July 2012, and it's delivered our readers a 146% total return in that time.

(The stock remains a key building block in our Personal Finance advisory's Growth Portfolio. You can learn more about the Personal Finance process for picking stocks in the free report 29 Dangerous Stocks:Sell Now!.)

HD Chart HD data by YCharts

LOW Chart LOW data by YCharts

OC Chart OC data by YCharts

The Rebuilder

Owens Corning (OC - Get Report) is another company that benefits when skies darken: it's a maker of roofing materials, insulation and fiberglass composites for commercial and residential markets. The shares popped 4.5% last Wednesday.

Sandy was something of a double-edged sword for Owens Corning: even though Sandy added to building-material demand, it knocked out the company's roofing and asphalt plant in Kearny, N.J., leaving the facility under four feet of water. The company has since rebuilt the plant, which was insured for damage and business losses, with updated technology.

Owens Corning shares also rose sharply in the month following Sandy, gaining 4.8%, compared to just a 0.4% rise for the S&P 500 in that time.

Like Home Depot, the state of the U.S. housing market-both existing homes and new construction-has a heavy influence on Owens Corning.

U.S. housing starts fell 3% in August from the preceding month, but many economists pegged that decline on the end of an affordable-housing tax credit in New York, which prompted developers to break ground early on multi-family projects in June and July. Last month, the National Association of Home Builders said home-builder confidence rose to its highest level since November 2005 in September.

Owens Corning reported stronger-than-expected second-quarter earnings in July, thanks to higher sales across all three of its main business lines.

GNRC Chart GNRC data by YCharts

Power to the People

A purer play on storm preparedness is Generac Holdings (GNRC - Get Report) , which dominates the market for home-backup generators, with a 75% share. Residential products accounted for 46% of its sales in the latest quarter; commercial and industrial goods supplied another 47%; and the remainder came from other offerings.

With a $1.9-billion market cap, Generac falls into the small cap category, and the shares can be highly volatile. The stock rose 10% in the week leading up to Sandy and spiked 10.5% last Wednesday, closing at $30.09, when Joaquin looked set to make landfall in the U.S. It has since drifted back down to around $29.

If you're thinking about investing, keep in mind that the weather largely dictates the company's results: in the second quarter of 2015, Generac's sales fell 20.5% from a year earlier, while adjusted net income dropped 39%.

"The power outage environment continued to remain challenging during the second quarter, with overall outage severity during the first half being down significantly compared to prior year," said president and CEO Aaron Jagdfeld in the company's latest earnings release. "The record­low outage environment, coupled with excess field inventory levels exiting the first quarter, dampened demand for home standby generators more than expected during the second quarter."

Slowing investment from oil and gas and telecom companies also ate into second-quarter sales.

The company saw a 28% sales spike in the fourth quarter of 2012, following Hurricane Sandy. However, Joaquin's turn out to sea means the benefit for Generac will be more muted this time around.

While these three stocks are a literal way to invest around major storms in the market, a more figurative storm is always brewing in certain corners of the market. If you want to see a list of the where we think those storms are now, I urge you to take a look at this report called 29 Dangerous Stocks:Sell Now!. Inside, you'll see a full list of the markets most overvalued stocks, and learn the process you can use to keep avoiding them in the future. Click here now for a copy.

This article is commentary by an independent contributor. At the time of publication, the author held no positions in the stocks mentioned.