Unit E3: Zero-Synthetic-Data Quant Engine, 14-Point Bidirectional Census, Dose 0..3+, FRED Macro & Bayesian Brief

Cartridge E3 • Non-Sequentially Revertible via hs-eng-docs --disable quant-macro-and-bayesian-brief • v2.8.1

Prerequisite Track for Novices • Required Expertise: Level 3: Data Engineering, Time-Series Ingestion & Strategy Registries (10-15 hrs study)

If any concepts on this page are unfamiliar, occupy your study time with these free foundational resources first:

Core Concepts Required:
  • HTTP JSON/CSV client ingestion (urllib.request) and resilient fallback chains
  • Missing-data domain representation (None / null vs. silent 0.0 corruption)
  • Pluggable projection registries (LENS_REGISTRY) and state-machine persistence
Curated Free Public Study Resources:
λ Polyglot Foil (E3): Zero-Synthetic Missing-Data Semantics (#f / boolean / Option<f64>)
1. Formal Specification & Python:D_{i,t} = ∑_{s=1}^4 I(Species_s) ∈ {0..4}, Closed/Private = null
dose = sum(1 for flag in (s1, s2, s3, s4) if flag)
λ Guile Scheme (Z-Combinator):
(confluence-dose '(#t #t #t #f))
=> [Select Lens to evaluate]
TS TypeScript (Strict AST):
[true, true, true, false].filter(Boolean).length
=> [Select Lens to evaluate]
Rs Rust (Option/Iterator AST):
[Some(135.4), None, Some(138.2)].iter().filter_map(|&x| x).count()
=> [Select Lens to evaluate]
Guided Micro-Challenge (4-Ring Zero-Escape Sandbox): Observe how Scheme #f, TypeScript filter(Boolean), and Rust Option::filter_map eliminate synthetic 0.0 fabrication.

1. Strict Zero-Synthetic-Data Collector & Native-Cadence FRED Macro Engine (collector.py, macro.py)

collector.py and timeseries.py eliminate all synthetic bar interpolation: 23 public tickers load 440 verified daily exchange bars (site/quant/real-market-history.json), while private entity ANTHR-PVT and closed weekend/holiday sessions serialize strictly as null ('No data available'). macro.py ingests 14 keyless St. Louis Fed (FRED) CSV series at native 1d, 1mo, and 1q cadences without forward-fill.

2. 14-Point Bidirectional Census, Confluence Dose (D in {0..4}) & 5-Agenda Bayesian Brief (daily_brief.py)

timeseries.py evaluates all 14 data points in Gen 0 (eng_aq) and Gen 1 (ing_aq) and classifies each bar by its 4-species Confluence Dose (Dose 2 isometric pinning vs. Dose 3+ breakout). daily_brief.py updates the append-only Bayesian state ledger (daily-brief-state.json) across R1 Bull, R2 Pinned Isometric, and R3 Tail Drawdown and grades each day's testable macro question Q_t.

← Prev: E2: Knowledge Graph & SQLite Next: E4: MCP, REST & IPLD CIDv1 →