# yogeshsingh-11/automatic-trading-system architecture

> Architecture diagram of the GitHub repository yogeshsingh-11/automatic-trading-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yogeshsingh-11/automatic-trading-system
- Repository: https://github.com/yogeshsingh-11/automatic-trading-system

## Overview

##### Main Components
- Data Collection/Preparation Module – represented by the "Data-Preparation" directory containing Web-Scrapping.py. This component is responsible for gathering raw data from external sources.
- Data Handling & Operations Module – seen in the "Basic Data Handling and Operations" directory with Rolling-Operations.py. This part is likely in charge of processing, cleaning, or performing rolling calculations on the gathered data.
- Technical Indicators Module – located in the "Technical Indicators" directory (Basic.py). This component computes technical analysis indicators, which are common parts of trading algorithms for decision-making.
- Core Automatic Trading System – although not explicitly shown with order execution or real-time trading capabilities, the README indicates the overall purpose. You may want to represent a central orchestration layer or trading engine that integrates outputs from these components for automated trading decisions.

##### Relationships & Data Flow
- The Data Collection component (Web-Scrapping) feeds raw market data into the Data Handling module.
- The Data Handling module processes the data (e.g., calculates rolling statistics) and passes the refined data to the Technical Indicators component.
- The Technical Indicators module uses this processed data to compute trading signals or analysis metrics.
- Optionally, if the system includes a decision-making or execution engine not visible in the file tree, represent it as another component that consumes technical indicator outputs and interacts with external trading gateways.

##### Architectural Patterns
- Modular design: Each logical function (data collection, processing, analysis) is separated into individual modules.
- Pipeline Pattern: The design clearly indicates a linear processing pipeline where data is ingested, processed, and analyzed.
- Extensibility: As more features (like risk management, order execution, logging) get added, consider introducing additional modules or layers. For now, focus on the three components shown in the file tree.

##### Relevant Technologies & Frameworks
- Tools or libraries for web scraping (like Beautiful Soup, Scrapy) could be noted in the Data-Preparation module.
- For numerical operations, you might expect libraries such as NumPy or pandas to be used in the Data Handling module.
- The Technical Indicators might leverage specialized libraries (e.g., TA-Lib) for computations.
- If there is any external data provider or API integration, include these as external systems.

## Diagram (Mermaid)

```mermaid
flowchart TD
    DCP("Data-Preparation (Web Scrapping)"):::dataCollection
    BHO("Basic Data Handling and Operations (Rolling Operations)"):::dataHandling
    TI("Technical Indicators (Basic)"):::techIndicators
    TE("Trading Engine/Orchestration"):::engine
    ETG("External Trading Gateway"):::external

    DCP -->|"feeds_raw_data"| BHO
    BHO -->|"processes_data"| TI
    TI -->|"generates_signals"| TE
    TE -->|"executes_orders"| ETG

    click DCP "https://github.com/yogeshsingh-11/automatic-trading-system/blob/main/Data-Preparation/Web-Scrapping.py"
    click BHO "https://github.com/yogeshsingh-11/automatic-trading-system/blob/main/Basic Data Handling and Operations/Rolling-Operations.py"
    click TI "https://github.com/yogeshsingh-11/automatic-trading-system/blob/main/Technical Indicators/Basic.py"

    classDef dataCollection fill:#AED6F1,stroke:#3498DB,stroke-width:2px;
    classDef dataHandling fill:#A9DFBF,stroke:#27AE60,stroke-width:2px;
    classDef techIndicators fill:#F9E79F,stroke:#F1C40F,stroke-width:2px;
    classDef engine fill:#F5B7B1,stroke:#E74C3C,stroke-width:2px;
    classDef external fill:#D2B4DE,stroke:#8E44AD,stroke-width:2px;
```
