Build and Deploy Documentation / build (push) Failing after 1m24s
- Set up Docusaurus with pnpm and TypeScript - Structured docs for multi-application portfolio - Added Stock Market Professional documentation: - Architecture & system design - Data monitoring module - Technical analysis engine - Signal generation with constraints (max 3/day, 30min hold) - Added platform architecture overview - Added getting started guide - Added Gitea Actions CI/CD pipeline (build + artifact)
96 lines
2.5 KiB
Markdown
96 lines
2.5 KiB
Markdown
---
|
|
sidebar_position: 1
|
|
---
|
|
|
|
# Architecture & Design
|
|
|
|
## System Design
|
|
|
|
Stock Market Professional follows a **pipeline architecture** with three distinct stages:
|
|
|
|
### 1. Data Layer (Ingestion)
|
|
|
|
Responsible for acquiring and normalizing market data from multiple sources.
|
|
|
|
**Requirements:**
|
|
- Real-time or near-real-time price data (1-minute candles minimum)
|
|
- Support for multiple forex pairs and stock tickers
|
|
- Historical data for backtesting (minimum 30 days)
|
|
- Volume and order book data where available
|
|
|
|
**Potential Data Sources:**
|
|
- Yahoo Finance API (free tier)
|
|
- Alpha Vantage API
|
|
- Twelve Data API
|
|
- Interactive Brokers TWS API
|
|
- Polygon.io
|
|
|
|
### 2. Analysis Layer (Processing)
|
|
|
|
Applies technical indicators, statistical models, and pattern recognition.
|
|
|
|
**Technical Indicators:**
|
|
- Moving Averages (SMA, EMA, WMA)
|
|
- RSI (Relative Strength Index)
|
|
- MACD (Moving Average Convergence Divergence)
|
|
- Bollinger Bands
|
|
- Fibonacci Retracements
|
|
- Volume-Weighted Average Price (VWAP)
|
|
- Stochastic Oscillator
|
|
|
|
**Pattern Recognition:**
|
|
- Candlestick patterns (Doji, Hammer, Engulfing, etc.)
|
|
- Chart patterns (Head & Shoulders, Double Top/Bottom, Triangles)
|
|
- Support/Resistance levels
|
|
- Breakout detection
|
|
|
|
**Statistical Analysis:**
|
|
- Volatility clustering (GARCH models)
|
|
- Mean reversion detection
|
|
- Momentum scoring
|
|
- Correlation analysis between pairs
|
|
|
|
### 3. Signal Layer (Output)
|
|
|
|
Generates actionable trading signals with strict constraints.
|
|
|
|
**Signal Format:**
|
|
```json
|
|
{
|
|
"date": "2026-07-16",
|
|
"signals": [
|
|
{
|
|
"pair": "EUR/USD",
|
|
"direction": "BUY",
|
|
"entry_price": 1.0892,
|
|
"stop_loss": 1.0875,
|
|
"take_profit": 1.0920,
|
|
"confidence": 0.82,
|
|
"reasoning": "Bullish engulfing + RSI oversold bounce + VWAP support",
|
|
"time_window": "09:00-09:30 UTC",
|
|
"max_hold_minutes": 30
|
|
}
|
|
],
|
|
"max_signals_per_day": 3
|
|
}
|
|
```
|
|
|
|
## Technology Choices
|
|
|
|
| Component | Technology | Reason |
|
|
|---|---|---|
|
|
| Language | Python 3.11+ | Rich ecosystem for finance/ML |
|
|
| Data | pandas, numpy | Industry standard for time series |
|
|
| Indicators | ta-lib, pandas-ta | Comprehensive TA libraries |
|
|
| ML/Stats | scikit-learn, statsmodels | Pattern recognition, GARCH |
|
|
| Scheduling | APScheduler / cron | Regular data pulls and analysis |
|
|
| Delivery | Discord webhook / API | Direct consumer notification |
|
|
| Storage | SQLite / TimescaleDB | Time-series optimized |
|
|
|
|
## Deployment
|
|
|
|
- Containerized (Docker)
|
|
- Runs on TrueNAS infrastructure
|
|
- CI/CD via Gitea Actions
|
|
- Health monitoring and alerting
|