Inspiration

To one day sit at our computer and watch it make money while sitting in our boxers and contemplating the meaning of life.

What it does

RoboStock uses a genetic algorithm to find the optimal traits of stock market trade bot based off natural selection and genetics. By back testing on old stock market data from the past ten years, each generation of bots get better at overall trading in the stock market. After many generations, we reach a ceiling and have our optimal traits for a trade bot.

How we built it

The algorithm is built off of human evolution, so each bot has 7 character traits that decide whether it should buy or sell stock. After 10 years, the bots which performed the best on the market are weighted more heavily in creating offspring. These offspring inherit traits from their parents. Because we have 100 bots analyzing 10 years of stock data over 50 generations, we used threading to create an efficient turnaround time.

Challenges we ran into

Threading was one of the biggest hurdles, there was issues with synchronization that we didn't plan for in our original design, causing two threads to access the same bot. Another problem is it's easy for a genetic algorithm to prematurely arrive at a result because the same bots are inbreeding, meaning all the same genes are being passed on. To solve this we added a hamming function that checks that checks whether two parents are too similar to breed.

Accomplishments that we're proud of

We are proud that we took a machine learning concept and applied it to a real world application, being that we only learned the algorithm the night hackathon started.

What we learned

We learned about genetic algorithms and machine learning and their applications. We learned about issues with threading and how to properly handle them. We learned about financial markets and trading, and the factors that influence how traders buy and sell.

What's next for RoboStock

We could go into further optimization. We could also observe different day trading patterns and can even compare between patterns. Lastly, we could observe larger amounts of data because for free we could only find the past 10 years of stock market data.

Built With

Share this project:

Updates