Institutional Pipeline Architecture

The YourBrand engine is a production-grade C# implementation designed for the high-fidelity ingestion, scoring, and systematic rotation of SEC Form 4 signals. The architecture prioritizes Regulatory Compliance, Deterministic Scoring, and Immutable Auditing.

The Logical Flow: Raw GZip to Staged Alpha

This diagram visualizes the data lifecycle. The pipeline transforms raw SEC EDGAR XML filings (Code P) into scored, prioritized institutional tranches in under one second.

%% Institutional Dark Theme Flowchart %% graph LR %% Sources %% RawIndices[EDGAR Index GZips] -->|100ms Semaphore| Client(SECHttpClient) Client -->|Async GZip Stream| Filter{Filtration Engine} %% Filtration Logic %% Filter -->|Discard: 10b5-1
Discard: <$250k| LedgerD(Audit Archive) Filter -->|PROMOTE: Code P
$250k Discretionary| Scoring(ClusterBuyAnalyzer) %% Scoring & Tiering %% Scoring -->|Role Weighting & Acceleration| Tier{Tranch Classifier} Tier -->|Score < 200| LedgerD Tier -->|Score >= 200| stagedA(Tier A+ Staged) %% Execution & Output %% stagedA -->|VOO Rotation Constraint| Execute(Position.cs) Execute -->|GUID linking
SEC Accession #| LiveFeed(SignalR Broadcast) Execute -->|T+90 Maturation| driftA(Peak Adverse Excursion Audit) %% Styling for Emphasis %% style stagedA fill:#3d7bff,stroke:#fff,stroke-width:1px,color:#fff; style Filter fill:#secondaryColor,stroke:#3d7bff,stroke-width:1px; style Tier fill:#secondaryColor,stroke:#3d7bff,stroke-width:1px;

Multi-Channel Signal Delivery

Because execution speed is critical, the architecture supports low-latency, multi-platform signal broadcasting directly to your proprietary systems, trading desks, or personal devices.

Azure ServiceBus

Enterprise-grade message queues managed via ManagedServiceBusClient for automated algorithmic ingestion.

SignalR

Real-time WebSocket streaming powered by SignalRMessageManager for custom dashboards and UI integration.

Telegram

Instant push notifications delivered via ManagedTelegramBotClient directly to your mobile device.

Encrypted Email

Detailed daily digests, signal maturation reports, and comprehensive end-of-day analytics.

Engine Core: The pipeline transforms raw EDGAR indices into structured IndividualForm4Signal.cs objects through a 7-stage refinement process.

1. Compliant Ingestion ( SECHttpClient.cs )

Direct-to-source retrieval from the SEC EDGAR servers. The SECHttpClient.cs enforces a strict 10-request-per-second rate limit using a 100ms asynchronous semaphore. This ensures permanent compliance with federal access protocols while utilizing GZip stream decompression for high-velocity index processing.

2. Discretionary Filtration

Raw filings are parsed into Form4Transaction.cs records. The system applies a hard-coded filter to isolate Discretionary Conviction: only Open-Market Purchases (Code P) exceeding $250,000 by C-Suite Officers or Directors are promoted. Automated 10b5-1 "scheduled" trades are programmatically discarded.

3. Multi-Factor Cluster Scoring

The ClusterBuyAnalyzer.cs processes contemporaneous purchases within a 30-day rolling window. The engine calculates a proprietary score based on role hierarchy multipliers, purchase acceleration, and the number of unique insiders participating in the cluster.

4. Signal Tiers (A+ to C)

Signals are categorized into institutional tiers. A Tier A+ Signal requires a score $\ge$ 200, involving at least three unique insiders and a high executive role weighting (CEO/CFO). This tiering serves as the primary trigger for capital reallocation.

5. Capital Rotation ( SimplePnLTracker.cs )

The strategy utilizes a VOO Baseline Rotation. Capital is maintained in a broad-market benchmark (VOO) until a Tier-A signal is staged. The system then executes a reallocation from the baseline into the signal, while maintaining a mandatory 10% Initial Capital liquidity guard.

6. Maturation & Drift Audit

Post-execution, every signal is monitored via PriceActionMetrics.cs . The system audits performance at T+1, T+7, and out to T+90 intervals, while capturing the Peak Adverse Excursion (Max Drawdown) to verify the risk-adjusted validity of the original insider conviction.

7. Immutable Ledger Delivery

Final trades are committed to an immutable history via the Trade.cs class. Each transaction is timestamped and assigned a unique GUID Position.cs , linking every dollar of profit back to the original SEC Accession Number for a forensic-grade audit trail.

Mathematical Framework

The scoring and rotation logic is governed by deterministic formulas that eliminate human bias from the signal generation process.

1. Role-Weighted Multiplier ($W_{role}$)

The system applies a hierarchy weight based on the reporting owner's proximity to financial and operational truth:

\[ W_{role} = \begin{cases} 4.0 & \text{if CEO} \\ 3.5 & \text{if CFO} \\ 3.0 & \text{if COO} \\ 1.25 & \text{if Director} \\ 1.0 & \text{otherwise} \end{cases} \]

2. Composite Signal Scoring ($S$)

The ClusterBuyAnalyzer.cs score is a summation of logarithmic scaling and acceleration factors:

\[ S = \min(60, 15 \log_{10}(V_{agg})) + \min(50, 12 \log_{10}(V_{30d})) + (8 \cdot N_{insider}) + (10 \cdot \sum W_{role}) \]

Where:

3. Capital Rotation Constraint

The SimplePnLTracker.cs ensures the portfolio remains anchored by broad-market liquidity through a strict rotation inequality:

\[ V_{rotate} \le V_{VOO} - (0.10 \cdot K_{initial}) \]

This ensures the "Risk-On" rotation into Form 4 signals never compromises the core 10% liquidity baseline ($K$).