Technosight Investment Insights
Operational Workflow

2. End-to-End Operational Lifecycle & Workflow

Detailed breakdown of the five sequential execution stages and complete artifacts generated daily after market close.

Target Audience: DevOps Engineers, Systems Architects & Trading Operations

Key Takeaways for Investors & Traders

Strict 5-Stage Orchestration

Progresses methodically from mutex initialization to universe sync, scenario sweeps, dashboard generation, and candidate enrichment.

File-Lock Concurrency Control

Utilizes kernel-level flock primitives to prevent duplicate concurrent runs and race conditions.

Point-in-Time Universe Sync

Syncs active constituents while automatically filtering halted or delisted securities.

Parallel Scenario Sweeps

Executes 35 liquidity and parameter scenarios per strategy in parallel using columnar memory arrays.

Complete Multi-Artifact Suite

Generates daily_signal_report.html, results.html tearsheets, promising_symbols.csv, signals.parquet, and sweep summaries.

Executive Summary

The daily signal pipeline executes in five sequential stages under strict concurrency and error-handling controls. The workflow progresses from environment verification and universe synchronization to vectorized scenario sweeping, HTML diagnostic dashboard generation, and final multi-factor candidate enrichment.

1

High-Level Architecture & Lifecycle Stages

The signal generation framework is orchestrated through a sequence of modular shell wrappers, Python vectorization modules, analytics engines, and reporting generators:

flowchart TD
    A[cron_daily_signals.sh<br/>Entrypoint: 21:00 UTC] --> B[Stage 1: Init, Mutex Lock & Log Setup]
    B --> C[Stage 2: Universe Sync<br/>run_symbol_files_update.sh]
    C --> D[Stage 3: Strategy Loop<br/>Iterate stage/strategies.yaml]

    subgraph Strategy_Execution [Per-Strategy Execution Pipeline]
        D --> E[3.1 Vectorized Sweep Runner<br/>run_signals_sweep.sh]
        E --> F[(QuestDB: EOD Daily Bars<br/>us_equities_fmp_1d)]
        F --> G[Polars SIMD Vectorized<br/>Indicator & Score Engine]
        G --> H[(QuestDB: 15m Bars<br/>us_equities_fmp_15min)]
        H --> I[15m EMA Regime Filter<br/>50 / 200 / 800 Triad]
        I --> J[Scenario Signal Artifacts<br/>signals.parquet / signals.csv]

        J --> K[Stage 4: HTML Diagnostics<br/>technosight.signals.reporting]
        K --> L[daily_signal_report.html<br/>Master Dashboard]
        K --> M[results.html<br/>Per-Scenario Dashboards]
        K --> S[sweep_summary.csv / .parquet]

        J --> N[Stage 5: Candidate Ranking<br/>run_promising_symbols.sh]
        N --> O[3-Factor Promising Score<br/>Gain % + Signal Score + Sentiment]
        O --> P[Pre-Enrichment Boundary<br/>Top 50 Long + Top 50 Short]
        P --> Q[FMP API Enrichment<br/>Valuation, PEG, Consensus]
        Q --> R[promising_symbols.csv<br/>Final Enriched Table]
    end

    Strategy_Execution --> Z[Housekeeping & Log Rotation<br/>Retain newest 30 log files]

Stage 1: Environment, Lock Management, and Logging Setup

  • Trigger & Schedule: Invoked on weekday evenings after market close (typically 21:00 UTC / 17:00 EST) via cron_daily_signals.sh.
  • Mutex Concurrency Lock: Creates a kernel file lock (/tmp/technosight_cron_daily.lock). If another instance is active, the script terminates immediately to prevent duplicate database loads and write collisions.
  • Signal Traps: Uses trap cleanup EXIT INT TERM to guarantee automatic lock removal on termination or interruption.
  • Environment & Logging: Sources .env, configures Python path, resolves the virtual environment, and streams execution output to timestamped files (logs/cron_daily_<YYYYMMDD_HHMMSS>.log).

Stage 2: Symbol Universe Synchronization

  • Universe Refresh: Executes run_symbol_files_update.sh (unless --skip-symbol-update is specified).
  • Directory Mirroring: Synchronizes active and delisted equity universes from upstream stores into local data/symbols_fmp/ and data/symbols_delisted/.
  • Sanity Checks: Verifies ticker existence, filters out bankrupt or suspended assets, and ensures minimum trading history requirements (at least 252 trading days).

Stage 3: Strategy Manifest Discovery & Vectorized Scenario Sweeps

  • Manifest Ingestion: Reads stage/strategies.yaml to identify all enabled quantitative strategies (mean_reversion, statistical_arbitrage, momentum, momentum_omega, trend_following, volatility_breakout).
  • 35 Scenario Configurations: For each active strategy, loads 35 scenario files (scenario_A1.yaml through scenario_G5.yaml) spanning 7 liquidity tranches (A to G) and 5 parameter tiers (1 to 5).
  • Vectorized Computation: run_signals_sweep.sh executes Polars SIMD indicator calculations in parallel worker processes, querying QuestDB daily OHLCV bars (us_equities_fmp_1d) and intraday 15-minute bars (us_equities_fmp_15min).
  • Regime Evaluation: Evaluates 15m EMA alignment ($50, 200, 800$), assigning regime tags (AAA, BBB, NEUTRAL, BYPASS) to every evaluated bar.
  • Raw Signal Storage: Saves full-universe signal datasets to signals.parquet and signals.csv within the date partition.

Stage 4: HTML Reporting and Scenario Diagnostics

  • Reporting Engine: Invokes technosight.signals.reporting (SignalAnalyser).
  • Master Dashboard Compilation: Compiles daily_signal_report.html, featuring top-level KPI cards, intraday EMA regime distribution charts, the 11-column Top Ranked Promising Symbols table, and the 7-column Parameter Sweep Scenarios Comparison table.
  • Scenario Diagnostic Pages: Generates individual scenario teardowns (scenario_<ID>/results.html) with equity curves and trade metrics.
  • Sweep Summaries: Aggregates total signals, long/short counts, and mean scores into sweep_summary.csv and sweep_summary.parquet.

Stage 5: Candidate Ranking, Multi-Factor Scoring, FMP Enrichment & Housekeeping

  • Promising Score Engine: Invokes run_promising_symbols.sh (technosight.analytics.promising_score).
  • 3-Factor Score Computation: Evaluates normalized Average Gain %, Strategy Signal Score, and Side-Aware Sentiment.
  • Pre-Enrichment Selection Boundary: Partitions candidates into Long and Short pools, selecting up to 50 Longs and up to 50 Shorts (maximum 100 symbols) strictly before external API calls.
  • Contextual Enrichment: Queries Financial Modeling Prep (FMP) APIs to append corporate names, forward valuation multiples (P/E, Forward PEG, FCF Yield), Wall Street recommendation distributions, and consensus price targets.
  • CSV Export: Emits promising_symbols.csv formatted according to strict, non-duplicated schemas.
  • Housekeeping: Purges temporary scratch files and rotates log files, preserving the newest 30 logs.
2

Comprehensive Artifacts Inventory & Directory Hierarchy

On every execution date, the pipeline compiles a structured hierarchy of artifacts organized by strategy and calculation date:

selected_stocks/{strategy_name}/result/{YYYY-MM-DD}/
├── daily_signal_report.html           # Master executive signal dashboard
├── promising_symbols.csv              # Enriched top candidate list (max 100)
├── sweep_summary.csv                  # Aggregated 35-scenario summary metrics
├── sweep_summary.parquet              # Columnar 35-scenario summary
├── signals.parquet                    # Raw full-universe vectorized signals
├── signals.csv                        # Tabular full-universe signals
└── scenario_<ID>/                     # 35 scenario sub-directories (A1...G5)
    └── results.html (or result.html)  # Per-scenario diagnostic tearsheet

Complete Artifacts Specifications

Artifact Name Exact File Path Pattern Primary Format Key Fields & Contents Downstream Consumer & Workflow Role
daily_signal_report.html selected_stocks/{strat}/result/{date}/daily_signal_report.html Standalone HTML (CSS embedded) KPI Summary Cards, 15m EMA Regime distribution, Top Ranked Promising Symbols Table (12 columns), 35-scenario comparison table. Served directly via web portal iframe (strategy_selected_stocks_file_view) for portfolio managers and traders.
results.html / result.html selected_stocks/{strat}/result/{date}/scenario_{ID}/results.html Standalone HTML Individual scenario diagnostic tearsheet: cumulative equity curves, drawdown curves, monthly returns matrix, trade log. Scenario audit, quantitative model validation.
promising_symbols.csv selected_stocks/{strat}/result/{date}/promising_symbols.csv Comma-Separated Values (CSV) Top 50 Long and Top 50 Short candidates (max 100 symbols), 8 common prefix columns, model-specific indicators, 12 fundamental/consensus columns. Order staging by execution desks, automated trade execution engines, spreadsheet review.
signals.parquet selected_stocks/{strat}/result/{date}/signals.parquet Apache Parquet (Snappy compressed) Full-universe bar-by-bar vectorized signals: timestamp, symbol, close, signal, direction, raw_score, regime_15m. Quantitative research, cross-strategy backtesting, machine learning factor models.
signals.csv selected_stocks/{strat}/result/{date}/signals.csv Comma-Separated Values (CSV) Tabular export of the vectorized signals array matching signals.parquet. Ad-hoc spreadsheet analysis and compliance audits.
sweep_summary.csv / .parquet selected_stocks/{strat}/result/{date}/sweep_summary.csv CSV & Parquet 35-scenario aggregated metrics: scenario_id, total_signals, long_signals, short_signals, confirmed_rate, mean_score, exec_time. Cross-scenario parameter stability heatmaps, execution speed diagnostics.
cron_daily_*.log logs/cron_daily_{YYYYMMDD_HHMMSS}.log UTF-8 Text Logfile Structured execution trail: lock status, symbol sync counts, worker process PID logs, FMP API status codes, elapsed timings. SRE monitoring, automated alert pipelines, troubleshooting.