A Streamlit-based ARIMA model library for stock analysis generating ARIMA reports
Project description
Streamtick An automated time-series toolkit for stock market analysis.
Welcome to Streamtick! This Python library provides a robust set of automated tools for analyzing historical stock data, performing model diagnostics, and generating reliable forecasts. It’s designed to automate the heavy lifting of the time-series workflow, giving you actionable insights quickly.
Installation To install Streamtick, you first need to save the following dependencies into a file named requirements.txt and install them:
Save these lines to requirements.txt
streamlit==1.36.0 pandas>=2.2.0 numpy>=1.26.4 yfinance==0.2.38 plotly>=5.21.0 statsmodels>=0.14.2 pmdarima>=2.0.3
Then install
pip install -r requirements.txt
Library Methods and Usage All of Streamtick's core functions are independently callable. You can simply import them and use them in any script or Jupyter Notebook. The library methods cover four essential phases of time-series analysis: Preparation, Identification, Estimation, and Validation.
- Preparation Methods The preparation phase helps ensure your data is properly structured for modeling.
decompose_series: This function breaks down the raw time series into its core components: Trend, Seasonality, and Residual. It is used for initial data inspection. You call it by specifying the ticker and the number of historical years, for example: decompose_series(ticker='TSLA', years=3).
make_stationary: This function shows the effect of differencing (the d term) on the data. It confirms whether the data's mean is stable, which is a requirement for successful ARIMA modeling. You call it by providing the stock ticker and the number of historical years: make_stationary(ticker='TSLA', years=3).
-
Identification Methods check_autocorrelation: This method identifies potential starting parameters (p and q) for the ARIMA model. It does this by analyzing ACF (Autocorrelation) and PACF (Partial Autocorrelation) data, which measure the correlation within the series over time. To run it, you call: check_autocorrelation(ticker='TSLA', years=3).
-
Estimation Method tick_arima: This is the main automated forecasting tool. It utilizes the pmdarima library to automatically find the optimal ARIMA parameters, fits the model to the historical data, and generates the final price forecast. You call it by specifying the ticker, the number of years of data to use for training, and the number of days you want to forecast: tick_arima(ticker='AAPL', years=5, forecast_days=30).
-
Validation Method check_residuals: This function performs statistical tests (like Ljung-Box) on the model's errors to ensure the model is sound. This process confirms that the model’s residuals (errors) are white noise (random and unbiased), which is crucial for reliable predictions. You call it with: check_residuals(ticker='TSLA', years=5).
Quick Code Examples To demonstrate how to call these methods, here is a breakdown using the 'TSLA' ticker:
- Preparation: Understanding Components from streamtick import decompose_series
Breaks down the series into its trend, seasonal, and residual parts.
decompose_series(ticker='TSLA', years=3)
- Identification: Checking Autocorrelation from streamtick import check_autocorrelation
Identifies model order based on ACF and PACF data.
check_autocorrelation(ticker='TSLA', years=3)
- Estimation: Automated Forecasting from streamtick import tick_arima
Fetches 5 years of data for 'AAPL', finds the best model, and generates a 30-day forecast.
tick_arima(ticker='AAPL', years=5, forecast_days=30)
- Validation: Model Reliability Check from streamtick import check_residuals
Fits the optimal model and runs statistical tests on the residuals (errors)
to confirm they are random and unbiased.
check_residuals(ticker='TSLA', years=5)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file streamtick-0.0.3.tar.gz.
File metadata
- Download URL: streamtick-0.0.3.tar.gz
- Upload date:
- Size: 14.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6091ace1a7defe0f85896d55d4a9c10008764c02cdc574fbd5a32edd7747e41
|
|
| MD5 |
efa73371ad716cb9d24ad43b7de72ee2
|
|
| BLAKE2b-256 |
decdcb483100267e23fe05e6db7efc37b95b7e714ba1105722c188df755807bd
|
File details
Details for the file streamtick-0.0.3-py3-none-any.whl.
File metadata
- Download URL: streamtick-0.0.3-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b23b366480d75be31c8a6fb4b4e171b73ff7bac1754f516aa6fd91bc5b0fb21b
|
|
| MD5 |
8a8274fea7b04c6ac2fda48f2e1fa9b8
|
|
| BLAKE2b-256 |
d6869d8c0669a1a0e62b2d093f72cbcef8688d4fe107015e673108930fe5214f
|