Metadata-Version: 2.4
Name: streamtick
Version: 0.0.3
Summary: A Streamlit-based ARIMA model library for stock analysis generating ARIMA reports
Author-email: Nika Beruashvili <n.beruashvili2005@gmail.com>
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: yfinance>=0.2.19
Requires-Dist: streamlit>=1.22.0
Requires-Dist: plotly>=5.14.0
Requires-Dist: statsmodels>=0.13.5
Requires-Dist: pmdarima>=2.0.4
Requires-Dist: pandas>=1.5.0
Requires-Dist: numpy>=1.23.0

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.

1. 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).

2. 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).

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).

4. 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:

1. 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)

2. Identification: Checking Autocorrelation
from streamtick import check_autocorrelation

# Identifies model order based on ACF and PACF data.
check_autocorrelation(ticker='TSLA', years=3)

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)

4. 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)
