Commodities Price Prediction

Chart comparing predicted versus actual commodity prices from the model

Using XGBoost Regressor (an optimized, highly scalable implementation of the gradient boosting framework designed to predict continuous numerical values) and Feature Engineering, me and my colleagues created an algorithm to predict the price of certain commodities like soy or corn.
We used N8N to get the most recent data and input it into a SQL table.

N8N workflow used to fetch and load the latest commodity price data

Looking at tendencies we see that the price of diesel and brent work as cost triggers, with an average lag of 2 months. That was inputed into the algorithm.

Model accuracy results for the commodity price prediction

In the end, we we're able to reach an accuracy of 88%, missing the exact price of the commodity by R$2.15