A few years ago I wrote several articles on the folly of producing corn-based ethanol as fuel for cars. At the time the United States was encouraging ethanol use through subsidies and tax breaks for ethanol producers. The result was surging investment, the creation of huge capacity financed in large part by stock issues on Wall Street, and a global increase in the price of corn.
This step was backed by a large agricultural lobby that benefited from the demand for corn. They were joined by lobbyists from the financial sector who saw an opportunity to clip coupons, and politicians who received positive exposure for working to reduce the price of fuel and dependence on Arab countries.
Some people criticized the subsidies' illogical nature. Among the critics were scholars and energy professionals, as well as people nobody listens to anyway, such as former Cuban President Fidel Castro and Venezuelan President Hugo Chavez.
The critics were singled out as people with vested interests linked to the oil companies, or simply as crazy radicals who hate America.
But it later turned out that the critics were right. Food prices did indeed increase precipitously, arousing great anger among poor people.
At the same time, there was a surplus of production capacity at the refineries, and their profits began to drop. Most started to lose money and some collapsed.
In addition, there was almost no decline in dependence on oil; for the most part, the large investments went down the drain. In short, this was no big success story.
In 2007, Spain passed legislation to encourage the construction and operation of solar farms. The intention was good: A reduction in the use of finite and polluting energy sources such as coal, oil and gas, and the creation of jobs in the clean industry to be developed.
Creating electricity from solar energy is based on photovoltaic cells that convert light into electricity. This is a much more expensive technology than the polluting sources, so a substantial subsidy is needed - otherwise it wouldn't be worthwhile to begin such a project.
The government obligated the electricity companies to buy electricity at a high price from the operators of the solar farms. They signed a 25-year contract, with the government promising to cover the difference between the high purchase price and the cost of traditional production of electricity.
The logic was that it was worthwhile for the taxpayer to bear the burden because the long-term benefit - reducing pollution and the impetus to start the new industry - would exceed the cost involved in the subsidies.
Take it from the song in the musical "My Fair Lady" - in southern Spain there are many more sunny than rainy days, so building large solar installations on the sunny plains seemed logical.
The subsidy's size and the fact that it was unlimited created great momentum in building solar installations. Entrepreneurs from all over the world hastened to build solar farms in Spain.
They pictured a two-digit, almost risk-free return on the investment, which was backed by government legislation for 25 years. The business profile of the projects enabled them to obtain bank loans on easy terms or raise money from the public.
At first it seemed to be succeeding. The speed and ease of building solar installations produced a pace of construction that exceeded all the early predictions.
Suddenly there was global, as well as Spanish, momentum to produce photovoltaic panels used by the solar farms.
But the global crisis - which hit Spain badly - lowered tax revenues in that country. Electricity bills became oppressive for the Spanish government.
The subsidies for solar energy total about 3 billion euros, and the government is stuck with this annual cost for more than 20 years. In a country afraid that its budget crisis will turn into a debt crisis, that's a very great burden. With electricity production from solar energy providing less than 5 percent of Spain's energy consumption, the logic of the entire move is in doubt.
As a first step in damage control, the Spaniards stopped subsidizing new solar projects. As a result, demand for solar panels dropped, as did their prices. Panel factories drastically curtailed production, so the big promise for creating jobs was lost.
It should be mentioned that from the beginning the hope of building a strong Spanish panel industry was exaggerated. As in almost every industry, production in China is cheaper, so demand for photovoltaic panels in Spain created more jobs in China than in Spain. And the dream of starting a local industry that would help alleviate unemployment - a particularly serious problem in Spain - did not come true.
The Spanish government is now facing a tough dilemma. Although future subsidies have been drastically curtailed, the government is still paying billions annually due to contracts it signed, which are backed by legislation.
So Madrid has to make a difficult decision. It could stick to past commitments and allow entrepreneurs to continue to earn what they were promised, at the expense of the taxpayer and the dwindling state budget.
Or it could use the government's exclusive (but unfair ) right and change the rules of the game after the fact when it discovers that it is losing too much.
On the one hand, a government that violates contractual obligations is not common in the global economy, and there is liable to be a heavy price in terms of the country's credibility. On the other hand, when you have huge deficits, expenditure of 3 billion euros every year is not to be taken lightly.
No decision has been made on the matter, but the Spaniards are discussing it very seriously, to the chagrin of the farm operators and the various investors, who in the worst case - if the subsidies for existing installations are cut significantly - could lose their entire investment.
What are the conclusions from this Spanish story? First, projects similar to those in Spain are being carried out in other places, including Israel. The decline in the cost of building solar farms, which is partly related to excess production capacity that was created at the expense of the Spanish government, has narrowed the gap between the cost of producing electricity from solar energy and traditional sources.
Therefore, a far lower subsidy is sufficient. Sometimes it's not a good idea to be the first to adopt such an initiative. Maybe it's best to let the pioneers break their heads and learn from their experience.
Second, subsidies is not always a dirty world; they are sometimes justified. But if you decide to subsidize, the overall sum should be limited in advance.
The private market and efficient entrepreneurs are looking for every opportunity to sting the government, as long as it gives them a legal opportunity to do so. It is absolutely forbidden to give an open check to experienced entrepreneurs at the taxpayers' expense. When the market sees such opportunities, it becomes surprisingly fast and efficient.
Third - and here I'm liable to anger the greens and environmentalists - it's impossible to completely ignore monetary and economic considerations in the transition to clean energies. Technologies that are not efficient enough cannot be justified in the long run if they cost too much.
If we take the Spanish experience, imposing an annual expenditure of 3 billion euros on the state budget is an intolerable price for 4 percent or 5 percent production of clean electricity. In hindsight, if it were possible to travel back in time, we can assume that Spain would completely waive the hasty law it passed three years ago.
The writer is the CEO and chief investment manager at Compass Trust.