Dairy farming makes up about 17% of UK agriculture production and is worth around £3.7bn. With numbers of dairy farmers declining – according to DairyCo there are around 200 fewer farmers in October 2013 (10,490) than there were in October 2012 (10,704) – there has been growing concern about the future stability of the dairy farming industry.

While Wales has just 1,900 dairy farmers – with an economic output of £420m – as more and more are unable to cover overheads, such as equipment and building expenses, over the years many have had to leave the dairy industry and in Wales there are now 40% fewer dairy farmers than there were in 2002.

Crisis over cuts: thousands of farmers known as the Diary Coalition protest

Back in 2012, the UK found itself in the middle of a dairy crisis and the government confirmed the industry was operating at a £1.2bn trade deficit. Price cuts were being heaped upon price cuts, and farmers found themselves locked into contracts with processors. Thousands of farmers, who became known as the Dairy Coalition (a coalition of farming unions comprising the NFU (National Farmers Union), NFU Cymru, NFU Scotland, Tenant Farmers Association, Royal Association of British Dairy Farmer and Farmers for Action) protested all over the country.

A report from Dairy Co shows that at this time "the average farm-gate price of milk was 28.6ppl" while "the average cost of production was 30ppl" – with NFU Cymru confirming that most Welsh farms were producing at a loss. Price cuts were threatening to be introduced that would drop the average price to 24-25ppl.

Code of practice: introducing new guidelines

As a result of public and political pressure, the price cuts were withdrawn and a voluntary code of practice introduced that would include 30 days’ notice of a cut to a farmer’s price or significant change in contractual terms; the farmer having the right to terminate a contract on three months’ notice if they do not agree with a proposed price change and encouraging processors to engage with producers’ representative producer groups.

Despite an initial reluctance to sign up to the code, and although protests are still occurring – such as those on 4 and 5 September 2013 at Dairy Crest and Morrisons by farmers protesting about being "ignored" regarding an increase in prices – the industry is now in a far more positive place, say experts.

"We have got sign up from in excess of 85% of milk sold in Great Britain and got the four biggest buyers signed up to the code: Dairy Crest, Müller Wiseman Milk Group (MWMG), First Milk and Arla, which is a big achievement," says Rob Newbery, chief dairy adviser for the NFU. "Two of those milk buyers, Dairy Crest and Müller Wiseman have actually put in place optional contracts where milk price variations occur according to a formula, which is one of the options within the code."

Processors improve: milk price formulas are launched for suppliers

Dairy Crest, the only major British-owned milk processor, was the first to sign up to the voluntary code of practice and launch a milk price formula for its suppliers. "Dairy Crest wants to build long-term, stable relationships with our suppliers," says a company spokesperson. "We commit to buy all the milk that a farmer produces and, in turn, the farmers sells all his or her milk to Dairy Crest. We always aim to pay a fair, market-related price for their milk."

Farmers selling milk through the "Müller Wiseman Formula Price" contract, which was introduced on 1 July 2013, are set to receive 34.55ppl from 1 October 2013. According to the company, the price is calculated using "publicly available benchmarks": Actual Milk Price Equivalent (AMPE), Milk for Cheese Value Equivalent (MCVE) and a basket of competitor milk prices, which are reviewed every quarter. Dairy farmers can sell all or a portion of their milk to Müller Wiseman Dairies using the formula price, to a combined maximum of 110 million litres this milk year.

Müller Wiseman has reaffirmed its commitment to offering a market leading "clean" milk price with no member retentions, capital levies, balancing or haulage charges. "It is right that our members’ loyalty is earned rather than contractually imposed, and we remain happy to be judged by our performance as a company that is ambitious to grow," says Pete Nicholson, agricultural affairs manager for Müller Wiseman Dairies.

"A three month notice period for members of the Müller Wiseman Milk Group has been a central part of the contract we offer to those not aligned to major supermarket customers, for almost 20 years."

Clear success: farmers know what their milk is worth

Even though improved prices indicate the code is working, for Newbery its success can be measured through the resulting transparency in the marketplace. "The fact is that the contracts are better," he says. "Before it was easy for processors to change terms of the contract at their discretion and the farmers couldn’t leave it, and now, according to the code, changes come from mutual discussion and negotiation."

He adds: "Because of the greater use of formula contracts, farmers now have a clearer idea of what their milk is worth in the market place rather than just being told what they are going to get paid. What’s more, farmers now know that their terms and their conditions of supply are better protected by fairer contracts."

As the annual review of the code draws closer in autumn, the dairy coalition are collecting information on processor compliance. Dairy UK director general Jim Begg believes that while the code is a success, a stakeholder review would draw out whether or not it could be improved.

"Although the code has not yet been in place for a full production year, there is merit in looking at how it’s working," he says. "The objective would be to see whether the code can be improved and to make more people comfortable with its operation. The code doesn’t change markets, but it improves transparency and choice, so we shouldn’t underestimate the benefits of its existence."

Is legislation needed in case the code be deemed to fail?

Despite the acknowledged better, fairer contracts and improved prices, and that industry figureheads have cited the code an overall success, there has been calls for legislation to be put in place should the code be deemed to fail.

However, in a report released by the Welsh Affairs Committee, the Defra minister, David Heath MP, described the voluntary code as a "major step forward". He also said that the UK government would consult on an "alternative solution" should the code not meet its objectives, but that he favoured the voluntary code. "There are things you can do in a voluntary code in terms of contractual relationships which you cannot apply by [competition] law," he said. "The voluntary code is therefore a more attractive proposition, if it works, than a statutory code."

Newbery firmly believes that legislation is not the answer, explaining that the code is much broader in scope than the legislation would be if implemented in the UK – and reminds that it is only one aspect in the challenge of achieving a sustainable dairy industry. "You could say that we have designed a solution to problems in the UK market, rather than the EU regulatory solution that would probably be less effective," he said.

"Legislation is still there if the code fails or breaks down and it still serves as an incentive for the processing sector to adhere to a voluntary code. There are no silver bullets, the code is only part of the solution, the future of the British dairy sector relies on investment, innovation and efficiency to compete in the growing global and domestic market place."