With the stock market near its all-time high, few investors are terribly worried about their portfolios right now. But that makes it the best time to take steps to panic-proof your portfolio in preparation for the next financial crisis.

According to billionaire super-investor Warren Buffett, the first rule of investing is: "Don't lose money." With that in mind, we've surveyed the stock markets to come up with 13 companies you probably want to keep out of your portfolio in the new year.

The oil industry giants are embracing alternative technologies -- including biofuels, geothermal and solar. Right now, renewable sources provide only a tiny fraction of the profits they derive from oil and gas, but they'll have a real impact on the revenues of majors like BP, Exxon Mobil and Chevron in the not-so-distant future.

SunPower is on a roll: It just launch the most efficient mass-produced solar cell in the world and announced it will soon start construction of the biggest solar roof in North America. Is the market already too enthusiastic about the solar energy major, or is this a good time to buy?

LDK Solar recently announced a $240 million investment by the China Development Bank, which gives it more breathing room to deal with its short-term debt situation. Right now, the market is pricing LDK at around $7 a share. Trefis thinks its worth $12. Wondering why? Read on ...

SunPower recently launched its SunPower E20 series of solar panels, the industry's first commercially available panels which provide a total area efficiency of more than 20%. That gives SunPower a significant competitive advantage over its competitors.

LDK Solar has long depended on demand driven by government subsidies from countries such as Germany, Spain and Italy, which makes it vulnerable in this period of European austerity. Trefis has revised its estimates for LDK Solar down -- but still meaningfully above the market price.

SunPower boasts of being able to manufacture the most efficient large-scale solar modules in the industry, and shipments of its residential and commercial components have been growing rapidly. Trefis predicts they'll keep growing, especially if federal policy shifts further in favor of solar.

Haven't we seen this movie before? As costly oil makes solar look good, investors pile in -- only to be let down when overcapacity sets in and oil prices tumble again. But this time, solar's rebound may be on somewhat firmer ground. Investors, though, still need to be cautious.

Despite a growing market for solar energy, Energy Conversion Devices, which makes flexible films that converts sunlight into electricity, says it will cut 140 jobs from its Michigan operation and move some of the manufacturing to Mexico this fall to cut costs.

This year is turning out to be a good one for solar energy equipment makers and project developers. Solar panel makers saw a 92% jump in shipments in the second quarter from a year ago, and market research firms have issued bullish outlooks for the industry.