A personal blog about finance, trading, and community work.





Modelling and Predicting the Price of Wheat Futures

Welcome back, my fellow traders!


Today we will be harnessing our inner Louis Bachelier to model the historical price action of the wheat industry, and use this model to predict future price movement!


Needless to say, you will not need any background in agriculture or farming in order to develop this project on your own, though a bushel or two of wheat may help fuel your brain.


That being said, let's dive in!




In August of 2019, quantitative analyst Willy Woo released one of the most effective and influential indicators for modelling the price of Bitcoin, the "Bitcoin Difficulty Ribbon."

In short, the ribbon utilized historical mining difficulty data on the Bitcoin network to determine at which point the majority of weak miners had capitulated (when the weak miners capitulate, they exit the market, lowering the network's mining difficulty and decreasing supply). An image of the ribbon is shown below.

As you can see, whenever the ribbon compressed or inverted, price tended to undergo a bullish move shortly after.


We will be applying the same principles of Woo's indicator to the wheat industry - the Wheat Difficulty Ribbon.


To begin, we must determine what actually drove the price of Bitcoin in Woo's model.


Assuming that the driving factor was the proportional production cost, scarcity, and therefore overall competition in the Bitcoin mining industry, it becomes obvious that we must collect historical data regarding the production cost of wheat to create our model.


Luckily for us, the U.S. Department of Agriculture has recorded production costs of farms operating in the United States since 1975 here, shown below.

While the data may appear daunting at first glance, the only row we will really need for our model is "Total, cash expenses."


This row will provide us with insight into the historical net cost of one acre of wheat in the United States for every year since 1975.


Now that we have the data, the modelling process is rather simple.


We must first paste the historical data into an Excel or, in this case, a Google Sheets spreadsheet.


Next, we must find the moving averages of the cost of production as time progressed. A moving average is a simple quantitative indicator that represents the average of a subset of data, thus developing a smoother, more readable regression than sheer movement. See example below for visual explanation.

To create our "Moving Average" column for our spreadsheet, we must use the following function.




This will provide us with a 3, 5, and 7-year moving average for the production cost of wheat in the U.S. since 1975. Graph shown below.

Surely enough, the wheat market appears to follow the same trend!


That being that when production costs are lower than they usually are (the ribbon is inverted), it usually implies a spike in price up ahead!


(That also being said, you might want to look into buying wheat sometime soon after all.)


Thanks for reading! Quantitative analysis is my personal favorite field of trading, so expect more of these type of articles in the future!


Credit to Willy Woo for the original Bitcoin Difficulty Ribbon.




Nothing listed above is financial advice.

JANUARY 11, 2020

Modelling and Predicting the Price of Wheat Futures
Modelling and Predicting the Price of Wheat Futures