# krishgarg344/crypto-price-prediction architecture

> Architecture diagram of the GitHub repository krishgarg344/crypto-price-prediction, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/krishgarg344/crypto-price-prediction
- Repository: https://github.com/krishgarg344/crypto-price-prediction

## Overview

This repository is a notebook-based BTC-USD forecasting project. Its documented workflow turns historical market data into engineered features and 120-day sequences, learns 64-dimensional temporal embeddings with a stacked LSTM, and uses XGBoost to produce predictions and 7-day forecasts. The README also documents randomized hyperparameter search, 60 cross-validated training runs, and reported evaluation metrics. The notebook is the only source file listed, but no notebook excerpts were provided, so the graph reflects README-documented relationships rather than inspected implementation details.

Main entry points: [`Crypto_Price_Prediction_(LSTM+XGBoost).ipynb`](https://github.com/krishgarg344/crypto-price-prediction/blob/main/Crypto_Price_Prediction_(LSTM%2BXGBoost).ipynb) (XGBoost regressor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_preparation["Data preparation"]
  node_market_data["BTC-USD history"]
  node_feature_engineering["Market features"]
  node_sequence_windows["120-day windows"]
end

subgraph group_modeling["Hybrid modeling"]
  node_lstm["LSTM encoder"]
  node_embeddings["Latent embeddings"]
  node_xgboost["XGBoost regressor"]
  node_hyperparameter_search["Randomized search"]
end

subgraph group_results["Forecasting and evaluation"]
  node_evaluation["Model evaluation"]
  node_forecast["7-day forecast"]
end

node_market_data -->|"derive features"| node_feature_engineering
node_feature_engineering -->|"form windows"| node_sequence_windows
node_sequence_windows -->|"learn patterns"| node_lstm
node_lstm -->|"extract embeddings"| node_embeddings
node_embeddings -->|"predict prices"| node_xgboost
node_hyperparameter_search -->|"tune regressor"| node_xgboost
node_xgboost -->|"assess predictions"| node_evaluation
node_xgboost -->|"forecast prices"| node_forecast

click node_market_data "https://github.com/krishgarg344/crypto-price-prediction/blob/main/Crypto_Price_Prediction_(LSTM%2BXGBoost).ipynb"
click node_feature_engineering "https://github.com/krishgarg344/crypto-price-prediction/blob/main/Crypto_Price_Prediction_(LSTM%2BXGBoost).ipynb"
click node_sequence_windows "https://github.com/krishgarg344/crypto-price-prediction/blob/main/Crypto_Price_Prediction_(LSTM%2BXGBoost).ipynb"
click node_lstm "https://github.com/krishgarg344/crypto-price-prediction/blob/main/Crypto_Price_Prediction_(LSTM%2BXGBoost).ipynb"
click node_embeddings "https://github.com/krishgarg344/crypto-price-prediction/blob/main/Crypto_Price_Prediction_(LSTM%2BXGBoost).ipynb"
click node_xgboost "https://github.com/krishgarg344/crypto-price-prediction/blob/main/Crypto_Price_Prediction_(LSTM%2BXGBoost).ipynb"
click node_hyperparameter_search "https://github.com/krishgarg344/crypto-price-prediction/blob/main/Crypto_Price_Prediction_(LSTM%2BXGBoost).ipynb"
click node_evaluation "https://github.com/krishgarg344/crypto-price-prediction/blob/main/Crypto_Price_Prediction_(LSTM%2BXGBoost).ipynb"
click node_forecast "https://github.com/krishgarg344/crypto-price-prediction/blob/main/Crypto_Price_Prediction_(LSTM%2BXGBoost).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_market_data,node_feature_engineering,node_sequence_windows toneBlue
class node_lstm,node_embeddings,node_xgboost,node_hyperparameter_search toneAmber
class node_evaluation,node_forecast toneMint
```

## Components

### Data preparation

- [BTC-USD history](https://github.com/krishgarg344/crypto-price-prediction/blob/main/Crypto_Price_Prediction_(LSTM%2BXGBoost).ipynb): `Crypto_Price_Prediction_(LSTM+XGBoost).ipynb`
- [Market features](https://github.com/krishgarg344/crypto-price-prediction/blob/main/Crypto_Price_Prediction_(LSTM%2BXGBoost).ipynb): `Crypto_Price_Prediction_(LSTM+XGBoost).ipynb`
- [120-day windows](https://github.com/krishgarg344/crypto-price-prediction/blob/main/Crypto_Price_Prediction_(LSTM%2BXGBoost).ipynb): `Crypto_Price_Prediction_(LSTM+XGBoost).ipynb`

### Hybrid modeling

- [LSTM encoder](https://github.com/krishgarg344/crypto-price-prediction/blob/main/Crypto_Price_Prediction_(LSTM%2BXGBoost).ipynb): `Crypto_Price_Prediction_(LSTM+XGBoost).ipynb`
- [Latent embeddings](https://github.com/krishgarg344/crypto-price-prediction/blob/main/Crypto_Price_Prediction_(LSTM%2BXGBoost).ipynb): `Crypto_Price_Prediction_(LSTM+XGBoost).ipynb`
- [XGBoost regressor](https://github.com/krishgarg344/crypto-price-prediction/blob/main/Crypto_Price_Prediction_(LSTM%2BXGBoost).ipynb): `Crypto_Price_Prediction_(LSTM+XGBoost).ipynb`
- [Randomized search](https://github.com/krishgarg344/crypto-price-prediction/blob/main/Crypto_Price_Prediction_(LSTM%2BXGBoost).ipynb): `Crypto_Price_Prediction_(LSTM+XGBoost).ipynb`

### Forecasting and evaluation

- [Model evaluation](https://github.com/krishgarg344/crypto-price-prediction/blob/main/Crypto_Price_Prediction_(LSTM%2BXGBoost).ipynb): `Crypto_Price_Prediction_(LSTM+XGBoost).ipynb`
- [7-day forecast](https://github.com/krishgarg344/crypto-price-prediction/blob/main/Crypto_Price_Prediction_(LSTM%2BXGBoost).ipynb): `Crypto_Price_Prediction_(LSTM+XGBoost).ipynb`

## Connections

- BTC-USD history → Market features: derive features (evidence: `README.md`)
- Market features → 120-day windows: form windows (evidence: `README.md`)
- 120-day windows → LSTM encoder: learn patterns (evidence: `README.md`)
- LSTM encoder → Latent embeddings: extract embeddings (evidence: `README.md`)
- Latent embeddings → XGBoost regressor: predict prices (evidence: `README.md`)
- Randomized search → XGBoost regressor: tune regressor (evidence: `README.md`)
- XGBoost regressor → Model evaluation: assess predictions (evidence: `README.md`)
- XGBoost regressor → 7-day forecast: forecast prices (evidence: `README.md`)
