# udithbnambiar47-droid/stock-price-prediction-statsmodels architecture

> Architecture diagram of the GitHub repository udithbnambiar47-droid/stock-price-prediction-statsmodels, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/udithbnambiar47-droid/stock-price-prediction-statsmodels
- Repository: https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels

## Overview

This is a Streamlit stock-analysis and prediction app. Users choose a ticker and history, the app obtains Yahoo Finance data, then presents price and volatility analysis, CSV downloads, and OLS-based next-day forecasting with backtesting and diagnostics. The sampled code is one large application file, so the graph groups its distinct in-file responsibilities rather than implying separate modules. README capabilities not visible in the excerpts are retained where their presence is documented; detailed wiring for those features is not inferred.

Main entry points: [`app.py`](https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py) (Price history)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["App interaction"]
  node_streamlit["Streamlit app<br/>[app.py]"]
  node_ticker_history["Ticker and history<br/>[app.py]"]
end

subgraph group_marketdata["Market data"]
  node_yahoo["Yahoo Finance"]
  node_price_data["Price history<br/>[app.py]"]
  node_currency["Currency formatting<br/>[app.py]"]
end

subgraph group_analysis["Analysis and forecasting"]
  node_feature_building["Feature building<br/>[app.py]"]
  node_ols_forecast["OLS forecasting<br/>[app.py]"]
  node_backtesting["Forecast backtest<br/>[app.py]"]
  node_ols_diagnostics["Model diagnostics<br/>[app.py]"]
  node_volatility["Volatility analysis<br/>[app.py]"]
  node_regression_analysis["Regression analysis<br/>[app.py]"]
end

subgraph group_presentation["Results and visualization"]
  node_data_summary["Data summary<br/>[app.py]"]
  node_correlation["Correlation views<br/>[app.py]"]
  node_pair_plot["Pair plot<br/>[app.py]"]
  node_forecast_results["Forecast results<br/>[app.py]"]
  node_volatility_views["Volatility charts<br/>[app.py]"]
  node_csv_downloads["CSV downloads<br/>[app.py]"]
  node_regression_results["Regression results<br/>[app.py]"]
end

node_user(("User"))

node_user -->|"uses"| node_streamlit
node_streamlit -.->|"collects"| node_ticker_history
node_ticker_history -->|"requests prices"| node_yahoo
node_yahoo -.->|"returns history"| node_price_data
node_ticker_history -->|"looks up currency"| node_currency
node_price_data -->|"builds features"| node_feature_building
node_feature_building -.->|"provides predictors"| node_ols_forecast
node_ols_forecast -->|"evaluates forecast"| node_backtesting
node_ols_forecast -.->|"shows forecast"| node_forecast_results
node_backtesting -->|"shows test results"| node_forecast_results
node_price_data -->|"computes measures"| node_volatility
node_volatility -->|"plots measures"| node_volatility_views
node_price_data -.->|"supplies observations"| node_regression_analysis
node_regression_analysis -->|"checks model"| node_ols_diagnostics
node_regression_analysis -.->|"shows OLS output"| node_regression_results
node_price_data -.->|"summarizes data"| node_data_summary
node_price_data -.->|"computes correlations"| node_correlation
node_price_data -.->|"plots relationships"| node_pair_plot
node_price_data -->|"exports data"| node_csv_downloads
node_data_summary -.->|"renders"| node_streamlit
node_correlation -.->|"renders"| node_streamlit
node_pair_plot -.->|"renders"| node_streamlit
node_forecast_results -->|"renders"| node_streamlit
node_volatility_views -->|"renders"| node_streamlit
node_csv_downloads -->|"offers download"| node_streamlit
node_regression_results -.->|"renders"| node_streamlit

click node_streamlit "https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py"
click node_ticker_history "https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py"
click node_price_data "https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py"
click node_currency "https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py"
click node_feature_building "https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py"
click node_ols_forecast "https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py"
click node_backtesting "https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py"
click node_ols_diagnostics "https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py"
click node_volatility "https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py"
click node_regression_analysis "https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py"
click node_data_summary "https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py"
click node_correlation "https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py"
click node_pair_plot "https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py"
click node_forecast_results "https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py"
click node_volatility_views "https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py"
click node_csv_downloads "https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py"
click node_regression_results "https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_streamlit,node_ticker_history,node_user toneBlue
class node_yahoo,node_price_data,node_currency toneAmber
class node_feature_building,node_ols_forecast,node_backtesting,node_ols_diagnostics,node_volatility,node_regression_analysis toneMint
class node_data_summary,node_correlation,node_pair_plot,node_forecast_results,node_volatility_views,node_csv_downloads,node_regression_results toneRose
```

## Components

### App interaction

- [Streamlit app](https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py): `app.py`
- [Ticker and history](https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py): `app.py`

### Market data

- **Yahoo Finance**
- [Price history](https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py): `app.py`
- [Currency formatting](https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py): `app.py`

### Analysis and forecasting

- [Feature building](https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py): `app.py`
- [OLS forecasting](https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py): `app.py`
- [Forecast backtest](https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py): `app.py`
- [Model diagnostics](https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py): `app.py`
- [Volatility analysis](https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py): `app.py`
- [Regression analysis](https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py): `app.py`

### Results and visualization

- [Data summary](https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py): `app.py`
- [Correlation views](https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py): `app.py`
- [Pair plot](https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py): `app.py`
- [Forecast results](https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py): `app.py`
- [Volatility charts](https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py): `app.py`
- [CSV downloads](https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py): `app.py`
- [Regression results](https://github.com/udithbnambiar47-droid/stock-price-prediction-statsmodels/blob/main/app.py): `app.py`

### Other components

- **User**

## Connections

- User → Streamlit app: uses (evidence: `Readme.MD`)
- Streamlit app → Ticker and history: collects (evidence: `app.py`)
- Ticker and history → Yahoo Finance: requests prices (evidence: `Readme.MD`)
- Yahoo Finance → Price history: returns history
- Ticker and history → Currency formatting: looks up currency (evidence: `app.py`)
- Price history → Feature building: builds features (evidence: `app.py`)
- Feature building → OLS forecasting: provides predictors (evidence: `app.py`)
- OLS forecasting → Forecast backtest: evaluates forecast (evidence: `app.py`)
- OLS forecasting → Forecast results: shows forecast (evidence: `app.py`)
- Forecast backtest → Forecast results: shows test results (evidence: `app.py`)
- Price history → Volatility analysis: computes measures (evidence: `app.py`)
- Volatility analysis → Volatility charts: plots measures (evidence: `app.py`)
- Price history → Regression analysis: supplies observations (evidence: `app.py`)
- Regression analysis → Model diagnostics: checks model (evidence: `app.py`)
- Regression analysis → Regression results: shows OLS output (evidence: `app.py`)
- Price history → Data summary: summarizes data (evidence: `app.py`)
- Price history → Correlation views: computes correlations (evidence: `app.py`)
- Price history → Pair plot: plots relationships (evidence: `app.py`)
- Price history → CSV downloads: exports data (evidence: `app.py`)
- Data summary → Streamlit app: renders (evidence: `app.py`)
- Correlation views → Streamlit app: renders (evidence: `app.py`)
- Pair plot → Streamlit app: renders (evidence: `app.py`)
- Forecast results → Streamlit app: renders (evidence: `app.py`)
- Volatility charts → Streamlit app: renders (evidence: `app.py`)
- CSV downloads → Streamlit app: offers download (evidence: `app.py`)
- Regression results → Streamlit app: renders (evidence: `app.py`)
