Should energy investors bet against Warren Buffett? After years of dependence on the Middle East for fossil fuels, several discoveries of shale gas in the United States are shifting the balance. The US is now predicted to be the world's largest producer of energy by 2020. By 2030, America will be a net exporter of oil. These seismic shifts are attracting investors. Barclays Stockbrokers says a sixth of its customers predict that oil and gas offer the best investment opportunities for 2013. They will be contrarian investors if they act on that hunch - energy and commodity funds had a poor 2012. Gold funds littered the worst performers' chart, alongside First State Global Resources, JPM Global Mining, Marlborough ETF Commodity, JPM Natural Resources and Thesis Australian Natural Resources. The Thesis fund lost 14.4pc, while First State fared the best at a loss of 9pc. The specialist Junior Oils trust lost 5.6pc. But the sector has already seen an uptick this year and experts expect this trend to continue. Barclays Wealth and Investment's Management in Focus market report said there were some basic factors that should sustain oil stocks at current levels. "Commodities started 2013 well, following the US government's approval of the proposed fiscal bill," it stated. The subsequent boost to market sentiment was a positive factor for commodity prices, with the sectors more closely tied to the economic outlook - such as oil and metals - proving to be the biggest beneficiaries. On a longer-term basis, geopolitical risks and the inability for oil supply growth to match demand will keep global spare capacity and inventory buffers at low levels. Several banks have woken up to the opportunities the energy sector is offering - and are snapping up exposure at bargain prices. Morgan Stanley has increased its position and is "overweight" compared with the MSCI Europe index. Iain Armstrong, oil and gas analyst at Brewin Dolphin, said the sector was not expensive but it needed a catalyst for outperformance. The stimulus from China will help but its influence on global demand is now much lower. We think that Brent oil will average $105 a barrel, helped by a modest recovery in the second half as the monetary stimulus in both the developed and developing world in 2012 increases its influence on the global economy," he said. However, we think there will be better news for natural gas prices. Despite the forecast of energy self-sufficiency by 2020 in North America and the switch back to coal due to lower prices, we think that the outlook for natural gas prices in the US has improved. The rig count has fallen and this, combined with lower prices for natural gas liquids, should in our opinion result in a more disciplined backdrop - provided that the fiscal cliff does not tip the US economy into recession. Make money from going green In the past five years the world has installed more wind and solar power than the entire total output of all of Germany's power stations. This influx means the affordability and competitiveness of renewable energy are consistently improving - great for consumers but not for investors. A proliferation of companies in the sector has led to oversupply, falling margins and low returns on capital for most. Consequently share price returns over the past two years have been awful for both industries," said Simon Webber, manager of the Schroder Global Climate Change fund. We could, though, be close to an inflection point. Modest end-market growth, industry consolidation and rock-bottom valuations represent the ingredients for a new cycle of investment returns for patient investors, as capital leaves the sector. This week investment guru Warren Buffett continued his solar project buying spree - adding to his portfolio with a $2.5bn (£1.6bn) sun-power plant in California. He bought a FirstSolar power plant for $2bn last year. Where Mr Buffett goes, many are sure to follow. Mr Webber said he would be gradually increasing his exposure to the wind and solar sectors over the next couple of years too. Roberto Cominotto, manager of the JB Energy Transition fund, said the future of the energy industry lay with renewables, although from an investment perspective there were limited short-term opportunities. Neither solar nor wind power is currently attractive; both industries are suffering excess capacity, with a flood of cheaper products coming from China. Wind turbines and solar panels are seeing huge price falls. The prices for solar panels slumped by more than 50pc in 2011 and by a further 30pc in 2012," he said. We believe that this price collapse will have a positive effect on renewables in the medium and longer term, because this is the only way for renewable energy to become competitive over traditional power sources. In some countries, including Germany, solar power already costs the same or even less than domestic electricity. For tips on how to invest in the energy sector, see Action Points.