# elbeteltaye/financial-news-and-stock-price-analysis architecture

> Architecture diagram of the GitHub repository elbeteltaye/financial-news-and-stock-price-analysis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/elbeteltaye/financial-news-and-stock-price-analysis
- Repository: https://github.com/elbeteltaye/financial-news-and-stock-price-analysis

## Overview

##### Project type and purpose
- This is a data-analysis pipeline project (not a traditional full-stack app). It focuses on exploring the correlation between financial news sentiment and stock price movements.
- Key indicators from README:
- Three tasks: news descriptive analysis, stock technical analysis, sentiment-price correlation
- Uses Python, Pandas, Matplotlib/Seaborn, TA-Lib, VADER, LDA, yfinance
- Structure centered on Jupyter notebooks, auxiliary scripts, minimal Python modules, and unit tests

##### File structure
- Top-level directories:
- notebooks/ – contains Task1, Task2, Task3 analysis notebooks
- scripts/ – utility or ETL scripts to support data ingestion or processing
- src/ – placeholder for reusable Python modules (currently empty)
- tests/ – unit test stubs (run via GitHub Actions)
- .github/workflows/unittests.yml – CI workflow for running tests
- requirements.txt – dependency spec
- Patterns:
- Pipeline style: data flows through discrete steps (notebooks or scripts)
- CI integration for code quality
- Virtual-env & VSCode settings for development consistency

##### README for additional insights
- Architecture is implicitly a linear data pipeline:
- Data sources: historical news CSV, stock CSV or yfinance API
- Processing stages: cleaning, sentiment scoring, topic modeling, technical indicator calculation
- Analysis stage: correlation between sentiment time series and stock returns
- Visualization: charts in notebooks

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Data Sources
    DS_CSV["Local CSV Files"]:::data
    DS_API["yfinance API"]:::data

    %% Data Ingestion
    ETL["Data Ingestion & Preprocessing (scripts/)"]:::proc

    %% Text Analysis Subgraph
    subgraph "Text Analysis"
        Sentiment["Sentiment Analysis (VADER)"]:::proc
        Topic["Topic Modeling (LDA)"]:::proc
    end

    %% Technical Analysis
    Technical["Technical Analysis (TA-Lib)"]:::proc

    %% Alignment & Correlation
    Align["Data Alignment & Correlation"]:::proc

    %% Visualization & Reporting
    Viz["Visualization & Reporting (Matplotlib/Seaborn)"]:::viz

    %% Development Infrastructure
    subgraph "Development Infrastructure"
        CI["CI Workflow (GitHub Actions)"]:::infra
        Tests["Unit Tests (tests/)"]:::infra
        GitIgnore[".gitignore"]:::infra
        VSCode["VSCode Settings (.vscode/)"]:::infra
    end

    %% Connections
    DS_CSV -->|reads| ETL
    DS_API -->|fetches| ETL
    ETL -->|cleaned data| Sentiment
    ETL -->|cleaned data| Topic
    ETL -->|raw stock data| Technical
    Sentiment -->|sentiment scores| Align
    Topic -->|topic vectors| Align
    Technical -->|tech indicators| Align
    Align -->|aligned dataset| Viz
    CI -->|validates| ETL
    CI -->|validates| Sentiment
    CI -->|validates| Topic
    CI -->|validates| Technical
    CI -->|validates| Align

    %% Click Events
    click DS_CSV "https://github.com/elbeteltaye/financial-news-and-stock-price-analysis/blob/main/notebooks/Task1.ipynb"
    click DS_API "https://github.com/elbeteltaye/financial-news-and-stock-price-analysis/blob/main/requirements.txt"
    click ETL "https://github.com/elbeteltaye/financial-news-and-stock-price-analysis/tree/main/scripts/"
    click ETL "https://github.com/elbeteltaye/financial-news-and-stock-price-analysis/blob/main/scripts/__init__.py"
    click Sentiment "https://github.com/elbeteltaye/financial-news-and-stock-price-analysis/blob/main/notebooks/Task1.ipynb"
    click Sentiment "https://github.com/elbeteltaye/financial-news-and-stock-price-analysis/blob/main/requirements.txt"
    click Topic "https://github.com/elbeteltaye/financial-news-and-stock-price-analysis/blob/main/notebooks/Task1.ipynb"
    click Topic "https://github.com/elbeteltaye/financial-news-and-stock-price-analysis/blob/main/requirements.txt"
    click Technical "https://github.com/elbeteltaye/financial-news-and-stock-price-analysis/blob/main/notebooks/Task2.ipynb"
    click Technical "https://github.com/elbeteltaye/financial-news-and-stock-price-analysis/blob/main/requirements.txt"
    click Align "https://github.com/elbeteltaye/financial-news-and-stock-price-analysis/blob/main/notebooks/Task3.ipynb"
    click Viz "https://github.com/elbeteltaye/financial-news-and-stock-price-analysis/blob/main/notebooks/README.md"
    click CI "https://github.com/elbeteltaye/financial-news-and-stock-price-analysis/blob/main/.github/workflows/unittests.yml"
    click Tests "https://github.com/elbeteltaye/financial-news-and-stock-price-analysis/blob/main/tests/__init__.py"
    click GitIgnore "https://github.com/elbeteltaye/financial-news-and-stock-price-analysis/blob/main/.gitignore"
    click VSCode "https://github.com/elbeteltaye/financial-news-and-stock-price-analysis/tree/main/.vscode/"

    %% Styles
    classDef data fill:#AED6F1,stroke:#1B4F72,color:#1B2631;
    classDef proc fill:#ABEBC6,stroke:#196F3D,color:#1B2631;
    classDef viz fill:#F9E79F,stroke:#B7950B,color:#1B2631;
    classDef infra fill:#D5DBDB,stroke:#7B7D7D,color:#1B2631;
```
