IN 1853 the government of India, then directed by Britain’s East India Company, began construction of a vast rail network, continued by the British Raj, established in 1858. At the time, most inland transport in India was hauled by draught animals: with carts where roads existed and were passable; packed on animals’ backs when they were not, which was often. Moving goods across the great expanse of the subcontinent was costly and painfully slow. That changed with the arrival of the railway. Between 1853 and 1930 more than 67,000km (42,000 miles) of rail was laid across India, providing transport that was fast, cheap and reliable. A bullock could carry a pack 30km a day; an engine could haul freight 600km over the rails in the same time.

Working out the impact of this took Dave Donaldson (a PhD candidate at the London School of Economics when he started trying) nearly a decade. He dug through mountains of yellowed colonial-era records that had never before been collated and digitised. He found that eight different kinds of salt were sold across India, each sourced from just one region: this quirk allowed him to use local differences in the price of salt to calculate transport costs. He painstakingly plotted water, road and rail routes to work out how to ship from any place in India to any other most cheaply. He found that the introduction of the railway dramatically reduced costs and increased trade. Connecting to it led to significant increases in real local annual incomes: of about 16%. That compares with an increase in real income across India as a whole of just 22% between 1870 and 1930. The railway was a big deal.

This month the American Economic Association (AEA) chose to honour Mr Donaldson, now at Stanford University, with the John Bates Clark medal, which is awarded annually to a leading economist under the age of 40. He is a deserving winner: his paper on the railroads of the Raj is a particular marvel. But the AEA’s decision is particularly apt given Mr Donaldson’s focus on trade and, more narrowly, on comparative advantage. This counter-intuitive idea was first set out by David Ricardo, a great British political economist, in a book published on April 19th 1817: 200 years ago this week. It is fundamental to Ricardo’s argument that trade is not a zero-sum affair but creates opportunities for mutual gain. Mr Donaldson’s work provides an opportunity to reflect on precisely what that means.

An isolated community has to do everything for itself. It must grow whatever cotton it wants, however poorly suited the local land and climate. But, as it comes into contact with other places, it can stop doing the things it is especially bad at relative to people elsewhere. Instead, it can focus on things where it is comparatively more productive, and trade some of what it is good at making for whatever else it needs. This process can make everyone better off, even when one community is worse at doing everything than its trading partners. By specialising in the task at which it is least bad, the unlucky community frees other places to focus on what they are best at. Through trade everyone can obtain more of everything than they could produce for themselves.

Economists labour to explain comparative advantage—“Ricardo’s difficult idea”, as Paul Krugman, an American economist, once put it. They often use simplified examples, such as the classroom staple of a desert island with only two inhabitants, who can either both gather coconuts and fish or specialise in one pursuit and then trade. Ricardo himself used an example with just two goods: English cloth and Portuguese wine.

Mr Donaldson, in another paper, written with Arnaud Costinot of the Massachusetts Institute of Technology, is more ambitious. At a very fine level of geographic detail, the UN’s Food and Agriculture Organisation produces estimates of how productive different kinds of land are at producing different crops. That allows the authors to work out patterns of comparative advantage in agriculture across American counties. Using historical data on what counties produced and when, and on wholesale crop prices, the authors calculate the benefits of economic integration. They are big. Between 1880 and 1920, for instance, their work suggests that integration lifted real output per worker by 79%. Between 1880 and 1997, integration added as much to American agricultural output as did growth in its productivity.

After two centuries, the theory of comparative advantage can seem lacking in relevance. It relies on bedrock economic assumptions, like flexible labour markets, which look increasingly questionable. Economists have theoretical windows other than comparative advantage through which to examine trade. And most people are no longer engaged in the production of basic commodities; trade increasingly involves parts and components rather than finished goods. The age in which one person weaves cloth and the other makes wine is long past.

All together now

Yet Mr Donaldson’s work is a refreshing reminder of important truths. Trade is not just something countries do, but is the product of increased interaction between communities of all sorts: be they American counties or Indian provinces or neighbourhoods in a great metropolis. Expanding the possibilities for trade need not take messy corporatist agreements; new technologies can do it, too. Investments—in railways, say, or shared industrial standards or new housing in big cities—that lower barriers to trade increase the size of the market within which exchanges take place.

Finally, the promise of expanded trade is that people can stop doing things at which they are comparatively hopeless: sparing them frustration or indeed privation. Markets cannot always deliver this possibility on their own, any more than India’s railways were the work of an invisible hand. But they have a (comparative) advantage over isolationism.

Visit our Free exchange economics blog