# nikhil-adithyan/algorithmic-trading-with-python architecture

> Architecture diagram of the GitHub repository nikhil-adithyan/algorithmic-trading-with-python, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nikhil-adithyan/algorithmic-trading-with-python
- Repository: https://github.com/nikhil-adithyan/algorithmic-trading-with-python

## Overview

The project is a Python library of quantitative algorithms for algorithmic trading. It’s organized as a collection of standalone strategy modules, each implementing a specific trading strategy based on one or more technical indicators. The strategies are grouped into five categories – Advanced Strategies, Momentum, Overlap, Trend, and Volatility – and each folder contains Python files that execute a specific strategy.

##### Main Components
- Inside this container, create five sub-components (or modules) for each of the categories:
- Advanced Strategies
- Momentum
- Overlap
- Trend
- Volatility
- Each of these category blocks should list or visually encapsulate the individual strategy modules they contain (e.g., in Advanced Strategies, include ADX_RSI.py, BollingerBands_KeltnerChannel_RSI.py, etc.).

##### Relationships and Interactions
- Although each strategy is essentially independent, illustrate that they all share a common goal: to provide algorithmic trading signals based on technical indicators.

##### Architectural Patterns and Design Principles
- Modular design where each trading strategy is self-contained; this separation of concerns makes adding new strategies straightforward.
- No explicit MVC, microservices, or multi-layered separation is used here – it’s a flat module organization where each file represents a concrete algorithm.

##### Relevant Technologies and Frameworks
- Although the file tree does not list external dependencies, it’s clear that the project is built in Python and likely makes use of commonly used Python libraries for data manipulation and possibly numerical analysis (like NumPy, Pandas, etc.). If these libraries are part of the project (or are expected to be used along with it), annotate them externally.
- If this library were ever integrated in a larger system, it might be wrapped into higher-level API calls by a trading engine – you could optionally note this as an “external integration point.”

##### Specific Elements
- From the main library container to each module.

## Diagram (Mermaid)

```mermaid
graph TD
    MD("Market Data Feed"):::external
    TE("Trading Engine/Executor"):::external
    LIB("Algorithmic Trading with Python Library"):::library

    MD -->|"InputMarketData"| TE
    TE -->|"InvokeStrategy"| LIB

    LIB -->|"APIExposure"| ASFolder
    LIB -->|"APIExposure"| MFolder
    LIB -->|"APIExposure"| OFolder
    LIB -->|"APIExposure"| TFolder
    LIB -->|"APIExposure"| VFolder

    subgraph "Advanced Strategies"
        ASFolder("Advanced Strategies"):::module
        AS1("ADX_RSI.py"):::file
        AS2("BollingerBands_KeltnerChannel_RSI.py"):::file
        AS3("BollingerBands_Stochastic.py"):::file
        AS4("Stochastics_MACD.py"):::file
        AS5("Williams%R_MACD.py"):::file

        ASFolder --> AS1
        ASFolder --> AS2
        ASFolder --> AS3
        ASFolder --> AS4
        ASFolder --> AS5

        AS1 -->|"combines"| AS2
        AS4 -->|"combines"| AS5
    end

    subgraph "Momentum"
        MFolder("Momentum"):::module
        M1("Awesome_Oscillator.py"):::file
        M2("Commodity_Channel_Index.py"):::file
        M3("Coppock_Curve.py"):::file
        M4("Disparity_Index.py"):::file
        M5("Know_Sure_Thing.py"):::file
        M6("MACD.py"):::file
        M7("RSI.py"):::file
        M8("Relative_Vigor_Index.py"):::file
        M9("Stochastic_Oscillator.py"):::file
        M10("True_Strength_Index.py"):::file
        M11("Williams_%R.py"):::file

        MFolder --> M1
        MFolder --> M2
        MFolder --> M3
        MFolder --> M4
        MFolder --> M5
        MFolder --> M6
        MFolder --> M7
        MFolder --> M8
        MFolder --> M9
        MFolder --> M10
        MFolder --> M11
    end

    subgraph "Overlap"
        OFolder("Overlap"):::module
        O1("Simple_Moving_Average.py"):::file
        O2("SuperTrend.py"):::file

        OFolder --> O1
        OFolder --> O2
    end

    subgraph "Trend"
        TFolder("Trend"):::module
        T1("ADX.py"):::file
        T2("Aroon.py"):::file
        T3("Choppiness_Index.py"):::file

        TFolder --> T1
        TFolder --> T2
        TFolder --> T3
    end

    subgraph "Volatility"
        VFolder("Volatility"):::module
        V1("Bollinger_Bands.py"):::file
        V2("Keltner_Channel.py"):::file

        VFolder --> V1
        VFolder --> V2
    end

    click LIB "https://github.com/nikhil-adithyan/algorithmic-trading-with-python/tree/main/Project Root"
    click ASFolder "https://github.com/nikhil-adithyan/algorithmic-trading-with-python/tree/main/Advanced Strategies/"
    click MFolder "https://github.com/nikhil-adithyan/algorithmic-trading-with-python/tree/main/Momentum/"
    click OFolder "https://github.com/nikhil-adithyan/algorithmic-trading-with-python/tree/main/Overlap/"
    click TFolder "https://github.com/nikhil-adithyan/algorithmic-trading-with-python/tree/main/Trend/"
    click VFolder "https://github.com/nikhil-adithyan/algorithmic-trading-with-python/tree/main/Volatility/"

classDef library fill:#ADD8E6,stroke:#000,stroke-width:2px;
classDef module fill:#90EE90,stroke:#000,stroke-width:2px;
classDef file fill:#FFFFE0,stroke:#000,stroke-width:1px;
classDef external fill:#FFC0CB,stroke:#000,stroke-width:2px;
```
