Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/das-amlan/stock-price-forecasting
Stock Price Forecasting using ARIMA model
https://github.com/das-amlan/stock-price-forecasting
arima-model forecasting python time-series-analysis
Last synced: 3 days ago
JSON representation
Stock Price Forecasting using ARIMA model
- Host: GitHub
- URL: https://github.com/das-amlan/stock-price-forecasting
- Owner: das-amlan
- Created: 2022-07-30T13:29:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-04T01:12:48.000Z (almost 2 years ago)
- Last Synced: 2024-01-29T16:33:58.402Z (10 months ago)
- Topics: arima-model, forecasting, python, time-series-analysis
- Language: Jupyter Notebook
- Homepage:
- Size: 386 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Stock Price Forecasting
This repository contains the code for stock price forecasting using the ARIMA model. The model was tested on three stocks: EXX5, IQQE, and IUS4. Data for these stocks was collected from [Yahoo Finance](https://finance.yahoo.com/) for the time window of May 2021 to May 2022.## Steps in the code
### Importing Required Libraries
The code starts by importing the required libraries such as pandas, numpy, matplotlib, and statsmodels.### Data Collection
The data for the stocks is collected from Yahoo Finance for the time window of May 2021 to May 2022. The data is loaded into a pandas dataframe.### Data Preprocessing
The data is preprocessed by checking for missing values, transforming the data into log-returns, and making the time series stationary.### Model Selection
The code uses the statsmodels library to fit the ARIMA model on the stationary time series data. The parameters of the ARIMA model are selected using the **`auto_arima`** function.### Model Fitting and Forecasting
The selected ARIMA model is fit on the data and used to make forecasts for future stock prices. The code also calculates the mean absolute error (MAE) to evaluate the performance of the model.### Visualizing Results
Finally, the code plots the original stock prices and the forecasted stock prices for comparison.## Conclusion
This repository provides a basic implementation of forecasting stock prices using the ARIMA model. For further development and experimentation, the code can be used as a starting point.