# rachnog/deep-trading architecture

> Architecture diagram of the GitHub repository rachnog/deep-trading, 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/rachnog/deep-trading
- Repository: https://github.com/rachnog/deep-trading

## Overview

Deep-Trading is a collection of algorithmic-trading and forecasting experiments, not a single end-to-end trading service. Its clearest workflow loads historical prices, prepares forecasting windows, trains a model, and evaluates predictions. Other branches explore text-plus-price models, volatility, hyperparameter search, backtesting, and strategy ideas. The source excerpts support only a few direct relationships; the graph keeps the experimental areas distinct rather than implying they form one pipeline. Several capabilities are visible only in the tree or README, so their internal connections are not asserted.

Main entry points: [`simple_forecasting/training.py`](https://github.com/rachnog/deep-trading/blob/master/simple_forecasting/training.py) (Forecast Training), [`multimodal/process_data.py`](https://github.com/rachnog/deep-trading/blob/master/multimodal/process_data.py) (Market and News Prep), [`multimodal/train_nets.py`](https://github.com/rachnog/deep-trading/blob/master/multimodal/train_nets.py) (Multimodal Training), [`time_series_plus_text/train_nets.py`](https://github.com/rachnog/deep-trading/blob/master/time_series_plus_text/train_nets.py) (Text Hybrid Training)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_forecast["Price Forecasting"]
  node_simple_data[("Price Data<br/>[table.csv]")]
  node_simple_processing["Window Preparation<br/>[processing.py]"]
  node_simple_training["Forecast Training<br/>[training.py]"]
end

subgraph group_research["Model Experiments"]
  node_multimodal_data["Market and News Prep<br/>[process_data.py]"]
  node_multimodal_training["Multimodal Training<br/>[train_nets.py]"]
  node_text_training["Text Hybrid Training<br/>[train_nets.py]"]
  node_multivariate["Multivariate Model<br/>[multivariate.py]"]
  node_hyperopt["Hyperparameter Search<br/>[hyper.py]"]
  node_bayesian["Bayesian Experiments"]
end

subgraph group_features["Features and Strategy"]
  node_volatility_features["Volatility Features"]
  node_volatility_model["Volatility Forecasting<br/>[volatility.py]"]
  node_ts_features["Time-Series Features"]
  node_strategy["Skew Strategy<br/>[skew.py]"]
end

subgraph group_evaluation["Evaluation"]
  node_backtest["Backtesting<br/>[backtest.py]"]
end

node_user(("Researcher"))

node_user -->|"runs experiment"| node_simple_training
node_simple_training -->|"loads prices"| node_simple_data
node_simple_training -->|"prepares windows"| node_simple_processing
node_multimodal_training -->|"loads and prepares"| node_multimodal_data
node_text_training -->|"imports preparation"| node_multimodal_data
node_volatility_model -->|"imports extractor"| node_volatility_features

click node_simple_data "https://github.com/rachnog/deep-trading/blob/master/simple_forecasting/table.csv"
click node_simple_processing "https://github.com/rachnog/deep-trading/blob/master/simple_forecasting/processing.py"
click node_simple_training "https://github.com/rachnog/deep-trading/blob/master/simple_forecasting/training.py"
click node_multimodal_data "https://github.com/rachnog/deep-trading/blob/master/multimodal/process_data.py"
click node_multimodal_training "https://github.com/rachnog/deep-trading/blob/master/multimodal/train_nets.py"
click node_text_training "https://github.com/rachnog/deep-trading/blob/master/time_series_plus_text/train_nets.py"
click node_multivariate "https://github.com/rachnog/deep-trading/blob/master/multivariate/multivariate.py"
click node_hyperopt "https://github.com/rachnog/deep-trading/blob/master/hyperparameters/hyper.py"
click node_bayesian "https://github.com/rachnog/deep-trading/tree/master/bayesian"
click node_volatility_features "https://github.com/rachnog/deep-trading/blob/master/volatility/feature_extractor.py"
click node_volatility_model "https://github.com/rachnog/deep-trading/blob/master/volatility/volatility.py"
click node_ts_features "https://github.com/rachnog/deep-trading/blob/master/top-ten-mistakes/feature_calculators.py"
click node_strategy "https://github.com/rachnog/deep-trading/blob/master/strategy/skew.py"
click node_backtest "https://github.com/rachnog/deep-trading/blob/master/backtesting/backtest.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_simple_data,node_simple_processing,node_simple_training toneBlue
class node_multimodal_data,node_multimodal_training,node_text_training,node_multivariate,node_hyperopt,node_bayesian toneAmber
class node_volatility_features,node_volatility_model,node_ts_features,node_strategy toneMint
class node_backtest toneRose
class node_user toneIndigo
```

## Components

### Price Forecasting

- [Price Data](https://github.com/rachnog/deep-trading/blob/master/simple_forecasting/table.csv): `simple_forecasting/table.csv`
- [Window Preparation](https://github.com/rachnog/deep-trading/blob/master/simple_forecasting/processing.py): `simple_forecasting/processing.py`
- [Forecast Training](https://github.com/rachnog/deep-trading/blob/master/simple_forecasting/training.py): `simple_forecasting/training.py`

### Model Experiments

- [Market and News Prep](https://github.com/rachnog/deep-trading/blob/master/multimodal/process_data.py): `multimodal/process_data.py`
- [Multimodal Training](https://github.com/rachnog/deep-trading/blob/master/multimodal/train_nets.py): `multimodal/train_nets.py`
- [Text Hybrid Training](https://github.com/rachnog/deep-trading/blob/master/time_series_plus_text/train_nets.py): `time_series_plus_text/train_nets.py`
- [Multivariate Model](https://github.com/rachnog/deep-trading/blob/master/multivariate/multivariate.py): `multivariate/multivariate.py`
- [Hyperparameter Search](https://github.com/rachnog/deep-trading/blob/master/hyperparameters/hyper.py): `hyperparameters/hyper.py`
- [Bayesian Experiments](https://github.com/rachnog/deep-trading/tree/master/bayesian): `bayesian`

### Features and Strategy

- [Volatility Features](https://github.com/rachnog/deep-trading/blob/master/volatility/feature_extractor.py): `volatility/feature_extractor.py`
- [Volatility Forecasting](https://github.com/rachnog/deep-trading/blob/master/volatility/volatility.py): `volatility/volatility.py`
- [Time-Series Features](https://github.com/rachnog/deep-trading/blob/master/top-ten-mistakes/feature_calculators.py): `top-ten-mistakes/feature_calculators.py`
- [Skew Strategy](https://github.com/rachnog/deep-trading/blob/master/strategy/skew.py): `strategy/skew.py`

### Evaluation

- [Backtesting](https://github.com/rachnog/deep-trading/blob/master/backtesting/backtest.py): `backtesting/backtest.py`

### Other components

- **Researcher**

## Connections

- Researcher → Forecast Training: runs experiment (evidence: `README.md`)
- Forecast Training → Price Data: loads prices
- Forecast Training → Window Preparation: prepares windows (evidence: `simple_forecasting/training.py`)
- Multimodal Training → Market and News Prep: loads and prepares (evidence: `multimodal/train_nets.py`)
- Text Hybrid Training → Market and News Prep: imports preparation (evidence: `time_series_plus_text/train_nets.py`)
- Volatility Forecasting → Volatility Features: imports extractor (evidence: `volatility/volatility.py`)
