# ahtisham34-tech/psx-stock-analysis architecture

> Architecture diagram of the GitHub repository ahtisham34-tech/psx-stock-analysis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ahtisham34-tech/psx-stock-analysis
- Repository: https://github.com/ahtisham34-tech/psx-stock-analysis

## Overview

This repository is an end-to-end KSE-100 market analysis project: an analyst explores 2008–2021 trading data through a Python notebook, which documents feature engineering and SQL window-function analysis, alongside a Power BI dashboard for interactive review. The README identifies cleaned and feature-engineered CSVs and dashboard capabilities including trend, volatility, seasonality, returns, moving averages, and drawdown. The tree provides no source excerpts, so exact notebook reads, exports, and dashboard data connections cannot be verified; those links are omitted.

Main entry points: [`psx_analysis.ipynb`](https://github.com/ahtisham34-tech/psx-stock-analysis/blob/main/psx_analysis.ipynb) (Python Analysis), [`power_bi_dashboard.pbix`](https://github.com/ahtisham34-tech/psx-stock-analysis/blob/main/power_bi_dashboard.pbix) (Power BI Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_analysis["Market Analysis"]
  node_analysis_notebook["Python Analysis<br/>[psx_analysis.ipynb]"]
end

subgraph group_data["Market Data"]
  node_source_data["Source Data"]
  node_features["Engineered Features"]
  node_clean_data["Cleaned Data<br/>[kse100_clean.csv]"]
end

subgraph group_dashboard["Interactive Dashboard"]
  node_power_bi["Power BI Dashboard"]
end

node_analyst(("Analyst"))

node_analyst -->|"analyzes data"| node_analysis_notebook
node_analyst -->|"explores dashboard"| node_power_bi

click node_source_data "https://github.com/ahtisham34-tech/psx-stock-analysis/blob/main/stock_exchange_data.csv"
click node_analysis_notebook "https://github.com/ahtisham34-tech/psx-stock-analysis/blob/main/psx_analysis.ipynb"
click node_features "https://github.com/ahtisham34-tech/psx-stock-analysis/blob/main/kse100_features.csv"
click node_clean_data "https://github.com/ahtisham34-tech/psx-stock-analysis/blob/main/kse100_clean.csv"
click node_power_bi "https://github.com/ahtisham34-tech/psx-stock-analysis/blob/main/power_bi_dashboard.pbix"

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_analysis_notebook toneBlue
class node_source_data,node_features,node_clean_data toneAmber
class node_power_bi toneMint
class node_analyst toneIndigo
```

## Components

### Market Analysis

- [Python Analysis](https://github.com/ahtisham34-tech/psx-stock-analysis/blob/main/psx_analysis.ipynb): `psx_analysis.ipynb`

### Market Data

- [Source Data](https://github.com/ahtisham34-tech/psx-stock-analysis/blob/main/stock_exchange_data.csv): `stock_exchange_data.csv`
- [Engineered Features](https://github.com/ahtisham34-tech/psx-stock-analysis/blob/main/kse100_features.csv): `kse100_features.csv`
- [Cleaned Data](https://github.com/ahtisham34-tech/psx-stock-analysis/blob/main/kse100_clean.csv): `kse100_clean.csv`

### Interactive Dashboard

- [Power BI Dashboard](https://github.com/ahtisham34-tech/psx-stock-analysis/blob/main/power_bi_dashboard.pbix): `power_bi_dashboard.pbix`

### Other components

- **Analyst**

## Connections

- Analyst → Python Analysis: analyzes data
- Analyst → Power BI Dashboard: explores dashboard
