# akazizu1/data-analysis-on-sp500-stock-against-interest-rate architecture

> Architecture diagram of the GitHub repository akazizu1/data-analysis-on-sp500-stock-against-interest-rate, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/akazizu1/data-analysis-on-sp500-stock-against-interest-rate
- Repository: https://github.com/akazizu1/data-analysis-on-sp500-stock-against-interest-rate

## Overview

This small Python script compares 2022 S&P 500 movements with interest-rate changes. It downloads index data, samples monthly adjusted closes, loads and filters local rate data, aligns and joins the series, then calculates annual and conditional summary statistics for printing. The README describes the comparison; the source shows the implementation. The CSV path in the script is an absolute machine-specific path, so the repository’s DFF.csv is not assumed to be the file actually read.

Main entry points: [`sp500yfinance.py`](https://github.com/akazizu1/data-analysis-on-sp500-stock-against-interest-rate/blob/main/sp500yfinance.py) (Summary Metrics)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_yfinance["Yahoo Finance"]
node_rates_csv["Local Rate CSV"]
node_market_data["Market Download<br/>[sp500yfinance.py]"]
node_monthly_sampling["Monthly Sampling<br/>[sp500yfinance.py]"]
node_rate_preparation["Rate Preparation<br/>[sp500yfinance.py]"]
node_series_merge["Series Alignment<br/>[sp500yfinance.py]"]
node_change_analysis["Change Analysis<br/>[sp500yfinance.py]"]
node_summary_metrics["Summary Metrics<br/>[sp500yfinance.py]"]
node_printed_results["Printed Results<br/>[sp500yfinance.py]"]

node_market_data -->|"downloads data"| node_yfinance
node_market_data -->|"resamples closes"| node_monthly_sampling
node_rate_preparation -->|"reads rates"| node_rates_csv
node_monthly_sampling -->|"provides monthly series"| node_series_merge
node_rate_preparation -->|"provides filtered rates"| node_series_merge
node_series_merge -->|"computes changes"| node_change_analysis
node_change_analysis -->|"supplies comparisons"| node_summary_metrics
node_monthly_sampling -->|"supplies annual values"| node_summary_metrics
node_rate_preparation -->|"supplies yearly rates"| node_summary_metrics
node_summary_metrics -->|"prints statistics"| node_printed_results

click node_market_data "https://github.com/akazizu1/data-analysis-on-sp500-stock-against-interest-rate/blob/main/sp500yfinance.py"
click node_monthly_sampling "https://github.com/akazizu1/data-analysis-on-sp500-stock-against-interest-rate/blob/main/sp500yfinance.py"
click node_rate_preparation "https://github.com/akazizu1/data-analysis-on-sp500-stock-against-interest-rate/blob/main/sp500yfinance.py"
click node_series_merge "https://github.com/akazizu1/data-analysis-on-sp500-stock-against-interest-rate/blob/main/sp500yfinance.py"
click node_change_analysis "https://github.com/akazizu1/data-analysis-on-sp500-stock-against-interest-rate/blob/main/sp500yfinance.py"
click node_summary_metrics "https://github.com/akazizu1/data-analysis-on-sp500-stock-against-interest-rate/blob/main/sp500yfinance.py"
click node_printed_results "https://github.com/akazizu1/data-analysis-on-sp500-stock-against-interest-rate/blob/main/sp500yfinance.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_yfinance,node_rates_csv toneIndigo
class node_market_data,node_monthly_sampling,node_rate_preparation,node_series_merge,node_change_analysis,node_summary_metrics,node_printed_results toneTeal
```

## Components

### Other components

- **Yahoo Finance**
- **Local Rate CSV**
- [Market Download](https://github.com/akazizu1/data-analysis-on-sp500-stock-against-interest-rate/blob/main/sp500yfinance.py): `sp500yfinance.py`
- [Monthly Sampling](https://github.com/akazizu1/data-analysis-on-sp500-stock-against-interest-rate/blob/main/sp500yfinance.py): `sp500yfinance.py`
- [Rate Preparation](https://github.com/akazizu1/data-analysis-on-sp500-stock-against-interest-rate/blob/main/sp500yfinance.py): `sp500yfinance.py`
- [Series Alignment](https://github.com/akazizu1/data-analysis-on-sp500-stock-against-interest-rate/blob/main/sp500yfinance.py): `sp500yfinance.py`
- [Change Analysis](https://github.com/akazizu1/data-analysis-on-sp500-stock-against-interest-rate/blob/main/sp500yfinance.py): `sp500yfinance.py`
- [Summary Metrics](https://github.com/akazizu1/data-analysis-on-sp500-stock-against-interest-rate/blob/main/sp500yfinance.py): `sp500yfinance.py`
- [Printed Results](https://github.com/akazizu1/data-analysis-on-sp500-stock-against-interest-rate/blob/main/sp500yfinance.py): `sp500yfinance.py`

## Connections

- Market Download → Yahoo Finance: downloads data (evidence: `sp500yfinance.py`)
- Market Download → Monthly Sampling: resamples closes (evidence: `sp500yfinance.py`)
- Rate Preparation → Local Rate CSV: reads rates (evidence: `sp500yfinance.py`)
- Monthly Sampling → Series Alignment: provides monthly series (evidence: `sp500yfinance.py`)
- Rate Preparation → Series Alignment: provides filtered rates (evidence: `sp500yfinance.py`)
- Series Alignment → Change Analysis: computes changes (evidence: `sp500yfinance.py`)
- Change Analysis → Summary Metrics: supplies comparisons (evidence: `sp500yfinance.py`)
- Monthly Sampling → Summary Metrics: supplies annual values (evidence: `sp500yfinance.py`)
- Rate Preparation → Summary Metrics: supplies yearly rates (evidence: `sp500yfinance.py`)
- Summary Metrics → Printed Results: prints statistics (evidence: `sp500yfinance.py`)
