Using Historical Data for Stock Prediction of a Tech Company
Commenced in January 2007
Frequency: Monthly
Edition: International
Paper Count: 32807
Using Historical Data for Stock Prediction of a Tech Company

Authors: Sofia Stoica

Abstract:

In this paper, we use historical data to predict the stock price of a tech company. To this end, we use a dataset consisting of the stock prices over the past five years of 10 major tech companies: Adobe, Amazon, Apple, Facebook, Google, Microsoft, Netflix, Oracle, Salesforce, and Tesla. We implemented and tested three models – a linear regressor model, a k-nearest neighbor model (KNN), and a sequential neural network – and two algorithms – Multiplicative Weight Update and AdaBoost. We found that the sequential neural network performed the best, with a testing error of 0.18%. Interestingly, the linear model performed the second best with a testing error of 0.73%. These results show that using historical data is enough to obtain high accuracies, and a simple algorithm like linear regression has a performance similar to more sophisticated models while taking less time and resources to implement.

Keywords: Finance, machine learning, opening price, stock market.

Procedia APA BibTeX Chicago EndNote Harvard JSON MLA RIS XML ISO 690 PDF Downloads 301

References:


[1] “Algorithmic Trading Market – Growth, Trends, Covid-19 Impact, and Forecasts (2023 – 2028)”. https://www.mordorintelligence.com/industry-reports/algorithmic-trading-market#:~:text=According%20to%20Wall%20Street%20data,largest%20and%20most%20liquid%20globally.
[2] Lydia Saad and Jeffrey M. Jones. “What Percentage of Americans Owns Stock?”. https://news.gallup.com/poll/266807/percentage-americans-owns-stock.aspx.
[3] Yahoo! Finance. https://finance.yahoo.com/.
[4] Jeremy Salvucci. “What are Opening & Closing Prices in The Stock Market”. https://www.thestreet.com/dictionary/o/opening-and-closing-prices.
[5] Cory Mitchell, reviewed by Samantha Silberstein, and fact checked by Skylar Clarine. “How to Use Stock Volume to Improve Your Trading”. https://www.investopedia.com/articles/technical/02/010702.asp#:~:text=Volume%20measures%20the%20number%20of,gathering%20strength%20to%20the%20downside.
[6] James Chen, reviewed by Gordon Scott, and fact checked by Pete Rathburn. “Stock Dividend: What it is And How it Works, With Example”. https://www.investopedia.com/terms/s/stockdividend.asp.
[7] Adam Hayes, review by Gordon Scott, and fact checked by Suzanne KvilHaug. “What a Stock Split is And How it Works, With an Example”. https://www.investopedia.com/terms/s/stocksplit.asp.
[8] Michael Galarnyk. “Understanding Train Test Split”. https://builtin.com/data-science/train-test-split.
[9] Scikit-learn home page. https://scikit-learn.org/stable/.
[10] Keras about page. https://keras.io/about/.
[11] Recast. “What is Linear Regression?”. https://getrecast.com/linear-regression/.
[12] Khalid Alkhatib, Hassan Najadat, Ismail Hmeidi, Mohammed K. Ali Shatnawi. “Stock Price Prediction Using K-Nearest Neighbor (kNN) Algorithm” in the International Journal of Business, Humanities and Technology vol.3, no.3, March 2013, pp. 33 & 34. https://www.ijbhtnet.com/journals/Vol_3_No_3_March_2013/4.pdf.
[13] Adil Moghar, Mhamed Hamiche. “Stock Market Prediction Using LSTM Recurrent Neural Network” in the Procedia Computer Science vol 170, 2020, pp. 1169. https://www.sciencedirect.com/science/article/pii/S1877050920304865#
[14] Santhoopa Jayawardhana. “Sequence Models & Recurrent Neural Networks (RNNs)”. https://towardsdatascience.com/sequence-models-and-recurrent-neural-networks-rnns-62cadeb4f1e1.
[15] Darshan M. “How do Kernel Regularizes Work With Neural Networks”. https://analyticsindiamag.com/kernel-regularizers-with-neural-networks/.
[16] AWS. “What is Overfitting?”. https://aws.amazon.com/what-is/overfitting/.
[17] Dr. Robi Polikar. “Ensemble Learning”. http://www.scholarpedia.org/article/Ensemble_learning#:~:text=Ensemble%20learning%20is%20the%20process,%2C%20function%20approximation%2C%20etc.).
[18] Sanjeev Arora, Elad Hazan, Satyen Kale. “The Multiplicative Weights Update Method: A Meta Algorithm and Applications”, pp. 3. https://www.cs.princeton.edu/~arora/pubs/MWsurvey.pdf.
[19] Akash Desarda. “Understanding AdaBoost”. https://towardsdatascience.com/understanding-adaboost-2f94f22d5bfe.
[20] Sklearn documentation of Voting Regressor. https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.VotingRegressor.html.
[21] Jason Brownlee. “14 Different Types of Learning in Machine Learning”. https://machinelearningmastery.com/types-of-learning-in-machine-learning/.
[22] Sanjam Singh, Amandeep Kaur. “Twitter Sentiment Analysis For Stock Prediction”, published by the Proceedings of the Advancement in Electronics & Communication Engineering (AECE), July, 2022, pp. 674. https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4157658.
[23] Diksha Khurana, Aditya Koli, Kiran Khatter, Sukhdev Singh. “Natural Language Processing: State of The Art, Current Trends and Challenges”, pp. 1 https://www.researchgate.net/publication/319164243_Natural_Language_Processing_State_of_The_Art_Current_Trends_and_Challenges.
[24] Shashank Gupta. “Sentiment Analysis: Concept, Analysis And Applications”. https://towardsdatascience.com/sentiment-analysis-concept-analysis-and-applications-6c94d6f58c17.