Inspiration

Stock price predictions using machine learning has been an emerging trend in recent years with algorithmic trading and the use of AIML in trading. As stock prices are in tabular form, tree based models are used for predictions*. Predicting stock prices alone might not be enough for an investor to make an informed decision. Fundamental factors like seasonality or methods of trading such as pairs trading can also be factors included in a trader's decision. Which is why we have included additional features to build on predictions, providing a more holistic informed output.

*Reference: "Why do tree-based models still outperform deep learning on typical tabular data?" (https://proceedings.neurips.cc/paper_files/paper/2022/file/0378c7692da36807bdec87ab043cdadc-Supplemental-Datasets_and_Benchmarks.pdf)

What it does

The minions portfolio builder is an AutoML tool that initiates 3 different features (predictions, association pairing, clustering) for stock analyses and portfolio building. The model allows for selection of stocks from 4 big index funds: 'SPY', 'NDX', 'DAX', and 'FTSE' using the Yahoo Finance API.

How we built it

We built the tool in Python using machine learning libraries such as Scikit-Learn and XGBoost. Flask then hosts the front end routes to call upon the models and features. The prediction feature takes heavy inspiration from the book "50 Years of Data Science", mainly the common task framework (CTF) idea, ergo the comparison in mean spread values for each model prediction.

Challenges we ran into

Having little formal education in Machine Learning, we struggled a lot with knowing what we did not know. Furthermore, applying concepts to stocks and the financial market took more time. However, we embarked on this challenge to not only learn about these models, but also to understand it enough to give it empirical application.

Accomplishments that we're proud of

Having read through many existing state of the art code on GitHub as well as books and research papers in Machine Learning, we've come to tie in the applications of different models to achieve a singular purpose of identifying stock market inefficiencies.

What we learned

We learned many things in the process of creating this AutoML tool. Other than the obvious of how the implemented machine learning models worked, we learnt more about how the data is prepared for our models. We learned that poorly prepared data, and assumptions about data can ruin forecasts and results from data entirely.

What's next for Minions Portfolio Builder

  • Allowing for dynamic and bespoke selection of stocks instead of a preset of 4 funds. And potentially allowing for other APIs to be used in the event Yahoo Finance API fails or does not include certain stocks.
  • Implementing more regressor models and stock price prediction models so that comparisons will be more robust.
  • Implementing ways to produce pairs more efficiently. Previously when selecting SNP500 as the index of choice, 500C2 number of pairs were formed, resulting in crashes due to having over 100,000 pairs to calculate.

Built With

Share this project:

Updates