This project is focused on forecasting stock prices using the ARIMA (AutoRegressive Integrated Moving Average) model and generating Buy/Sell trading signals based on predicted price movements. We use historical stock data fetched via the yfinance
API and visualize both the forecast and trading signals using matplotlib
.
- ๐ฆ Model Used: ARIMA (5,1,0)
- ๐๏ธ Data Source: Yahoo Finance (
yfinance
) - ๐งฎ Target Variable: Closing price of selected stock (example: Apple Inc. -
AAPL
) - ๐ Timeframe: Past 1 Year (from today's date)
- ๐น Forecast Window: Next 10 business days
- ๐ Signals Generated:
- ๐ผ Buy when next predicted price is higher than the previous.
- ๐ฝ Sell when next predicted price is lower than the previous.
yfinance
โ fetch stock datastatsmodels
โ ARIMA modelingpandas
โ data manipulationmatplotlib
โ data visualizationdatetime
โ date range generationwarnings
โ suppress warnings for clean output
Install the required Python libraries using:
pip install yfinance statsmodels matplotlib pandas