Declining farm debt has been a good news story for agriculture, helped by very strong milk prices.
Latest data from the Reserve Bank shows total agri debt falling steadily by around 1 per cent on a monthly basis over the last several months.
By June, total agricultural sector debt came to $61.93 billion, down from $62.89 billion in June 2020.
Fonterra's farmgate milk prices have been firm in the last three years - hitting a record $9.30 a kg in the season just past.
Even higher prices this 2022/23 season look likely, especially if world supply remains constrained.
ANZ, the country's biggest rural lender, has been encouraging farmers to pay off more in principal as well as interest, so that's brought a change in the mindset, chief economist Sharon Zollner said.
"That's been ongoing and has been pretty successful," Zollner said.
Burgeoning dairy farm debt started to become an issue around 2008 around the time of the Global Financial Crisis, and again in 2014/15 when farmgate prices slumped to $4.40 a kg, dropping further to $3.90 a kg in 2015/16.
Zollner said both times were "quite awkward" but the trend since has been one of farmers chipping away at their debt.
"The dairy sector in particular has a more resilient, robust balance sheet than it has for some time," Zollner said.
Westpac senior agri economist Nathan Penny said the fall in dairy farm debt had served to deleverage the entire agriculture sector.
While inroads had been made into dairy farm debt, debt in the sheep and beef sector remained flat, while debt in horticulture - particularly kiwifruit - was growing.
Penny said higher dairy prices had improved farm profitability and given farmers the choice over whether to invest more or reduce debt, with most opting for the latter.
He said increased uncertainty surrounding government policy and regulation, volatility arising from the world's trouble spots, staffing shortages and Covid-related disruption had made dairy farmers hesitant to invest.
While the dairy sector had come under extreme pressure in recent years, there had been few forced farm sales.
"Really there has been very little in the way of farm mortgagee sales. Banks in general have hunkered down with the farmers and dug their way out.
"By and large, farmers have been able to manage their way through it and have come out the other side in a good position, and are now materially improving their balance sheets."
Penny said there had been a back-to-basics approach in dairy - less expansion and more focus on farming profitability.
In other words, farming for cash flow and not for capital gain.
The approach had become more conservative and less speculative.
"A degree of speculation had crept into the sector on the basis that farm prices would always increase."
Penny said the emphasis had shifted to farm profitability as the starting point for all other conversations.
"There have been some good lessons learned by the sector in general."
But the real inroads have been made in dairy.
Reserve Bank data shows dairy sector debt has declined by around 12 per cent ($5 billion) since its peak level in 2018, reducing debt servicing costs, and meaning farmers will be better positioned to deal with any potential future downturn in dairy prices.
The Reserve Bank, in its latest financial stability report, said banks continue to diversify their agricultural lending portfolios away from dairy to other industries, in particular horticulture.
While input prices are increasing, rising food prices are expected to be beneficial overall for New Zealand's agricultural sectors, the report said.
"With a predominance of pasture-based production, New Zealand's dairy, sheep and beef farmers are relatively less exposed than international peers to the disruptions to grain markets resulting from Russia's invasion of Ukraine," the report said.
In the near term, most agricultural industries are facing similar pressures to those in other businesses, including a tight labour market, input cost inflation, and disruptions to production from the Omicron outbreak.
Labour shortages are constraining production, including limiting fruit harvesting and leading to delays at meat processors.
However, most of these factors are expected to be temporary, the Reserve Bank said.
"Against a broader backdrop of strong commodity prices, the continued diversification of banks' agricultural portfolios is positive for the soundness of the financial system."
Coming up - Every day this week we'll take a deeper dive into the debt levels of different sectors including housing, consumer, agriculture, business and Crown borrowing
By the numbers:
• That big ugly number in our graphic ($772b) is New Zealand's total gross debt.
• It combines the latest Reserve Bank figures for private debt with Treasury numbers for Crown debt and Local Government Funding Agency data on council debt.
• The Reserve Bank figures include housing debt, consumer debt, business debt and agricultural debt to June 30. These are updated monthly by the central bank as part of its brief to monitor and maintain financial stability.
• The Crown debt figure is taken from Treasury's Interim Financial Statements to May 31 and is the figure for Core Crown Borrowings.
• This is different to the Net Core Crown Debt figure often used by politicians when they talk about debt-to-GDP ratios.
• We use this (on Treasury's advice) as it is a gross debt figure but excludes debt held by state-owned enterprises which would have been covered off in the Reserve Bank statistics.
• Finally, the debt figure supplied by the Local Government Funding Agency is gross debt for the year to June 30, 2022.
• It captures all core council activities (Watercare, Auckland Transport etc) but excludes some commercial activities (e.g. Christchurch City Council's Orion lines company, Port of Lyttelton, Christchurch Airport) as these would also be included in RBNZ data.