Automated Algorithm to predict the stock market 🔮
Since the stock market was invented people have been trying to game the system and come up with a way to beat the market, millions of theories have been tested over the years with none conclusively beating the market year after year. But like us, some people believe that hope is on the way with machine learning and one day its capabilities would catch up with this trend and help someone to get some extra money. As long as the market assumptions stay stationary it is safe to play in the field of the stock market using predictive models. Market assumptions change quickly over time, therefore any built model has to be constantly updated in order to stay accurate. But if done it accurately, fast and secretly, it can work out pretty well.
For this project we created a total of six stock price classification models. The objective of our project is to create an automated function based script that gets the most recent data of the FAANG stocks and perform predictions about the next 30 minutes and according to the predictions we would then classify the stocks into up, down, or same; it will identify if the stock value will increase by 5%, decrease by 2%, or neiter. Also, our program would calculate the metrics of the prediction of the stocks. We will build a function-based code that analyzes historical stock data for 6 months and determine the accuracy, recall, and precision of each model's 1-month, 1-minute price testing data. We will also find out if the accuracies are significantly different from one another to determine which model is the best. Finally, we will analyze if the models are overfit. We utilized the tiingo API for the purpose of the project.
- Time Series
- MARS
- Random Forrest
- Support Vector Machine
- Deep Learning
- Auto Machine Learning.
- #install.packages("tidyverse")
- #install.packages("h2o")
- install.packages("stringr")
- install.packages("earth")
- install.packages("dplyr")
- install.packages("jsonlite")
- install.packages("caret")
- install.packages("ggplot2")
- install.packages("zoo")
- install.packages("caTools")
- install.packages("gmodels")
- install.packages("class")
- install.packages("corrplot")
- install.packages("Metrics")
- install.packages("olsrr")
- install.packages("splines")
- install.packages("cli")
- install.packages("readr")
To run this script please make sure that the packages are properly installed and your enviroment is clean to avoid overwritten functions.
- Enzo Migliano
- Raul Ramon
- Andrea Gonzalez