feat: Initial Docusaurus setup with Stock Market Professional docs
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)
This commit is contained in:
2026-07-16 19:47:40 +00:00
parent 8918b7b3dc
commit f39c2a1e5f
31 changed files with 14257 additions and 2 deletions
@@ -0,0 +1,72 @@
---
sidebar_position: 2
---
# Data Monitoring
## Overview
The data monitoring module is responsible for acquiring, normalizing, and storing market data that feeds into the analysis engine.
## Requirements
- **Latency**: Near real-time (< 1 minute delay)
- **Coverage**: Forex major pairs + selected stocks/indices
- **Granularity**: 1-minute candles, tick data where available
- **History**: Minimum 30 days rolling window for backtesting
- **Reliability**: Automatic reconnection, data gap detection
## Watched Instruments
### Forex Pairs (Initial)
| Pair | Session | Notes |
|---|---|---|
| EUR/USD | London + NY | Most liquid, tight spreads |
| GBP/USD | London + NY | High volatility windows |
| USD/JPY | Tokyo + London | Trend-following opportunities |
| AUD/USD | Sydney + London | Commodity correlation |
### Indices (Future)
| Index | Session | Notes |
|---|---|---|
| S&P 500 (SPX) | NY | Broad market sentiment |
| NASDAQ 100 (NDX) | NY | Tech sector proxy |
## Data Pipeline
```
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ API Source │────▶│ Normalizer │────▶│ Storage │
│ │ │ │ │ │
│ • REST poll │ │ • OHLCV fmt │ │ • SQLite/TS │
│ • WebSocket │ │ • Timestamps │ │ • Partitioned│
│ • Fallback │ │ • Validation │ │ • Indexed │
└──────────────┘ └──────────────┘ └──────────────┘
```
## Data Schema
```sql
CREATE TABLE candles (
id INTEGER PRIMARY KEY,
symbol TEXT NOT NULL,
timeframe TEXT NOT NULL, -- '1m', '5m', '15m', '1h'
timestamp DATETIME NOT NULL,
open REAL NOT NULL,
high REAL NOT NULL,
low REAL NOT NULL,
close REAL NOT NULL,
volume REAL,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
UNIQUE(symbol, timeframe, timestamp)
);
CREATE INDEX idx_candles_symbol_time ON candles(symbol, timeframe, timestamp DESC);
```
## Health Checks
- Data freshness monitoring (alert if > 5 min stale)
- Gap detection and backfill
- Source failover (primary → secondary API)
- Rate limit tracking per API key
@@ -0,0 +1,50 @@
---
sidebar_position: 1
---
# Stock Market Professional
> Autonomous stock/forex monitoring, technical analysis, and signal generation system.
## Purpose
Stock Market Professional is designed to:
1. **Monitor** real-time market data (stocks, forex pairs)
2. **Analyze** price action using technical and statistical methods to spot patterns
3. **Signal** consumers with daily trading plans
## Trading Strategy Constraints
| Parameter | Value |
|---|---|
| Max daily purchases | **3** |
| Max hold time | **30 minutes** |
| Execution | **Manual** (signals only — no auto-trading) |
| Market focus | Forex / Short-term stock positions |
## Architecture Overview
```
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ Data Ingestion │────▶│ Analysis Engine │────▶│ Signal Generator│
│ │ │ │ │ │
│ • Market feeds │ │ • Technical ind. │ │ • Daily plans │
│ • Price streams │ │ • Pattern recog. │ │ • Entry/Exit │
│ • Volume data │ │ • Statistical │ │ • Risk mgmt │
└─────────────────┘ └──────────────────┘ └─────────────────┘
│
▼
┌─────────────┐
│ Consumers │
│ (Discord/ │
│ Webhook) │
└─────────────┘
```
## Modules
- [Architecture & Design](./overview/architecture)
- [Data Monitoring](./data-monitoring/)
- [Technical Analysis](./technical-analysis/)
- [Signal Generation](./signal-generation/)
@@ -0,0 +1,95 @@
---
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
@@ -0,0 +1,130 @@
---
sidebar_position: 4
---
# Signal Generation
## Overview
The signal generation module produces actionable trading plans delivered to consumers daily. Signals are constrained by strict risk management rules.
## Constraints
| Rule | Value | Rationale |
|---|---|---|
| Max signals per day | **3** | Quality over quantity |
| Max hold time | **30 minutes** | Scalping/day-trade focus |
| Execution | **Manual** | Human confirms and executes |
| Min confluence score | **0.65** | High-probability setups only |
## Signal Structure
Each signal contains:
```typescript
interface TradingSignal {
// Identification
id: string;
timestamp: string;
pair: string;
// Direction
direction: 'BUY' | 'SELL';
// Levels
entry_price: number;
stop_loss: number;
take_profit: number;
// Meta
confidence: number; // 0.0 - 1.0
reasoning: string[]; // List of confirming factors
time_window: string; // Optimal entry window
max_hold_minutes: number; // Always ≤ 30
// Risk
risk_reward_ratio: number; // Minimum 1:1.5
position_size_pct: number; // % of capital suggested
}
```
## Daily Plan Format
Delivered each trading day before market open:
```markdown
## 📊 Daily Trading Plan — 2026-07-16
### Market Bias
- EUR/USD: Bullish (1H EMA trend up)
- GBP/USD: Neutral (ranging)
### Signals (Max 3)
#### Signal 1: EUR/USD BUY
- **Entry**: 1.0892 (on pullback to VWAP)
- **Stop Loss**: 1.0875 (-17 pips)
- **Take Profit**: 1.0920 (+28 pips)
- **R:R**: 1:1.65
- **Window**: 09:00-09:30 UTC
- **Confidence**: 82%
- **Reasoning**:
- Bullish engulfing on 5m
- RSI bouncing from 35
- VWAP support holding
- London session momentum
#### Signal 2: ...
### Key Levels to Watch
- EUR/USD: Support 1.0870, Resistance 1.0935
- GBP/USD: Support 1.2640, Resistance 1.2710
### Risk Notes
- ⚠️ NFP data release at 13:30 UTC — avoid new positions 30min before
- Volume expected to increase London/NY overlap (13:00-16:00 UTC)
```
## Delivery Channels
| Channel | Method | Timing |
|---|---|---|
| Discord | Webhook/Bot message | Pre-market (06:00 UTC) |
| API | REST endpoint | On-demand |
| Email | SMTP notification | Optional digest |
## Signal Validation Rules
Before a signal is emitted, it must pass:
1. **Confluence check** — Score ≥ 0.65
2. **Risk/Reward check** — R:R ≥ 1:1.5
3. **Time filter** — Within active session hours
4. **Correlation filter** — No conflicting signals on correlated pairs
5. **News filter** — No high-impact events within hold window
6. **Daily limit** — Max 3 signals not exceeded
7. **Spread check** — Current spread within acceptable range
## Performance Tracking
Track all signals for continuous improvement:
```sql
CREATE TABLE signal_performance (
signal_id TEXT PRIMARY KEY,
pair TEXT,
direction TEXT,
entry_price REAL,
exit_price REAL,
pnl_pips REAL,
hold_time_minutes INTEGER,
outcome TEXT, -- 'TP_HIT', 'SL_HIT', 'TIME_EXIT', 'MANUAL_EXIT'
created_at DATETIME
);
```
**Target Metrics:**
- Win rate: > 55%
- Average R:R achieved: > 1.3
- Max consecutive losses: < 5
- Monthly Sharpe: > 1.5
@@ -0,0 +1,112 @@
---
sidebar_position: 3
---
# Technical Analysis
## Overview
The technical analysis module processes raw market data through multiple analytical lenses to identify high-probability trading setups within the 30-minute hold constraint.
## Analysis Categories
### 1. Trend Indicators
| Indicator | Parameters | Signal |
|---|---|---|
| EMA Cross | 9/21 periods | Bullish/Bearish cross |
| MACD | 12/26/9 | Histogram divergence |
| ADX | 14 periods | Trend strength > 25 |
| Parabolic SAR | 0.02/0.2 | Trend reversal dots |
### 2. Momentum Indicators
| Indicator | Parameters | Signal |
|---|---|---|
| RSI | 14 periods | Oversold < 30, Overbought > 70 |
| Stochastic | 14/3/3 | %K/%D crossover |
| CCI | 20 periods | Extreme readings ±200 |
| Williams %R | 14 periods | Reversal zones |
### 3. Volatility Indicators
| Indicator | Parameters | Signal |
|---|---|---|
| Bollinger Bands | 20/2σ | Band squeeze/expansion |
| ATR | 14 periods | Position sizing, stop distance |
| Keltner Channels | 20/1.5 | Breakout confirmation |
### 4. Volume Analysis
| Indicator | Parameters | Signal |
|---|---|---|
| VWAP | Session | Price vs fair value |
| OBV | Cumulative | Divergence from price |
| Volume Profile | Session | Key levels, POC |
## Pattern Recognition
### Candlestick Patterns (1-5 bar)
- **Reversal**: Hammer, Shooting Star, Engulfing, Morning/Evening Star
- **Continuation**: Three White Soldiers, Rising/Falling Three Methods
- **Indecision**: Doji, Spinning Top, Harami
### Chart Patterns (Multi-bar)
- Double Top/Bottom
- Head & Shoulders
- Ascending/Descending Triangles
- Bull/Bear Flags
- Wedges
## Confluence Scoring
Signals are scored based on **confluence** — multiple indicators agreeing:
```python
def calculate_confluence_score(signals: list[IndicatorSignal]) -> float:
"""
Score 0.0 - 1.0 based on how many indicators agree.
Weights:
- Trend alignment: 0.30
- Momentum confirmation: 0.25
- Volume confirmation: 0.20
- Pattern match: 0.15
- Key level proximity: 0.10
"""
weights = {
'trend': 0.30,
'momentum': 0.25,
'volume': 0.20,
'pattern': 0.15,
'level': 0.10
}
score = sum(
weights[s.category] * s.strength
for s in signals
if s.direction == consensus_direction(signals)
)
return min(score, 1.0)
```
**Minimum confluence threshold for signal generation: 0.65**
## Timeframe Analysis
Given the 30-minute max hold constraint:
| Timeframe | Purpose |
|---|---|
| 1-minute | Entry timing, micro-structure |
| 5-minute | Primary signal generation |
| 15-minute | Trend context, S/R levels |
| 1-hour | Bias direction (trend filter) |
## Backtesting Requirements
- Minimum 30 days historical data
- Walk-forward optimization
- Out-of-sample validation
- Maximum drawdown tracking
- Sharpe ratio > 1.5 target
+52
View File
@@ -0,0 +1,52 @@
---
sidebar_position: 1
---
# Platform Architecture
## Overview
All SKIC Playground applications share a common infrastructure pattern:
```
┌─────────────────────────────────────────────────────┐
│ TrueNAS SCALE │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────────────┐ │
│ │ Gitea │ │ Registry │ │ App Containers │ │
│ │ + CI/CD │ │ (Zot) │ │ │ │
│ └──────────┘ └──────────┘ └──────────────────┘ │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────────────┐ │
│ │Keycloak │ │ Hermes │ │ Monitoring │ │
│ │ (Auth) │ │ (Agent) │ │ │ │
│ └──────────┘ └──────────┘ └──────────────────┘ │
└─────────────────────────────────────────────────────┘
```
## Shared Services
| Service | URL | Purpose |
|---|---|---|
| Gitea | gitea.lego-cloud.eu | Source code, CI/CD |
| Keycloak | keycloak.lego-cloud.eu | Authentication, SSO |
| Zot Registry | :30264 | Container images |
| Hermes Agent | Local | AI operations, automation |
## CI/CD Pattern
All applications follow the same Gitea Actions workflow:
1. **Push to main** → Build + Test
2. **Build container** → Push to Zot registry
3. **Deploy** → Update running container
4. **Docs update** → Rebuild documentation site
## Repository Structure
```
skic-v1-playground/
├── documentation/ # This docs site
├── stock-market-pro/ # (Planned) Trading system
└── ... # Future applications
```
+79
View File
@@ -0,0 +1,79 @@
---
sidebar_position: 1
---
# Getting Started
## Prerequisites
- Node.js 18+
- pnpm (`npm install -g pnpm`)
- Git access to gitea.lego-cloud.eu
## Development
### Clone the repository
```bash
git clone ssh://git@gitea.lego-cloud.eu:30009/skic-v1-playground/documentation.git
cd documentation
```
### Install dependencies
```bash
pnpm install
```
### Start development server
```bash
pnpm start
```
The site will be available at `http://localhost:3000`.
### Build for production
```bash
pnpm build
```
### Serve production build locally
```bash
pnpm serve
```
## Adding Documentation
### New Application
1. Create a directory under `docs/applications/your-app-name/`
2. Add an `index.md` with frontmatter
3. Create subdirectories for each module
4. Update `sidebars.ts` to include the new section
### New Guide
1. Create a markdown file under `docs/guides/`
2. Add frontmatter with `sidebar_position`
3. Update `sidebars.ts` if needed
## Project Structure
```
documentation/
├── docs/ # Documentation content
│ ├── intro/ # Welcome & overview
│ ├── applications/ # Per-application docs
│ │ └── stock-market-professional/
│ ├── architecture/ # Platform-wide architecture
│ └── guides/ # How-to guides
├── blog/ # Changelog / updates
├── src/ # Custom components & CSS
├── static/ # Static assets
├── docusaurus.config.ts # Site configuration
├── sidebars.ts # Sidebar structure
└── package.json # Dependencies
```
+31
View File
@@ -0,0 +1,31 @@
---
sidebar_position: 1
slug: /intro
---
# SKIC Playground Documentation
Welcome to the documentation hub for **SKIC Playground** — a collection of autonomous applications built and maintained by Jarvis (AI agent).
## What is this?
This documentation covers various applications designed, developed, and operated autonomously. Each application has its own section with:
- **Overview** — What the application does and why
- **Architecture** — Technical design decisions and system diagrams
- **Configuration** — How to set up and configure
- **Operations** — How the application runs day-to-day
## Applications
| Application | Status | Description |
|---|---|---|
| [Stock Market Professional](/docs/applications/stock-market-professional) | 🚧 In Development | Forex/stock monitoring, technical analysis, and signal generation |
## Technology Stack
- **Infrastructure**: TrueNAS SCALE, Gitea, Docker
- **CI/CD**: Gitea Actions
- **Documentation**: Docusaurus + pnpm
- **Languages**: TypeScript, Python
- **AI/ML**: Pattern recognition, technical analysis algorithms