" I had a friend who said, 'You don't just pick the winners and losers,' " Mitt Romney told President Obama in the first presidential debate. "You pick the losers."

Romney's assessment of the billions that Obama has wasted on green energies is dead on. And unfortunately, it only tells half of the story. According to a Washington Examiner analysis of publicly available data, corporate insiders at the 15 publicly traded green energy companies that received federal stimulus subsidies pocketed tens of millions by selling their stock after the government's money poured in and before their companies' values plummeted.

The Obama administration gave more than $700 million in grants and guaranteed an additional $500 million in loans to publicly traded green energy companies through its 2009 stimulus package. If Obama had invested all that money in a Standard & Poors index fund of the top 500 publicly traded companies, his investment would have seen a 73 percent return since he took office. In contrast, the Obama "green energy" stimulus portfolio has fallen by 78 percent -- performing about five points worse than green energy companies that didn't get subsidies.

The insider trades by officers and directors of these companies tell us still more. They cashed out a net $63.9 million in stock gains before their companies' stock prices collapsed.

Biofuel manufacturer Amyris Inc., for example, was given $24.3 million in taxpayer money to turn plant sugars into diesel fuel. At one point, this helped push its stock price above $30 a share. Today, Amyris has closed two of its three plants, and its stock sells for less than $3. Amyris' insiders got rich first, though, netting $21 million in stock sales after the firm went public in September 2010.

Solazyme, another biofuel manufacturer, received $21.8 million from Obama's Energy Department. Its stock once traded at more than $25 a share but now is worth less than $9. Its corporate insiders realized $18.4 million in capital gains before the stock price collapsed.

Corporate insiders at A123 Systems were not as quick to cash out as their biofuel colleagues. The Massachusetts electric-car battery manufacturer received a $249 million grant from Obama's Energy Department in 2009, before going bankrupt last month. Its stock was worth more than $25 a share when it first went public in September 2009. A123 officers and directors still made more than $11 million in stock sales.

This analysis does not include some of the best-known Obama energy failures. Solyndra, for example, blew through more than $500 million in taxpayer-guaranteed loans before it could even go public. Another high-profile failure, First Solar, is not included because it sold off much of its $3 billion in federal loan guarantees to third parties before it laid off 30 percent of its workforce and its stock price declined by more than 90 percent from its 2011 high. The company's head, Michael Ahearn, has extracted more than $329 million in stock sales since 2009 all by himself.

One would hope that Obama would have learned some lessons from the epic failures of his green energy investments. But Americans are not that lucky. Campaigning early this year in Florida, Obama promised to "double-down on a clean energy industry that's never been more promising."

The federal government has a role to play in funding basic scientific research. It has done so for decades, through universities and through the national academies. But Obama crossed the line by investing in specific companies and their business models. As a result, the American people have lost billions in tax dollars, corporate insiders have pocketed millions in gains and we are no closer to a green energy economy.