# huseinzol05/stock-prediction-models architecture

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

- Interactive diagram: https://gitdiagram.com/huseinzol05/stock-prediction-models
- Repository: https://github.com/huseinzol05/stock-prediction-models

## Overview

Stock-Prediction-Models is a collection of stock-forecasting notebooks, trading agents, simulations, data explorations, and a browser-based TensorFlow.js demo—not one unified runtime. The README describes independent model and analysis capabilities; the graph preserves those branches without implying a shared processing pipeline. Sampled source confirms the real-time Flask service’s trade/reset interface and the DNC’s controller-to-memory structure. Most notebook implementations were not sampled, so their internal relationships are omitted.

Main entry points: [`stacking`](https://github.com/huseinzol05/stock-prediction-models/tree/master/stacking) (Stacking models), [`realtime-agent/app.py`](https://github.com/huseinzol05/stock-prediction-models/blob/master/realtime-agent/app.py) (Trade and reset API), [`deep-learning/access.py`](https://github.com/huseinzol05/stock-prediction-models/blob/master/deep-learning/access.py) (Memory access), [`deep-learning/addressing.py`](https://github.com/huseinzol05/stock-prediction-models/blob/master/deep-learning/addressing.py) (Memory addressing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_forecasting["Forecasting models"]
  node_deep_models["Deep-learning models"]
  node_dnc_core["DNC core<br/>[dnc.py]"]
  node_dnc_access["Memory access<br/>[access.py]"]
  node_dnc_address["Memory addressing<br/>[addressing.py]"]
  node_dnc_utils["DNC utilities<br/>[util.py]"]
  node_stacking_models["Stacking models"]
  node_stack_encoder["Stacking autoencoder<br/>[autoencoder.py]"]
  node_stack_rnn["Stacking RNN<br/>[model.py]"]
end

subgraph group_trading["Trading agents"]
  node_agents["Trading strategies"]
  node_free_agents["Evolution strategies"]
end

subgraph group_analysis["Analysis and simulation"]
  node_market_data[("Market datasets")]
  node_simulations["Market simulations"]
  node_explorations["Data explorations"]
end

subgraph group_realtime["Real-time service"]
  node_realtime_client(("API client"))
  node_realtime_api["Trade and reset API<br/>[app.py]"]
  node_realtime_agent["Evolution trading agent<br/>[app.py]"]
end

subgraph group_browser["Browser demo"]
  node_browser_app["Forecasting interface<br/>[init.js]"]
  node_browser_helpers["TensorFlow.js utilities<br/>[utils.js]"]
  node_browser_data["Google sample data<br/>[google.js]"]
end

node_user(("Engineer or analyst"))

node_user -->|"explores forecasts"| node_deep_models
node_user -->|"explores ensembles"| node_stacking_models
node_user -->|"runs strategies"| node_agents
node_user -->|"explores agents"| node_free_agents
node_user -->|"runs simulations"| node_simulations
node_user -->|"studies data"| node_explorations
node_user -->|"uses demo"| node_browser_app
node_realtime_client -->|"requests trade"| node_realtime_api
node_realtime_api -->|"dispatches trade"| node_realtime_agent
node_realtime_api -->|"resets capital"| node_realtime_agent
node_dnc_core -->|"calls memory"| node_dnc_access
node_dnc_access -->|"uses addressing"| node_dnc_address
node_dnc_address -->|"uses utilities"| node_dnc_utils
node_stacking_models -.->|"reduces dimensions"| node_stack_encoder
node_stacking_models -.->|"includes recurrent model"| node_stack_rnn

click node_deep_models "https://github.com/huseinzol05/stock-prediction-models/tree/master/deep-learning"
click node_dnc_core "https://github.com/huseinzol05/stock-prediction-models/blob/master/deep-learning/dnc.py"
click node_dnc_access "https://github.com/huseinzol05/stock-prediction-models/blob/master/deep-learning/access.py"
click node_dnc_address "https://github.com/huseinzol05/stock-prediction-models/blob/master/deep-learning/addressing.py"
click node_dnc_utils "https://github.com/huseinzol05/stock-prediction-models/blob/master/deep-learning/util.py"
click node_stacking_models "https://github.com/huseinzol05/stock-prediction-models/tree/master/stacking"
click node_stack_encoder "https://github.com/huseinzol05/stock-prediction-models/blob/master/stacking/autoencoder.py"
click node_stack_rnn "https://github.com/huseinzol05/stock-prediction-models/blob/master/stacking/model.py"
click node_agents "https://github.com/huseinzol05/stock-prediction-models/tree/master/agent"
click node_free_agents "https://github.com/huseinzol05/stock-prediction-models/tree/master/free-agent"
click node_realtime_api "https://github.com/huseinzol05/stock-prediction-models/blob/master/realtime-agent/app.py"
click node_realtime_agent "https://github.com/huseinzol05/stock-prediction-models/blob/master/realtime-agent/app.py"
click node_market_data "https://github.com/huseinzol05/stock-prediction-models/tree/master/dataset"
click node_simulations "https://github.com/huseinzol05/stock-prediction-models/tree/master/simulation"
click node_explorations "https://github.com/huseinzol05/stock-prediction-models/tree/master/misc"
click node_browser_app "https://github.com/huseinzol05/stock-prediction-models/blob/master/stock-forecasting-js/init.js"
click node_browser_helpers "https://github.com/huseinzol05/stock-prediction-models/blob/master/stock-forecasting-js/js/utils.js"
click node_browser_data "https://github.com/huseinzol05/stock-prediction-models/blob/master/stock-forecasting-js/data/google.js"

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_deep_models,node_dnc_core,node_dnc_access,node_dnc_address,node_dnc_utils,node_stacking_models,node_stack_encoder,node_stack_rnn toneBlue
class node_agents,node_free_agents toneAmber
class node_market_data,node_simulations,node_explorations toneMint
class node_realtime_client,node_realtime_api,node_realtime_agent toneRose
class node_browser_app,node_browser_helpers,node_browser_data,node_user toneIndigo
```

## Components

### Forecasting models

- [Deep-learning models](https://github.com/huseinzol05/stock-prediction-models/tree/master/deep-learning): `deep-learning`
- [DNC core](https://github.com/huseinzol05/stock-prediction-models/blob/master/deep-learning/dnc.py): `deep-learning/dnc.py`
- [Memory access](https://github.com/huseinzol05/stock-prediction-models/blob/master/deep-learning/access.py): `deep-learning/access.py`
- [Memory addressing](https://github.com/huseinzol05/stock-prediction-models/blob/master/deep-learning/addressing.py): `deep-learning/addressing.py`
- [DNC utilities](https://github.com/huseinzol05/stock-prediction-models/blob/master/deep-learning/util.py): `deep-learning/util.py`
- [Stacking models](https://github.com/huseinzol05/stock-prediction-models/tree/master/stacking): `stacking`
- [Stacking autoencoder](https://github.com/huseinzol05/stock-prediction-models/blob/master/stacking/autoencoder.py): `stacking/autoencoder.py`
- [Stacking RNN](https://github.com/huseinzol05/stock-prediction-models/blob/master/stacking/model.py): `stacking/model.py`

### Trading agents

- [Trading strategies](https://github.com/huseinzol05/stock-prediction-models/tree/master/agent): `agent`
- [Evolution strategies](https://github.com/huseinzol05/stock-prediction-models/tree/master/free-agent): `free-agent`

### Analysis and simulation

- [Market datasets](https://github.com/huseinzol05/stock-prediction-models/tree/master/dataset): `dataset`
- [Market simulations](https://github.com/huseinzol05/stock-prediction-models/tree/master/simulation): `simulation`
- [Data explorations](https://github.com/huseinzol05/stock-prediction-models/tree/master/misc): `misc`

### Real-time service

- **API client**
- [Trade and reset API](https://github.com/huseinzol05/stock-prediction-models/blob/master/realtime-agent/app.py): `realtime-agent/app.py`
- [Evolution trading agent](https://github.com/huseinzol05/stock-prediction-models/blob/master/realtime-agent/app.py): `realtime-agent/app.py`

### Browser demo

- [Forecasting interface](https://github.com/huseinzol05/stock-prediction-models/blob/master/stock-forecasting-js/init.js): `stock-forecasting-js/init.js`
- [TensorFlow.js utilities](https://github.com/huseinzol05/stock-prediction-models/blob/master/stock-forecasting-js/js/utils.js): `stock-forecasting-js/js/utils.js`
- [Google sample data](https://github.com/huseinzol05/stock-prediction-models/blob/master/stock-forecasting-js/data/google.js): `stock-forecasting-js/data/google.js`

### Other components

- **Engineer or analyst**

## Connections

- Engineer or analyst → Deep-learning models: explores forecasts (evidence: `README.md`)
- Engineer or analyst → Stacking models: explores ensembles (evidence: `README.md`)
- Engineer or analyst → Trading strategies: runs strategies (evidence: `README.md`)
- Engineer or analyst → Evolution strategies: explores agents (evidence: `README.md`)
- Engineer or analyst → Market simulations: runs simulations (evidence: `README.md`)
- Engineer or analyst → Data explorations: studies data (evidence: `README.md`)
- Engineer or analyst → Forecasting interface: uses demo (evidence: `README.md`)
- API client → Trade and reset API: requests trade (evidence: `realtime-agent/app.py`)
- Trade and reset API → Evolution trading agent: dispatches trade (evidence: `realtime-agent/app.py`)
- Trade and reset API → Evolution trading agent: resets capital (evidence: `realtime-agent/app.py`)
- DNC core → Memory access: calls memory (evidence: `deep-learning/dnc.py`)
- Memory access → Memory addressing: uses addressing (evidence: `deep-learning/access.py`)
- Memory addressing → DNC utilities: uses utilities (evidence: `deep-learning/addressing.py`)
- Stacking models → Stacking autoencoder: reduces dimensions (evidence: `README.md`)
- Stacking models → Stacking RNN: includes recurrent model (evidence: `README.md`)
