For many years, Wall Street investors have used sophisticated software like artificial neural networks to gain a trading advantage. These software tools use a range of data inputs and historical trends to predict stock prices.
But the cattle market is a different beast. “The software tools used to predict the stock market fail miserably if you apply them to cattle futures,” says Jordan Baumeister. She worked the past year with fellow computer science majors Trevor Borman and Dustin Reff to build models that could better predict the cattle and corn markets in an effort to offer commodity traders an edge. The team used artificial intelligence and data science to create mathematical models to predict future market trends and provide a comparison for anomalies, like droughts or floods, using historical data analytics.
“Our overall goal was to optimize the risk versus reward tradeoff that shows up when you exchange these contracts on the futures market,” says Reff.
To achieve this goal, the students had to rely on decades of previous work.
A long history of success
In 1993, Todd Gagne was a student at Mines developing his own software programs when he crossed paths with Ron Ragsdale, who ranched on 55,000 acres of rolling prairie near the confluence of the Belle Fourche and Cheyenne Rivers.
Ragsdale came to ranching following a successful career in law along with a background in math and statistics. He developed his own system for predicting the cattle market using a series of equations that he worked out by hand with a pencil and paper. The model helped him determine when to buy and sell both corn and cattle. The two commodities are related because cows are often fattened with corn.
“What he did was kind of genius,” says Gagne. “He looked at the futures market for both cattle and corn and backed out all the costs needed to fatten his claves. He used 187 variables, not just feed. He included the costs of the lights in his barn, vaccination, fuel, everything. This way he knew what he could pay for his calves to make a profit in the future.” If the model showed Ragsdale that he could not profit that year, he would lease his land to other ranchers.
Ragsdale asked Gagne to help enhance his equations with a computer program that he and his spouse, Holly, created while they were college students in 1993. “I was in my early 20s, and he was a guy who had been around the block. He saw everything as statistics and math. He taught me a lot and he was a great mentor,” says Gagne.
The software they developed was employed by Ragsdale successfully over the coming decades. It failed to predict positive results on only two occasions, one was on Sept. 11, 2001, the other the 2008 recession with the collapse of Lehman Brothers. “Everything else the model held up. It would bend, but it did not break,” says Gagne.
Gagne graduated from Mines and went on to spend a career in software development. Today, he is an Entrepreneur in Residence at the university. He serves as a consultant for start-up companies. But he never fully lost touch with Ragsdale. The two stayed friends over the years and continued to work on the project, adjusting the program and learning as they went. Ragsdale ended up writing a long, unpublished thesis on his market theory before he passed away in 2021 at 72 years old. Before he died, he worked with Gagne to launch the student project.
“It’s been an intellectual curiosity that began as a side-hustle and has evolved into something much bigger,” says Gagne.
Coming Full Circle
In the fall of 2021, Gagne shared the software that he and his wife Holly developed as college students, nearly 30 years prior, with a new team of Mines students. Gagne sponsored the team’s work and challenged them to use modern tools like artificial intelligence and data analytics to delve into decades of cattle market data and enhance the original program.
The goal was to make the software more robust to better predict commodity prices when outside factors drive the market off its normal course.
“If I know what the value should be in the future, what happens when something like mad cow disease, or widespread drought, or widespread flooding occurs, all these things can send the market into arbitrage,” says Gagne. He tasked the students to build software that could better predict what to do when the market gets wacky.
“We twisted and tuned this data and tried to look at it in new ways to see anomalies or patterns that we think are tradable in the future.”
The team of students spent a full year working on the project. “The computational complexity was enormous,” says Baumeister.
The team overcame challenges such as filtering out noise in the data to get to the heart of the information needed to predict the markets and homing in on key variables that make the most impact to commodity process. They ran their model using historical numbers and worked on many iterations of the program until it could most accurately predict the known outcome.
By the end of the year, the team developed two different computer models to help make better commodities trades. One examines historic trends to help determine the risk versus reward analysis. The other, a predictor model, calculates the best times to buy and sell. “We developed a tool to help play the commodities trading game a little bit better and to get some edge over the competition,” says Baumeister.
The project is ongoing. Baumeister, Reff and Borman have all graduated and began their careers, but they will be briefing a new team of students in the Fall of 2022 to help launch the next phase of the project. “I was very pleased, these students are all going to different jobs, but they are willing to come back and help the next team take up the next phase,” says Gagne.
In the coming semester, the new team will rebuild the model and then work on a sensitivity study to understand which of the 187 variables carry the most weight in the model. They will run more historical market data through the model to see how it performs over time, and they will build in indicators as the model runs that will check when the animal might be over or under valued.
Mines faculty members who oversee computer engineering senior research projects are pleased with the progress. “As a sponsor, Todd provided years of data, support, and a good story,” says Brian Butterfield, a lecturer of computer science and engineering at Mines. “These students took advantage of the opportunity by applying their skills in data science and data analysis to advance the work. I appreciate watching what emerges by providing students with the framework to build something and gain real world experience.”
About South Dakota Mines
Founded in 1885, South Dakota Mines is one of the nation’s leading engineering, science and technology universities. South Dakota Mines offers bachelor’s, master’s and doctoral degrees and a best-in-class education at an affordable price. The university enrolls 2,418 students with an average class size of 24. The South Dakota Mines placement rate for graduates is 97 percent, with an average starting salary of more than $66,150. For these reasons College Factual ranks South Dakota Mines the #1 Engineering School for Return on Investment. Find us online at here and on Facebook, Twitter, LinkedIn, Instagram and Snapchat.