How raja549h/sovreign-alpha works
Purpose and deployment
Sovereign Alpha is a private, Docker-deployed institutional forensic-research and portfolio-intelligence platform. Its primary interactive entry point is the dashboard application; scheduled and CLI workflows also run the research and daily decision pipeline. Hugging Face Space deployment targets port 7860. Paths: dashboard/app.py, Dockerfile, .github/workflows/deploy-to-hf.yml.
Dashboard and access boundary
The dashboard is the presentation and operational-control layer, serving portfolio, predictions, research, audit, evidence, health, and run-status views. Authentication and input/security validation form the user-facing trust boundary; a worker and scheduler integration support background execution. Paths: dashboard/app.py, dashboard/auth.py, dashboard/security/validator.py.
Daily orchestration and agent decisions
The daily pipeline coordinates market/research processing and decision outputs. A multi-role agent layer separates analysis, risk review, and audit, while daily automation and operations provide executable entry points. This is the principal control flow from acquired data to governed recommendations. Paths: automation/master_daily.py, operations/daily_cycle.py, agents/analyst.py.
Market data, regime, and portfolio engine
Data adapters ingest market and institutional inputs, generate signals, and maintain live JSON artifacts. The engine provides the shared data layer and market-regime logic consumed by decision and research workflows; risk parameters are persisted as a data boundary. Paths: data/market_feed.py, data/market_signals.py, engine/regime.py.
Research and forensic intelligence
The research subsystem is a substantial independent pipeline: ingest filings/PDFs/transcripts, derive forensic and cross-verification intelligence, score results, and generate deep research notes/PDFs. Macro/FII and portfolio intelligence enrich issuer-level work. Generated research artifacts are retained under the repository data area. Paths: research/engine.py, research/ingestion/filing_fetcher.py, research/intelligence/forensic_detector.py.
Persistence, evidence, and integrity
SQLite-backed research/billing artifacts coexist with a PostgreSQL schema definition, indicating local/runtime stores plus a relational deployment target. Observations, transaction JSON, hash proofs, and Merkle/zk proof generation create an evidence and tamper-verification layer distinct from analytical outputs. Paths: database.py, POSTGRES_SCHEMA.sql, blockchain/ledger.py.
Validation, historical evaluation, and operations
Historical CSV data and the backtest engine evaluate strategy behavior separately from live workflows. Security/red-team utilities and system/deployment verification scripts provide operational assurance. GitHub Actions schedule the daily pipeline and publish the Docker application. Paths: backtesting/backtest_engine.py, security/red_team.py, .github/workflows/daily-pipeline.yml.
Main entry points: app.py Dashboard · master_daily.py Daily orchestrator · regime.py Regime engine · database.py Runtime artifact store
Components 19
Access & Delivery
- Dashboard · Interactive portfolio, research, audit, and run-control application.
dashboard/app.py - Auth boundary
dashboard/auth.py - Input validation
dashboard/security/validator.py - Docker deployment · Serves the Hugging Face Space target on port 7860.
Dockerfile
Daily Decision Pipeline
- Daily orchestrator · Coordinates daily market, research, and decision processing.
automation/master_daily.py - Daily operations
operations/daily_cycle.py - Agent decision layer · Analysis, risk review, and audit govern recommendations.
agents/analyst.py
Research Intelligence
- Research engine · Runs issuer research, scoring, and report generation.
research/engine.py - Filing ingestion · Acquires filings, PDFs, and transcripts.
research/ingestion/filing_fetcher.py - Forensic intelligence · Derives forensic findings and verification signals.
research/intelligence/forensic_detector.py
Data, Evidence & Evaluation
- Market adapters & signals · Ingests market and institutional inputs and produces live JSON signals.
data/market_feed.py - Regime engine · Shared market-regime and portfolio intelligence layer.
engine/regime.py - Runtime artifact store · Retains research and billing artifacts locally.
database.py - PostgreSQL schema · Relational deployment persistence target.
POSTGRES_SCHEMA.sql - Evidence ledger · Records observations and transaction hashes with Merkle/zk proofs.
blockchain/ledger.py - Backtest engine · Evaluates strategies against historical CSV data.
backtesting/backtest_engine.py
Automation & Assurance
- Daily pipeline workflow · Schedules the daily decision pipeline.
.github/workflows/daily-pipeline.yml - HF deploy workflow · Publishes the Docker application to Hugging Face.
.github/workflows/deploy-to-hf.yml - Security assurance · Operational security and deployment verification utilities.
security/red_team.py
Connections 21
- Auth boundary → Dashboard: authorizes access
- Input validation → Dashboard: validates input
- Dashboard → Daily orchestrator: controls runs
- Daily operations → Daily orchestrator: executes
- Daily pipeline workflow → Daily orchestrator: schedules
- Market adapters & signals → Regime engine: market inputs
- Regime engine → Daily orchestrator: regime context
- Filing ingestion → Forensic intelligence: source documents
- Forensic intelligence → Research engine: findings
- Research engine → Daily orchestrator: research intelligence
- Daily orchestrator → Agent decision layer: decision workload
- Regime engine → Agent decision layer: portfolio context
- Agent decision layer → Evidence ledger: governed decisions
- Research engine → Runtime artifact store: research artifacts
- Evidence ledger → Runtime artifact store: proof records
- PostgreSQL schema → Runtime artifact store: deployment persistence model
- Backtest engine → Regime engine: evaluates strategies
- Dashboard → Runtime artifact store: reads artifacts
- HF deploy workflow → Docker deployment: publishes
- Docker deployment → Dashboard: runs
- Security assurance → Dashboard: assures boundary