KikiWu9068.github.io

Based on the time of their development and application, the following stock forecasting models can be categorized into “Traditional” and “new”:

Traditional models:

  1. Linear Regression: Linear regression is a classic statistical modeling technique used to model the relationship between a dependent variable and one or more independent variables. It has been used for stock forecasting for a long time.

  2. Support Vector Machines (SVM): SVM is a supervised machine learning algorithm that can be used for regression or classification tasks. It has been applied to stock forecasting in the past.

  3. Random Forest: Random Forest is an ensemble learning method that combines multiple decision trees to make predictions. It has been used in stock forecasting for its ability to handle complex relationships between variables.

  4. KNN (K-Nearest Neighbors): KNN is a non-parametric algorithm used for classification and regression tasks. It has been applied to stock forecasting, where similar historical patterns are used to predict future prices.

New models:

  1. LSTM (Long Short-Term Memory): LSTM is a type of recurrent neural network (RNN) that can model long-term dependencies in sequential data. It has gained popularity in recent years for stock forecasting due to its ability to capture temporal patterns.

  2. BiLSTM (Bidirectional Long Short-Term Memory): BiLSTM is an extension of LSTM that incorporates information from both past and future time steps. It has been used for stock forecasting to capture dependencies in both directions.

  3. GRU (Gated Recurrent Unit): GRU is another type of RNN that can model temporal dependencies. It is similar to LSTM but has a simpler architecture. GRU has been applied to stock forecasting as an alternative to LSTM.

  4. auto-ARIMA: ARIMA (AutoRegressive Integrated Moving Average) is a traditional time series forecasting model. Auto-ARIMA is an automated version of ARIMA that automatically selects the best parameters for the model. It has been used for stock forecasting to capture time-dependent patterns.

These categorizations are based on the historical development and application of these models in the field of stock forecasting. However, it’s important to note that the categorization of models as “Traditional” or “new” is subjective and can change over time as new techniques and advancements are made in the field.

Jupyter notebook instructions

The models in the notebook are written and run sequentially according to the categories introduced above. The dataset uses Tesla’s stock market price data from 2020-08-19 to 2021-08-18. When making stock price predictions, I only used the closing price for the model predictions. Due to the limited amount of stock data, there may be differences in the model results. You can put in other stock price data and use the close price to do the prediction analysis in this notebook. The results of the best model selected for the prediction may be different.

For specific models introduction, please refer to the model description. Please refer to the presentation ppt file for model result analysis.