Skip to content

Automated Algorithm to predict the stock market 🔮

Notifications You must be signed in to change notification settings

EnzoNMigliano/Crystal_Ball

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Crystal_Ball

Automated Algorithm to predict the stock market 🔮

Introduction

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.

Models To Build:

  1. Time Series
  2. MARS
  3. Random Forrest
  4. Support Vector Machine
  5. Deep Learning
  6. Auto Machine Learning.

The libraries required in R are the following:

  • #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.

Team members:

  • Enzo Migliano
  • Raul Ramon
  • Andrea Gonzalez

About

Automated Algorithm to predict the stock market 🔮

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages