# akurgat/automating-technical-analysis architecture

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

- Interactive diagram: https://gitdiagram.com/akurgat/automating-technical-analysis
- Repository: https://github.com/akurgat/automating-technical-analysis

## Overview

This is a Streamlit financial-analysis app that turns a selected asset and interval into technical-indicator analysis, predicted price/action, and interactive charts. The graph follows the documented UI-to-result flow and retains the separate market-catalog refresh and indicator-analysis stages. Edges reflect shown imports, calls, reads, writes, or README-described behavior; some orchestration details are omitted from the excerpts, so those links are not inferred.

Main entry points: [`Trade.py`](https://github.com/akurgat/automating-technical-analysis/blob/master/Trade.py) (Streamlit app), [`app/data_sourcing.py`](https://github.com/akurgat/automating-technical-analysis/blob/master/app/data_sourcing.py) (Data sourcing), [`app/update_market_data.py`](https://github.com/akurgat/automating-technical-analysis/blob/master/app/update_market_data.py) (Catalog refresh), [`app/graph.py`](https://github.com/akurgat/automating-technical-analysis/blob/master/app/graph.py) (Charts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_trade["Streamlit app<br/>[Trade.py]"]
end

subgraph group_market["Market data"]
  node_catalog[("Asset catalogs")]
  node_sourcing["Data sourcing<br/>[data_sourcing.py]"]
  node_refresh["Catalog refresh"]
end

subgraph group_analysis["Technical analysis"]
  node_indicators["Technical indicators"]
  node_signals["Signal analysis"]
  node_preprocessing["Sequence preprocessing<br/>[scaling.py]"]
end

subgraph group_prediction["Prediction and charts"]
  node_prediction["Model prediction<br/>[model.py]"]
  node_models["Trained models"]
  node_visualization["Charts<br/>[graph.py]"]
end

node_user(("Trader"))
node_feeds{{"Market data services"}}
node_chart["Analysis results"]

node_user -->|"selects asset"| node_trade
node_trade -->|"loads market data"| node_sourcing
node_sourcing -->|"reads catalogs"| node_catalog
node_sourcing -->|"checks freshness"| node_refresh
node_refresh -->|"writes catalogs"| node_catalog
node_sourcing -->|"fetches prices"| node_feeds
node_refresh -->|"fetches listings"| node_feeds
node_trade -->|"uses analysis"| node_signals
node_indicators -->|"inherits data access"| node_sourcing
node_signals -->|"calculates indicators"| node_indicators
node_preprocessing -->|"builds signals"| node_signals
node_prediction -->|"scales sequences"| node_preprocessing
node_trade -->|"loads weights"| node_models
node_prediction -.->|"runs inference"| node_models
node_trade -->|"uses charts"| node_visualization
node_visualization -->|"generates predictions"| node_prediction
node_visualization -->|"renders results"| node_chart
node_trade -->|"displays results"| node_chart

click node_trade "https://github.com/akurgat/automating-technical-analysis/blob/master/Trade.py"
click node_catalog "https://github.com/akurgat/automating-technical-analysis/tree/master/market_data"
click node_sourcing "https://github.com/akurgat/automating-technical-analysis/blob/master/app/data_sourcing.py"
click node_refresh "https://github.com/akurgat/automating-technical-analysis/blob/master/app/update_market_data.py"
click node_indicators "https://github.com/akurgat/automating-technical-analysis/blob/master/app/technical_indicators.py"
click node_signals "https://github.com/akurgat/automating-technical-analysis/blob/master/app/indicator_analysis.py"
click node_preprocessing "https://github.com/akurgat/automating-technical-analysis/blob/master/app/scaling.py"
click node_prediction "https://github.com/akurgat/automating-technical-analysis/blob/master/app/model.py"
click node_models "https://github.com/akurgat/automating-technical-analysis/tree/master/models"
click node_visualization "https://github.com/akurgat/automating-technical-analysis/blob/master/app/graph.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_trade toneBlue
class node_catalog,node_sourcing,node_refresh toneAmber
class node_indicators,node_signals,node_preprocessing toneMint
class node_prediction,node_models,node_visualization toneRose
class node_user,node_feeds,node_chart toneIndigo
```

## Components

### User interface

- [Streamlit app](https://github.com/akurgat/automating-technical-analysis/blob/master/Trade.py): `Trade.py`

### Market data

- [Asset catalogs](https://github.com/akurgat/automating-technical-analysis/tree/master/market_data): `market_data`
- [Data sourcing](https://github.com/akurgat/automating-technical-analysis/blob/master/app/data_sourcing.py): `app/data_sourcing.py`
- [Catalog refresh](https://github.com/akurgat/automating-technical-analysis/blob/master/app/update_market_data.py): `app/update_market_data.py`

### Technical analysis

- [Technical indicators](https://github.com/akurgat/automating-technical-analysis/blob/master/app/technical_indicators.py): `app/technical_indicators.py`
- [Signal analysis](https://github.com/akurgat/automating-technical-analysis/blob/master/app/indicator_analysis.py): `app/indicator_analysis.py`
- [Sequence preprocessing](https://github.com/akurgat/automating-technical-analysis/blob/master/app/scaling.py): `app/scaling.py`

### Prediction and charts

- [Model prediction](https://github.com/akurgat/automating-technical-analysis/blob/master/app/model.py): `app/model.py`
- [Trained models](https://github.com/akurgat/automating-technical-analysis/tree/master/models): `models`
- [Charts](https://github.com/akurgat/automating-technical-analysis/blob/master/app/graph.py): `app/graph.py`

### Other components

- **Trader**
- **Market data services**
- **Analysis results**

## Connections

- Trader → Streamlit app: selects asset (evidence: `Trade.py`)
- Streamlit app → Data sourcing: loads market data (evidence: `Trade.py`)
- Data sourcing → Asset catalogs: reads catalogs (evidence: `app/data_sourcing.py`)
- Data sourcing → Catalog refresh: checks freshness (evidence: `app/data_sourcing.py`)
- Catalog refresh → Asset catalogs: writes catalogs (evidence: `app/update_market_data.py`)
- Data sourcing → Market data services: fetches prices (evidence: `app/data_sourcing.py`)
- Catalog refresh → Market data services: fetches listings (evidence: `app/update_market_data.py`)
- Streamlit app → Signal analysis: uses analysis (evidence: `Trade.py`)
- Technical indicators → Data sourcing: inherits data access (evidence: `app/technical_indicators.py`)
- Signal analysis → Technical indicators: calculates indicators (evidence: `app/indicator_analysis.py`)
- Sequence preprocessing → Signal analysis: builds signals (evidence: `app/scaling.py`)
- Model prediction → Sequence preprocessing: scales sequences (evidence: `app/model.py`)
- Streamlit app → Trained models: loads weights (evidence: `Trade.py`)
- Model prediction → Trained models: runs inference
- Streamlit app → Charts: uses charts (evidence: `Trade.py`)
- Charts → Model prediction: generates predictions (evidence: `app/graph.py`)
- Charts → Analysis results: renders results (evidence: `app/graph.py`)
- Streamlit app → Analysis results: displays results (evidence: `Trade.py`)
