# startlingadama/quantts architecture

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

- Interactive diagram: https://gitdiagram.com/startlingadama/quantts
- Repository: https://github.com/startlingadama/quantts

## Overview

QuantTS-Core is a Streamlit dashboard for quantitative financial time-series analysis. Users launch the app, choose a market overview or analysis page, and inspect charts, metrics, and statistical diagnostics. Its documented data stages run from Yahoo Finance ingestion through return preprocessing and feature/model generation to analysis and backtesting. The graph includes the major dashboard capabilities and runtime modules; source excerpts do not establish how each page obtains its data, so those links are omitted. Some pipeline links are documented in the README rather than shown in source.

Main entry points: [`app.py`](https://github.com/startlingadama/quantts/blob/main/app.py) (Streamlit App), [`components/icons.py`](https://github.com/startlingadama/quantts/blob/main/components/icons.py) (SVG Icons), [`src/models/garch.py`](https://github.com/startlingadama/quantts/blob/main/src/models/garch.py) (GARCH Model), [`data/raw/yahoo`](https://github.com/startlingadama/quantts/tree/main/data/raw/yahoo) (Raw Prices)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Dashboard"]
  node_app["Streamlit App<br/>[app.py]"]
  node_overview["Market Overview<br/>[overview.py]"]
  node_returns["Returns Analysis<br/>[returns.py]"]
  node_volpage["Volatility Analysis<br/>[volatility.py]"]
  node_dependency["Dependency Analysis<br/>[dependance.py]"]
  node_stability["Stability Tests<br/>[stability.py]"]
  node_icons["SVG Icons<br/>[icons.py]"]
end

subgraph group_data["Data Pipeline"]
  node_yahoo["Yahoo Ingestion<br/>[load_yahoo.py]"]
  node_raw[("Raw Prices")]
  node_returnsgen["Return Preprocessing<br/>[make_returns.py]"]
  node_clean[("Clean Returns")]
end

subgraph group_quant["Quant Analysis"]
  node_arima["ARIMA Modeling<br/>[arima.py]"]
  node_baseline["Baseline Model<br/>[baseline.py]"]
  node_acf["ACF/PACF<br/>[acf_pacf.py]"]
  node_stationarity["Stationarity<br/>[stationarity.py]"]
  node_stylized["Stylized Facts<br/>[stylized_facts.py]"]
  node_signals["Time-Series Signals<br/>[ts_signals.py]"]
end

subgraph group_risk["Risk Modeling"]
  node_garch["GARCH Model<br/>[garch.py]"]
  node_features[("Feature Returns")]
  node_modelstore[("Saved Models")]
  node_backtest["VaR Backtest<br/>[engine.py]"]
  node_riskdata[("Backtest Results")]
end

node_analyst(("Analyst"))

node_analyst -->|"launches"| node_app
node_app -->|"routes to"| node_overview
node_app -->|"routes to"| node_returns
node_app -->|"routes to"| node_volpage
node_app -->|"routes to"| node_dependency
node_app -->|"routes to"| node_stability
node_app -->|"uses"| node_icons
node_overview -->|"uses"| node_icons
node_returns -->|"uses"| node_icons
node_volpage -->|"uses"| node_icons
node_dependency -->|"uses"| node_icons
node_stability -->|"uses"| node_icons
node_yahoo -->|"writes prices"| node_raw
node_raw -->|"provides prices"| node_returnsgen
node_returnsgen -->|"writes returns"| node_clean
node_clean -->|"provides returns"| node_garch
node_garch -->|"saves model"| node_modelstore
node_garch -->|"writes volatility"| node_features
node_features -->|"provides returns"| node_backtest
node_modelstore -->|"provides GARCH model"| node_backtest
node_backtest -->|"writes VaR results"| node_riskdata
node_yahoo -.->|"downloads from"| node_raw

click node_app "https://github.com/startlingadama/quantts/blob/main/app.py"
click node_overview "https://github.com/startlingadama/quantts/blob/main/pages/overview.py"
click node_returns "https://github.com/startlingadama/quantts/blob/main/pages/returns.py"
click node_volpage "https://github.com/startlingadama/quantts/blob/main/pages/volatility.py"
click node_dependency "https://github.com/startlingadama/quantts/blob/main/pages/dependance.py"
click node_stability "https://github.com/startlingadama/quantts/blob/main/pages/stability.py"
click node_icons "https://github.com/startlingadama/quantts/blob/main/components/icons.py"
click node_yahoo "https://github.com/startlingadama/quantts/blob/main/src/ingestion/load_yahoo.py"
click node_raw "https://github.com/startlingadama/quantts/tree/main/data/raw/yahoo"
click node_returnsgen "https://github.com/startlingadama/quantts/blob/main/src/preprocessing/make_returns.py"
click node_clean "https://github.com/startlingadama/quantts/tree/main/data/clean/yahoo"
click node_arima "https://github.com/startlingadama/quantts/blob/main/src/models/arima.py"
click node_baseline "https://github.com/startlingadama/quantts/blob/main/src/models/baseline.py"
click node_acf "https://github.com/startlingadama/quantts/blob/main/src/analysis/acf_pacf.py"
click node_stationarity "https://github.com/startlingadama/quantts/blob/main/src/analysis/stationarity.py"
click node_stylized "https://github.com/startlingadama/quantts/blob/main/src/analysis/stylized_facts.py"
click node_signals "https://github.com/startlingadama/quantts/blob/main/src/signals/ts_signals.py"
click node_garch "https://github.com/startlingadama/quantts/blob/main/src/models/garch.py"
click node_features "https://github.com/startlingadama/quantts/tree/main/data/features"
click node_modelstore "https://github.com/startlingadama/quantts/tree/main/models"
click node_backtest "https://github.com/startlingadama/quantts/blob/main/src/backtest/engine.py"
click node_riskdata "https://github.com/startlingadama/quantts/tree/main/data/backtest"

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_app,node_overview,node_returns,node_volpage,node_dependency,node_stability,node_icons toneBlue
class node_yahoo,node_raw,node_returnsgen,node_clean toneAmber
class node_arima,node_baseline,node_acf,node_stationarity,node_stylized,node_signals toneMint
class node_garch,node_features,node_modelstore,node_backtest,node_riskdata toneRose
class node_analyst toneIndigo
```

## Components

### Dashboard

- [Streamlit App](https://github.com/startlingadama/quantts/blob/main/app.py): `app.py`
- [Market Overview](https://github.com/startlingadama/quantts/blob/main/pages/overview.py): `pages/overview.py`
- [Returns Analysis](https://github.com/startlingadama/quantts/blob/main/pages/returns.py): `pages/returns.py`
- [Volatility Analysis](https://github.com/startlingadama/quantts/blob/main/pages/volatility.py): `pages/volatility.py`
- [Dependency Analysis](https://github.com/startlingadama/quantts/blob/main/pages/dependance.py): `pages/dependance.py`
- [Stability Tests](https://github.com/startlingadama/quantts/blob/main/pages/stability.py): `pages/stability.py`
- [SVG Icons](https://github.com/startlingadama/quantts/blob/main/components/icons.py): `components/icons.py`

### Data Pipeline

- [Yahoo Ingestion](https://github.com/startlingadama/quantts/blob/main/src/ingestion/load_yahoo.py): `src/ingestion/load_yahoo.py`
- [Raw Prices](https://github.com/startlingadama/quantts/tree/main/data/raw/yahoo): `data/raw/yahoo`
- [Return Preprocessing](https://github.com/startlingadama/quantts/blob/main/src/preprocessing/make_returns.py): `src/preprocessing/make_returns.py`
- [Clean Returns](https://github.com/startlingadama/quantts/tree/main/data/clean/yahoo): `data/clean/yahoo`

### Quant Analysis

- [ARIMA Modeling](https://github.com/startlingadama/quantts/blob/main/src/models/arima.py): `src/models/arima.py`
- [Baseline Model](https://github.com/startlingadama/quantts/blob/main/src/models/baseline.py): `src/models/baseline.py`
- [ACF/PACF](https://github.com/startlingadama/quantts/blob/main/src/analysis/acf_pacf.py): `src/analysis/acf_pacf.py`
- [Stationarity](https://github.com/startlingadama/quantts/blob/main/src/analysis/stationarity.py): `src/analysis/stationarity.py`
- [Stylized Facts](https://github.com/startlingadama/quantts/blob/main/src/analysis/stylized_facts.py): `src/analysis/stylized_facts.py`
- [Time-Series Signals](https://github.com/startlingadama/quantts/blob/main/src/signals/ts_signals.py): `src/signals/ts_signals.py`

### Risk Modeling

- [GARCH Model](https://github.com/startlingadama/quantts/blob/main/src/models/garch.py): `src/models/garch.py`
- [Feature Returns](https://github.com/startlingadama/quantts/tree/main/data/features): `data/features`
- [Saved Models](https://github.com/startlingadama/quantts/tree/main/models): `models`
- [VaR Backtest](https://github.com/startlingadama/quantts/blob/main/src/backtest/engine.py): `src/backtest/engine.py`
- [Backtest Results](https://github.com/startlingadama/quantts/tree/main/data/backtest): `data/backtest`

### Other components

- **Analyst**

## Connections

- Analyst → Streamlit App: launches (evidence: `README.md`)
- Streamlit App → Market Overview: routes to (evidence: `app.py`)
- Streamlit App → Returns Analysis: routes to (evidence: `app.py`)
- Streamlit App → Volatility Analysis: routes to (evidence: `app.py`)
- Streamlit App → Dependency Analysis: routes to (evidence: `app.py`)
- Streamlit App → Stability Tests: routes to (evidence: `app.py`)
- Streamlit App → SVG Icons: uses (evidence: `app.py`)
- Market Overview → SVG Icons: uses (evidence: `pages/overview.py`)
- Returns Analysis → SVG Icons: uses (evidence: `pages/returns.py`)
- Volatility Analysis → SVG Icons: uses (evidence: `pages/volatility.py`)
- Dependency Analysis → SVG Icons: uses (evidence: `pages/dependance.py`)
- Stability Tests → SVG Icons: uses (evidence: `pages/stability.py`)
- Yahoo Ingestion → Raw Prices: writes prices (evidence: `src/ingestion/load_yahoo.py`)
- Raw Prices → Return Preprocessing: provides prices (evidence: `src/preprocessing/make_returns.py`)
- Return Preprocessing → Clean Returns: writes returns (evidence: `src/preprocessing/make_returns.py`)
- Clean Returns → GARCH Model: provides returns (evidence: `src/models/garch.py`)
- GARCH Model → Saved Models: saves model (evidence: `src/models/garch.py`)
- GARCH Model → Feature Returns: writes volatility (evidence: `src/models/garch.py`)
- Feature Returns → VaR Backtest: provides returns (evidence: `src/backtest/engine.py`)
- Saved Models → VaR Backtest: provides GARCH model (evidence: `src/backtest/engine.py`)
- VaR Backtest → Backtest Results: writes VaR results (evidence: `src/backtest/engine.py`)
- Yahoo Ingestion → Raw Prices: downloads from (evidence: `README.md`)
