May 04, 2021
Computer science students at Mizzou Engineering have come up with a way to use machine learning to buy and sell stocks. They developed the system, MarketFlow, this semester as part of a year-long senior project in Instructor Gary McKenzie’s capstone class.
Artificial intelligence is currently used to do most of the trading on Wall Street. What makes MarketFlow different is that it uses machine learning, which means the system builds on what it knows and evolves when given new information.
“We applied a classification model that takes all of the ticks we pull from the stock market and says, ‘If a tick has increased, then here are the values that determine whether that increase is valid or not.’ Based on that, it gives you a percentage of accuracy for each stock over an interval of time,” Adrian Atanasov said. “So, for instance, it can tell you there’s an 80% chance this stock will increase over the next 21 days.”
Atanasov and several members of the group are traders who, like many, got interested in the stock market at the beginning of the COVID-19 pandemic.
That knowledge came in handy for the project. Students were able to design an algorithm that makes decisions based on the same principles and methods humans use when making trade decisions.
“Without the emotion of being scared when a stock drops,” Collin Pounds said.
That’s one of the primary benefits of having a bot trade for you, Atanasov said.
“You have to maintain the same composure whether you’ve made 10 grand on a trade or just lost 10 grand on a trade,” he said. “It has to be just numbers. There can be no emotion behind it.”
Applying Knowledge in a Real-World Setting
Capstone projects give seniors an opportunity to apply what they’ve learned over the course of their education to real-world scenarios.
The MarketFlow team agreed the capstone provided a unique group experience because all of the members worked collaboratively on the various components.
Ali Dowlatshahi worked on developing the algorithm using his own experience with the market, whereas Ben Frailey approached it from a mostly computer science perspective.
Pounds helped the group find the best trading platform through which the machine could buy and sell. They ultimately decided to use Alpaca, which is specifically designed for AI-based trading.
Bryan Prichard worked on development, research and documentation, and Chris Bigge worked mostly on coding and testing.
“I gained an appreciation for my team and experience in teamwork and large projects,” Prichard said.
For Bigge, it was beneficial to be able to see a long-term project through.
“One of the big things for me was learning how to build a project from start to finish, from idea to having the project complete and seeing it working,” he said.
Members agreed it was also interesting to work in a real-world setting. This one was especially challenging as market fluctuations forced them to be flexible over the course of the project.
“We had to learn to adapt and overcome,” Frailey said. “The biggest thing for me was working on a real-world problem, not knowing if it was going to work and then finding what we needed to change to get it to work.”
“From fall semester when we started to where we are now, the project completely changed,” Dowlatshahi said. “It was a comprehensive process of doing research with the stock market and integrating that with what we’ve learned in the computer science program over time.”