# prat617/nq-futures-stats architecture

> Architecture diagram of the GitHub repository prat617/nq-futures-stats, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/prat617/nq-futures-stats
- Repository: https://github.com/prat617/nq-futures-stats

## Overview

This repository is presented as an NQ futures research-data collection. Its implemented workflow is limited to loading settings and attempting a daily OHLCV fetch; the fetch function is explicitly a placeholder, so it does not currently retrieve CME data. The README also describes processed data and research datasets, but no processing or analysis implementation appears in the tree. Those capabilities are shown as documented data areas, not as verified runtime flows.

Main entry points: [`scripts/fetch_nq_data.py`](https://github.com/prat617/nq-futures-stats/blob/main/scripts/fetch_nq_data.py) (Fetch script), [`config/settings.example.yaml`](https://github.com/prat617/nq-futures-stats/blob/main/config/settings.example.yaml) (Example settings), [`data/raw`](https://github.com/prat617/nq-futures-stats/tree/main/data/raw) (Raw downloads)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Data collection"]
  node_fetcher["Fetch script<br/>[fetch_nq_data.py]"]
  node_settings["Example settings"]
end

subgraph group_research["Research data"]
  node_raw_data[("Raw downloads")]
  node_processed_data[("Processed datasets")]
  node_reference_specs["Contract specs"]
  node_research_outputs["Research datasets"]
end

node_researcher(("Researcher"))

node_researcher -->|"runs"| node_fetcher
node_fetcher -->|"reads settings"| node_settings
node_fetcher -->|"writes nonempty results"| node_raw_data

click node_fetcher "https://github.com/prat617/nq-futures-stats/blob/main/scripts/fetch_nq_data.py"
click node_settings "https://github.com/prat617/nq-futures-stats/blob/main/config/settings.example.yaml"
click node_raw_data "https://github.com/prat617/nq-futures-stats/tree/main/data/raw"
click node_processed_data "https://github.com/prat617/nq-futures-stats/tree/main/data/processed"
click node_reference_specs "https://github.com/prat617/nq-futures-stats/blob/main/data/reference/nq_contract_specs.json"
click node_research_outputs "https://github.com/prat617/nq-futures-stats/tree/main/data/processed"

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_fetcher,node_settings toneBlue
class node_raw_data,node_processed_data,node_reference_specs,node_research_outputs toneAmber
class node_researcher toneIndigo
```

## Components

### Data collection

- [Fetch script](https://github.com/prat617/nq-futures-stats/blob/main/scripts/fetch_nq_data.py): `scripts/fetch_nq_data.py`
- [Example settings](https://github.com/prat617/nq-futures-stats/blob/main/config/settings.example.yaml): `config/settings.example.yaml`

### Research data

- [Raw downloads](https://github.com/prat617/nq-futures-stats/tree/main/data/raw): `data/raw`
- [Processed datasets](https://github.com/prat617/nq-futures-stats/tree/main/data/processed): `data/processed`
- [Contract specs](https://github.com/prat617/nq-futures-stats/blob/main/data/reference/nq_contract_specs.json): `data/reference/nq_contract_specs.json`
- [Research datasets](https://github.com/prat617/nq-futures-stats/tree/main/data/processed): `data/processed`

### Other components

- **Researcher**

## Connections

- Researcher → Fetch script: runs
- Fetch script → Example settings: reads settings
- Fetch script → Raw downloads: writes nonempty results
