The Challenge

In 2022, prices for wheat, vegetable oil, and natural gas rose sharply, putting pressure on food manufacturers’ profit margins. Hedging tools already exist, but they are mainly designed for large companies with dedicated treasury teams.

For a smaller manufacturer, the main problem is not simply access to futures markets. It is understanding which costs are exposed to commodity prices, how much those price changes could affect profits, and what actions the business can take.

We set out to build a B2B tool that answers these questions using purchasing data the business already has.

Our Approach

We built a working Streamlit web application in Python. To test the platform, we created a fictional mid-sized Canadian company, Maple Crest Bakery, using two years of monthly purchasing data for FY2023 and FY2024.

The platform has four main functions:

  • Exposure Mapping: Identifies which business costs are linked to traded commodities. For example, flour is linked to CME Wheat, sugar to ICE Sugar No. 11, vegetable oil to Soybean Oil, natural gas to Natural Gas futures, packaging to Aluminum, and logistics to Crude Oil. The platform then classifies each cost as hedgeable or non-hedgeable and pulls current futures prices through yfinance.
  • Sensitivity Analysis (EBITDA at Risk): Shows how changes in commodity prices could affect the company’s annual EBITDA. Users can move each commodity price between −40% and +40% and immediately see the estimated impact by commodity and for the business overall.
  • Historical Back-Test and Crisis Stress Test: Estimates how much the company could have saved if the recommended hedge strategy had been used in the past. It also tests the current cost structure against major commodity price shocks seen between 2020 and 2022, including Wheat +145%, Soybean Oil +204%, and Natural Gas +385%. A separate scenario applies a 20% increase across all commodity prices.
  • Hedge Recommendations: Creates an action plan for each commodity exposure. For every commodity, the platform recommends a hedge instrument, hedge ratio, dollar amount to protect, estimated number of futures contracts, and suggested timing. For example, the model recommends hedge ratios of 75% for Wheat, 50% for Natural Gas, 50% for Soybean Oil, and 25% for Sugar. These recommendations are then organized into a quarterly hedging roadmap.

The platform also explains its recommendations in plain language. For example: “Lock in summer natural gas prices before winter demand increases.” This makes the results easier for a non-finance business owner to understand and discuss with a broker.

The Outcome

Using only the company’s purchasing data, the platform found that about 39% of Maple Crest’s input costs were linked to tradeable commodity markets. Flour was the largest individual exposure at nearly 18% of total input costs.

The recommended strategy hedged about 60% of total commodity exposure. When tested against FY2024 data, the strategy would have avoided approximately $69K in additional costs.

The stress test showed the larger risk. If commodity prices experienced another shock similar to the COVID-era period, Maple Crest could face about $2.35M in additional input costs, reducing gross profit by nearly 58%. The proposed hedge strategy would recover approximately $1.4M of that impact.