IN THE next 40 years, humans will need to produce more food than they did in the previous 10,000 put together. But with sprawling cities gobbling up arable land, agricultural productivity gains decreasing, and demand for biofuels increasing, supply is not keeping up with demand. Clever farmers, scientists and entrepreneurs are bursting with ideas. But they need money to make this jump.

Financiers more often found buying and selling companies have cottoned on to the opportunity. Farm gates have traditionally been closed to capital markets: nine in ten farms are held by families. But demography is forcing a shift: the average age of farmers in Europe, America and New Zealand is now in the late fifties. They often have no successor, because offspring do not want to farm or cannot afford to buy out family members. In addition, adopting new technologies and farming at ever-greater scale require the sort of capital few farmers have, even after years of bumper crop prices.

Institutional investors such as pension funds see farmland as fertile ground to plough, either doing their own deals or farming them out to specialist funds. Some act as landlords by buying land and leasing it out. Others buy plots of low-value land, such as pastures, and upgrade them to higher-yielding orchards. Investors who are keen on even bigger risks and rewards flock to places such as Brazil, Ukraine and Zambia, where farming techniques are often still underdeveloped and potential productivity gains immense.

Farmland has been a great investment over the past 20 years, certainly in America, where annual returns of 12% caused some to dub it “gold with a coupon”. In America and Britain, where tax incentives have distorted the market, it outperformed most major asset classes over the past decade, and with low volatility to boot (see chart). Those going against the grain warn of a land-price bubble. Believers argue that increasing demand and shrinking supply—as well as urbanisation, poor soil management and pressure on water systems that are threats to farmland—mean the investment case is on solid ground.

It is not just the asset appreciation and yields that attract outside capital, says Bruce Sherrick of the University of Illinois at Urbana-Champaign: as important is the diversification to portfolios that farmland offers. It is uncorrelated with paper assets such as stocks and bonds, has proven relatively resistant to inflation, and is less sensitive to economic shocks (people continue to eat even during downturns) and to interest-rate hikes. Moreover, in the aftermath of the financial crisis investors are reassured by assets they can touch and sniff.

Some are already getting their boots dirty. In 2009 Hassad, part of Qatar’s sovereign-wealth fund, asked Bydand Global Agriculture to buy nearly 50 farms in Australia and merge them into a single investment portfolio. Terrapin Palisades, a private-equity firm, bought a dairy company and some vineyards and tomato fields in California, and converted all to grow almonds, whose price has soared as the Chinese have gone nuts for them. Such conversions require up-front capital and the ability to survive without returns for years.

The private-equity approach can take the form of simple improvements, such as changing irrigation from antiquated dykes and canal networks to automatic spray systems: these are the equivalent of picking low-hanging fruit. Pricey robots can boost milk per cow by 10-15%. Using “big-data” analytics to plant and cultivate seeds can push crop yields up 5%. “This is an industry where the gap between the top and bottom quartile is greater than anywhere else,” says Detlef Schoen of Aquila Capital, an alternative-investment firm.

And yet the 36 agriculture-focused funds, with $15 billion under management, pale in comparison to the 144 funds focused on infrastructure ($89 billion) and 473 targeting real estate ($163 billion), according to Preqin, a data provider. TIAA-CREF, an American financial group, is a market leader with $5 billion in farmland, from Australia to Brazil, and its own agricultural academic centre at the University of Illinois. Canadian pension funds and Britain’s Wellcome Trust are among those bolstering their farming savvy.

Most investors are put off by the sector’s peculiar risks and complexities. Weather, commodity prices, soil health, water access, dietary fads and animal health are not the forte of the average pension-fund investment officer. Political risks abound: cash-strapped governments in Europe and America may (belatedly) get around to cutting farm subsidies. In poor countries, land titles may give outsiders dubious protection—if those countries even allow foreign ownership of land in the first place.

Some liken the sector to real estate and infrastructure 20 years ago. It lacks indices, consultant reports and track records. But unlike skyscrapers or pipelines, farming offers few of the multi-billion-dollar deals that are needed to entice mega-investors.

For more money to flow in, financiers and farmers will have to learn a lot more about each other. Money managers need to get their hands dirty and find out more about crops. Only a handful have the expertise needed; farmers gleefully share stories of Wall Street types wondering how chicks are planted. And farmers can do more to attract capital, for example by seeking out financial deals where investors’ incentives are aligned with their own, such as through joint ventures.

Investors need to separate the wheat from the chaff, too. Farm investing requires patience; it is ill-suited to flipping and trading. But those willing to climb over the barriers could reap big rewards. The investment thesis is as simple as they come, as Mark Twain realised long ago: “Buy land, they’re not making it any more.”