The war in eastern Ukraine, which has had more impact on the European economy than any news coming out of Frankfurt or Brussels, appears to be ending. Despite the sporadic attacks that have wrecked previous ceasefire attempts.

Investors have mostly assumed that the ceasefire would not hold, either because Russian President Vladimir Putin is deceitful and greedy for more territorial conquest, or because Ukraine’s President Petro Poroshenko would not accept the splintering of his country that Russia demands. But this fashionable pessimism is probably wrong.

The ceasefire no longer relies on good faith or benevolence but on a convergence of interests: Putin has achieved all his key objectives, and Poroshenko recognizes that trying to reverse militarily the Russian gains would be national suicide.

Admittedly, there is still a “party of war” in Kiev, seemingly led by Prime Minister Arsenyi Yatsenyuk, who has called on the North Atlantic Treaty Organization to back his country in an all-out war with Russia. But this week’s vote in the Ukrainian Parliament on temporary autonomy for the rebel regions suggests that most of the country’s politicians have abandoned hope of winning a war with Russia. They also understood that Western military assistance is not coming.

This may sound like a grimly defeatist analysis. Yet a modest victory for Russia was actually the least bad outcome to be expected — given that there was never any chance of economic sanctions stopping Putin, for reasons explained here in March. There are several good reasons to welcome the incipient Ukraine deal:

First, this compromise is infinitely better for Ukraine, as well as for Europe, than a protracted war. Though Poroshenko has been forced to make major concessions by offering partial autonomy to the Donbas rebels, this was inevitable.

In fact, the compromise now under discussion seems close to the deal that Putin and Poroshenko were near reaching over the summer, partly in response to the German government’s appeal for a non-military resolution to the crisis. Unfortunately, potential progress was shattered when pro-Russian rebels shot down Malaysian Airlines Flight 17. This outrage forced German Chancellor Angela Merkel to abandon her role as an honest broker and simultaneously emboldened Ukrainian hopes of gaining Western military support.

Second, Putin shows no sign of wanting to extend Russia’s boundaries after absorbing Crimea and destabilizing the Donbas. Putin has proved that he will fight against any further encroachment onto Russia’s boundaries by the European Union and NATO, which he now views as an expansionist empire.

This does not mean, however, that Putin hopes to restore Russian control over countries already absorbed by the EU and NATO, such as Poland or Lithuania. Whatever Putin’s ambitions, he understands that Russia is too weak economically to compete directly against EU and NATO “imperialism.”

Rather than trying to reverse the territorial expansion achieved in the 1990s by the European Union and NATO, Putin’s record suggests a status quo leader trying to preserve existing spheres of influence.

Third, the precedent set by carving out parts of Ukraine is not necessarily catastrophic for international law in Europe. Russia’s annexation of Crimea was not, as is often claimed, the first attempt since 1945 to move European borders by military force. Borders were forcibly changed in the breakup of Yugoslavia, the Turkish invasion of Northern Cyprus and the “frozen conflicts” in Moldova, Georgia and Azerbaijan.

Finally, what about the economic consequences for Russia and Ukraine? For Ukraine, which could potentially challenge Poland as the dominant power in Central Europe and overtake France as Europe’s leading agricultural producer, the key question is how much help the EU will provide by way of financial support and technical assistance.

Ukraine’s population of 44 million is roughly equal to Romania, Bulgaria and the former Yugoslavia combined. Whether the EU is willing to devote the huge resources in money, time and manpower necessary to reform Ukraine is far more important to the country’s future than the precise terms of a Donbas autonomy deal.

For Russia, the long-term effects of the Ukraine crisis are equally ambiguous. Russia is certainly suffering from the economic sanctions. In the long run, however, it could reap economic benefits from them, while its politics become even more authoritarian.

Russia’s economy is based on exporting energy to finance the import of Western consumer and capital goods — a glaring example of the “natural resource curse” described by textbooks of development economics. Textbooks, however, often fail to mention that the resource curse is a logical consequence of David Ricardo’s theory of comparative advantage: the classical free-trade idea that every country should specialize in whatever it makes most efficiently and import other goods.

Overcoming the resource curse means counteracting comparative advantage. One obvious way to do that is trade protectionism.

A country that wants to become less dependent on exporting resources must take steps to reduce its imports and support domestic production of the goods and services it wants to consume. While policies of self-reliance have sometimes proved disastrous — as in India, Argentina and the old Soviet Union — protection of domestic industries has been crucial for economic development in Japan, South Korea, China and Brazil. It also was key to the United States and Germany in their early stages of industrialisation.

Russia, in its two decades of post-Communist development since 1992, has zealously applied the theory of comparative advantage and become one of the most open large economies outside the Organization for Economic Cooperation and Development. Its trade-to-gross domestic product ratio of 52 percent is equal to China’s, far higher than Indonesia’s or India’s and almost double Brazil’s

If sanctions push Russia onto a path of greater self-reliance, its manufacturing and service industries will surely grow faster, even if their quality falls further behind Western standards. If Putin wants to strengthen domestic industries, he will have to improve business and strengthen the rule of law.

The Ukraine confrontation and subsequent sanctions could help transform Russia from a petro-dollar society addicted to imports of Western luxury into a poorer economy that is less flashy — but better balanced and ultimately stronger.

PHOTO (TOP): A boy sits on an armored personnel carrier as he poses for a picture during a parade in Luhansk, eastern Ukraine, September 14, 2014. REUTERS/Marko Djurica

PHOTO (INSERT 1): Ukraine President Petro Poroshenko speaks to reporters following his meeting with President Barack Obama at the White House in Washington, September 18, 2014. REUTERS/Kevin Lamarque

PHOTO (INSERT 2): Ukraine’s President Petro Poroshenko shows a signed landmark association agreement with the European Union during a session of the parliament in Kiev, September 16, 2014. REUTERS/Valentyn Ogirenko