Jacqueline Harriet | Getty Images

Coffee prices have rallied over the last month, as global lockdowns fueled panic buying by those stuck at home looking for a caffeine fix, but the outlook for the commodity is far from clear. Benchmark New York arabica coffee futures for May delivery have gained 15% over the last month, to trade around $1.20 per pound Thursday. A futures contract is an agreement to buy or sell an asset — in this case, coffee — for a set price at a particular point in the future. It indicates what people expect the future price of coffee to be.

The recent move higher comes after a volatile few months for coffee prices, which hit a 2020 low of around 97 cents per pound on February 5, as volatile stock markets reflected widespread panic about the coronavirus. But prices have since bounced back, and on March 25, coffee futures hit $1.29, surging 30% from the February low point.

Panic buying

Consumer demand for coffee has not faltered, despite the coronavirus pandemic, which has helped to lift the price of the commodity, Maximillian Copestake and Steve Pollard from broker Marex Spectron, told CNBC Wednesday. "For many other commodities, like metals or oil, there's definitely been a big reduction in demand — that's not the case with coffee," Copestake, executive director of European coffee sales, said on a call. "There's just been a switch from one type of consumption to another — from out-of-home to in-home consumption." Coffee roasters selling predominantly for out-of-home consumption – supplying businesses like coffee shops, bars and restaurants – were seeing a "substantial and significant" hit across all regions, according to Copestake. However, those selling predominantly via supermarkets for people to drink at home were seeing a surge in demand, as widespread lockdown measures drove panic buying. "People are filling their cupboards and keeping them full, so they're continuing to go out and buy," Copestake told CNBC. "So there's been a big shift away from out-of-home consumption toward in-home consumption." Consumers stockpiling groceries had also helped to drive a net increase in demand and, subsequently, in coffee roasting, according Copestake and coffee analyst Pollard.

Supply chains disrupted

On the supply side, lockdowns were impacting the process of getting coffee to consumers, Copestake said, but the product was still being delivered eventually. "Because coffee is a foodstuff, even if a country is in lockdown, people working in the supply chain are deemed to be essential workers," he said. "So from a legal perspective, everybody in the supply chain can continue working, can continue picking coffee, milling coffee, processing it, packing it and trucking it." Shipping routes had also been disrupted ever since the coronavirus outbreak led to lockdowns in China, where the outbreak began at the end of 2019. And Copestake and Pollard warned that transportation issues may become more of a problem in the long run. "Data is suggesting that if you need to get coffee out, you can get coffee out. But that is lagging data, so although that might have been the case up until last week, it might change going forward," they said.

Strong US dollar

There are other factors affecting prices too. Copestake and Pollard said that so far throughout the current coffee year – which ends in September – a strong U.S. dollar had kept a lid on prices, as farmers in countries like Brazil were more willing to sell stock due to good exchange rates. "So you have a situation, with futures (prices) coming up and their currency depreciating a lot, and they're (Brazilian farmers) taking advantage by selling for forward delivery," they said. The 2019/2020 coffee year was in deficit when it came to produce stocks, they noted, with stocks from the previous year – which was in surplus – being used up. "Now as we get to the end of the year the deficit becomes evident and prices are moving higher," they said.

Price outlook