# johri-lab/algorithmic-ml-trading-strategy architecture

> Architecture diagram of the GitHub repository johri-lab/algorithmic-ml-trading-strategy, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/johri-lab/algorithmic-ml-trading-strategy
- Repository: https://github.com/johri-lab/algorithmic-ml-trading-strategy

## Overview

This repository is a notebook-based machine-learning trading analysis for IWM. The documented workflow brings together market and macroeconomic data, explores it, trains classifiers to predict an intraday price-threshold event, then backtests the strategy and compares it with random trading. The README also describes market-microstructure analysis and ROI, Sharpe-ratio, and significance evaluation. The tree identifies the notebooks and CSV, but no source excerpts were provided, so relationships below rely on README statements; notebook-level implementation details remain unverified.

Main entry points: [`EDA.ipynb`](https://github.com/johri-lab/algorithmic-ml-trading-strategy/blob/main/EDA.ipynb) (Exploratory analysis), [`aa5252_sj3327_mc5491_finance_final_project.ipynb`](https://github.com/johri-lab/algorithmic-ml-trading-strategy/blob/main/aa5252_sj3327_mc5491_finance_final_project.ipynb) (Backtesting), [`IWM_2001-2024.csv`](https://github.com/johri-lab/algorithmic-ml-trading-strategy/blob/main/IWM_2001-2024.csv) (IWM history), [`multiple_classifiers.ipynb`](https://github.com/johri-lab/algorithmic-ml-trading-strategy/blob/main/multiple_classifiers.ipynb) (ML classifiers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data and analysis"]
  node_microstructure["Market microstructure<br/>[EDA.ipynb]"]
  node_eda["Exploratory analysis<br/>[EDA.ipynb]"]
  node_marketdata[("IWM history<br/>[IWM_2001-2024.csv]")]
  node_macrodata[("Macro indicators")]
end

subgraph group_models["Model development"]
  node_classifiers["ML classifiers"]
  node_strategy["Trading strategy"]
end

subgraph group_evaluation["Strategy evaluation"]
  node_backtest["Backtesting"]
  node_montecarlo["Random-trade simulation"]
  node_metrics["Performance metrics"]
end

node_analyst(("Researcher"))
node_yahoo["Yahoo Finance"]
node_fred["FRED API"]

node_analyst -->|"analyzes markets"| node_microstructure
node_analyst -->|"explores data"| node_eda
node_yahoo -->|"provides prices"| node_marketdata
node_fred -->|"provides indicators"| node_macrodata
node_marketdata -->|"analyzed in"| node_eda
node_macrodata -->|"enriches analysis"| node_eda
node_eda -->|"informs development"| node_classifiers
node_classifiers -->|"predicts threshold"| node_strategy
node_strategy -->|"evaluated by"| node_backtest
node_backtest -->|"compared with"| node_montecarlo
node_backtest -->|"assessed by"| node_metrics
node_montecarlo -->|"compared using"| node_metrics

click node_microstructure "https://github.com/johri-lab/algorithmic-ml-trading-strategy/blob/main/EDA.ipynb"
click node_eda "https://github.com/johri-lab/algorithmic-ml-trading-strategy/blob/main/EDA.ipynb"
click node_marketdata "https://github.com/johri-lab/algorithmic-ml-trading-strategy/blob/main/IWM_2001-2024.csv"
click node_macrodata "https://github.com/johri-lab/algorithmic-ml-trading-strategy/blob/main/aa5252_sj3327_mc5491_finance_final_project.ipynb"
click node_classifiers "https://github.com/johri-lab/algorithmic-ml-trading-strategy/blob/main/multiple_classifiers.ipynb"
click node_strategy "https://github.com/johri-lab/algorithmic-ml-trading-strategy/blob/main/aa5252_sj3327_mc5491_finance_final_project.ipynb"
click node_backtest "https://github.com/johri-lab/algorithmic-ml-trading-strategy/blob/main/aa5252_sj3327_mc5491_finance_final_project.ipynb"
click node_montecarlo "https://github.com/johri-lab/algorithmic-ml-trading-strategy/blob/main/aa5252_sj3327_mc5491_finance_final_project.ipynb"
click node_metrics "https://github.com/johri-lab/algorithmic-ml-trading-strategy/blob/main/aa5252_sj3327_mc5491_finance_final_project.ipynb"

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_microstructure,node_eda,node_marketdata,node_macrodata toneBlue
class node_classifiers,node_strategy toneAmber
class node_backtest,node_montecarlo,node_metrics,node_fred toneMint
class node_analyst,node_yahoo toneIndigo
```

## Components

### Data and analysis

- [Market microstructure](https://github.com/johri-lab/algorithmic-ml-trading-strategy/blob/main/EDA.ipynb): `EDA.ipynb`
- [Exploratory analysis](https://github.com/johri-lab/algorithmic-ml-trading-strategy/blob/main/EDA.ipynb): `EDA.ipynb`
- [IWM history](https://github.com/johri-lab/algorithmic-ml-trading-strategy/blob/main/IWM_2001-2024.csv): `IWM_2001-2024.csv`
- [Macro indicators](https://github.com/johri-lab/algorithmic-ml-trading-strategy/blob/main/aa5252_sj3327_mc5491_finance_final_project.ipynb): `aa5252_sj3327_mc5491_finance_final_project.ipynb`

### Model development

- [ML classifiers](https://github.com/johri-lab/algorithmic-ml-trading-strategy/blob/main/multiple_classifiers.ipynb): `multiple_classifiers.ipynb`
- [Trading strategy](https://github.com/johri-lab/algorithmic-ml-trading-strategy/blob/main/aa5252_sj3327_mc5491_finance_final_project.ipynb): `aa5252_sj3327_mc5491_finance_final_project.ipynb`

### Strategy evaluation

- [Backtesting](https://github.com/johri-lab/algorithmic-ml-trading-strategy/blob/main/aa5252_sj3327_mc5491_finance_final_project.ipynb): `aa5252_sj3327_mc5491_finance_final_project.ipynb`
- [Random-trade simulation](https://github.com/johri-lab/algorithmic-ml-trading-strategy/blob/main/aa5252_sj3327_mc5491_finance_final_project.ipynb): `aa5252_sj3327_mc5491_finance_final_project.ipynb`
- [Performance metrics](https://github.com/johri-lab/algorithmic-ml-trading-strategy/blob/main/aa5252_sj3327_mc5491_finance_final_project.ipynb): `aa5252_sj3327_mc5491_finance_final_project.ipynb`

### Other components

- **Researcher**
- **Yahoo Finance**
- **FRED API**

## Connections

- Researcher → Market microstructure: analyzes markets (evidence: `README.md`)
- Researcher → Exploratory analysis: explores data (evidence: `README.md`)
- Yahoo Finance → IWM history: provides prices (evidence: `README.md`)
- FRED API → Macro indicators: provides indicators (evidence: `README.md`)
- IWM history → Exploratory analysis: analyzed in (evidence: `README.md`)
- Macro indicators → Exploratory analysis: enriches analysis (evidence: `README.md`)
- Exploratory analysis → ML classifiers: informs development (evidence: `README.md`)
- ML classifiers → Trading strategy: predicts threshold (evidence: `README.md`)
- Trading strategy → Backtesting: evaluated by (evidence: `README.md`)
- Backtesting → Random-trade simulation: compared with (evidence: `README.md`)
- Backtesting → Performance metrics: assessed by (evidence: `README.md`)
- Random-trade simulation → Performance metrics: compared using (evidence: `README.md`)
