Among the conventional wisdom that we hear every day in the business press is that developing countries should bend over backwards to create a friendly climate for foreign corporations, follow orthodox (neoliberal) macroeconomic policy advice and strive to achieve an investment-grade sovereign credit rating so as to attract more foreign capital.

Guess which country is expected to have the fastest economic growth in the Americas this year? Bolivia. The country's first indigenous president, Evo Morales, was elected in 2005 and took office in January 2006. Bolivia, the poorest country in South America, had been operating under IMF agreements for 20 consecutive years, and its per-capita income was lower than it had been 27 years earlier.

Evo sent the IMF packing just three months after he took office, and then moved to re-nationalise the hydrocarbons industry (mostly natural gas). Needless to say this did not sit well with the international corporate community. Nor did Bolivia's decision in May 2007 to withdraw from the World Bank's international arbitration panel, which had a tendency to settle disputes in favour of international corporations and against governments.

But Bolivia's re-nationalisation and increased royalties on hydrocarbons has given the government billions of dollars of additional revenue (Bolivia's entire GDP is only about $16.6bn, with a population of 10 million people). These revenues have been useful for a government that wants to promote development, and especially to maintain growth during the downturn. Public investment increased from 6.3% of GDP in 2005 to 10.5% in 2009.

Bolivia's growth through the current world downturn is even more remarkable in that it was hit hard by falling prices for its most important exports – natural gas and minerals – and also by a loss of important export preferences in the US market. The Bush administration cut off Bolivia's trade preferences that were granted under the Andean Trade Promotion and Drug Eradication Act, allegedly to punish Bolivia for insufficient co-operation in the "war on drugs".

In reality, it was more complicated: Bolivia expelled the US ambassador because of evidence that the US government was supporting the opposition to the Morales government, and the ATPDA revocation followed soon thereafter. In any case, the Obama administration has so far not changed the Bush administration's policies toward Bolivia. But Bolivia has proven that it can do quite well without Washington's co-operation.

Ecuador's leftist president, Rafael Correa, is an economist who, well before he was elected in December 2006, understood and wrote about the limitations of neoliberal economic dogma. He took office in 2007 and established an international tribunal to examine the legitimacy of the country's debt. In November 2008 the commission found that part of the debt was not legally contracted, and in December Correa announced that the government would default on roughly $3.2bn of its international debt.

He was vilified in the business press, but the default was successful. Ecuador cleared a third of its foreign debt off its books by defaulting and then buying the debt back at about 35 cents on the dollar. The country's international credit rating remains low, but no lower than it was before Correa's election, and it was even raised a notch after the buyback was completed.

The Correa government also incurred foreign investors' wrath by renegotiating its deals with foreign oil companies to capture a larger share of revenue as oil prices rose. And Correa has bucked pressure from Chevron and its powerful allies in Washington to drop his support of a lawsuit against the company for alleged pollution of ground waters, with damages that could exceed $27bn.

How has Ecuador done? Growth has averaged a healthy 4.5% over Correa's first two years. And the government has made sure that it has trickled down: healthcare spending as a percent of GDP has doubled, and social spending in general has expanded considerably from 5.4% to 8.3% of GDP in two years. This includes a doubling of the cash transfer programme to poor households, a $474m increase in spending for housing, and other programmes for low-income families.

Ecuador was hit hard by a 77% drop in the price of its oil exports from June 2008 to February 2009, as well as a decline in remittances from abroad. Nonetheless it has weathered the storm pretty well. Other unorthodox policies, in addition to the debt default, have helped Ecuador to stimulate its economy without running too low on reserves.

Ecuador's currency is the US dollar, so that rules out using exchange rate policy and most monetary policy for counter-cyclical efforts in a recession – a significant handicap. Instead, Ecuador was able to cut deals with China for a billion-dollar advance payment for oil and another $1bn loan.

The government also has begun requiring Ecuadorian banks to repatriate some of their reserves held abroad, expected to bring back another $1.2bn, and it has started repatriating $2.5bn in central bank reserves held abroad in order to finance another large stimulus package.

Ecuador's growth will probably come in at about 1% this year, which is pretty good relative to most of the hemisphere. For example, Mexico, at the other end of the spectrum, is projected to have a 7.5% decline in GDP for 2009.

The standard reporting and even quasi-academic analysis of Bolivia and Ecuador says they are victims of populist, socialist, "anti-American" governments – aligned with Venezuela's Hugo Chávez and Cuba, of course – and on the road to ruin. To be sure, both countries have many challenges ahead, the most important of which will be to implement economic strategies that can diversify and develop their economies over the long run. But they have made a good start so far, by giving the conventional wisdom of the economic and foreign policy establishment – in Washington and Europe – the respect it has earned.