Files
encyclopedia-knowledge-graph/docs/archive/PLAN-QUANTITATIVE-FINANCE-TIMESERIES-SUBPAGE.md
T

160 lines
24 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Plan: Interactive Quantitative Finance & Memetic Gematria Time-Series Subpage (`/quant/`) for `hyperstitionstud.io` (`v2.0.17`)
- **Document ID:** `PLAN-QUANTITATIVE-FINANCE-TIMESERIES-SUBPAGE` (`v2.0.17`)
- **Target Web Route:** `https://hyperstitionstud.io/quant/` (`/quant/index.html`, `/quant/quant-app.js`, `/quant/quant-timeseries-data.js`)
- **Offline `file://` Path:** `/workspace/hyperstitionstudio-core/site/quant/index.html`
- **Schema Identifier:** `urn:io:hyperstitionstud:schema:v1:quant-timeseries` (`./schemas/v1/quant-timeseries.schema.json`)
- **Core Architectural Rule 1 (Strict Periodic Time-Series Boundary):** **100% of ingested and visualized data sources MUST produce discrete, timestamp-indexed periodic observations ($\Delta t \in \{\text{1d US-Closing-Bell}, \text{24h UTC-Rollover}\}$).** Non-periodic, static, or undated corpora are strictly excluded from the time-series engine and chart layers.
- **Core Architectural Rule 2 (Lens-Neutral Schema + Pluggable `LENS_REGISTRY`):** All persisted JSON schemas and time-series arrays (`quant-timeseries.json`) store **100% lens-neutral mathematical field names** (`struct_isometric_armor` .. `struct_repricing_resilience` and `ts_duty_cycle_pct`, `ts_weighted_resonance`, `ts_excess_over_replacement`, `ts_quantile_profile`, `ts_optimal_lag_days`, `ts_regime_splits`). Interpretive metaphors (`fund_manager`, `neutral_math`, `corporate_board`, `tierzoo_ecology`, `fantasy_sabermetrics`, `pokedex_scanner`) are projected at runtime via `hyperstitionstud_io.lenses.LENS_REGISTRY` (`PLAN-MODULAR-LENS-PROJECTION-AND-REVERSIBILITY-ARCHITECTURE`), allowing any lens to be toggled, removed, or replaced in `< 2 minutes` with zero schema or chart refactoring.
- **Global Footer Compliance:** Includes the global site footer `"Made with ♥ by Lemurs."` (`&#x2665;`) and participates in `hs-sync-version` (`hyperstitionstud_io.version_sync`).
---
## 1. Strict Periodic Data-Source Qualification Audit (Included vs. Excluded Sources)
To ensure every series plotted on `/quant/` is a true mathematical time series $\{X_t\}_{t \in \mathcal{T}}$ indexed over ordered UTC dates $t_1 < t_2 < \dots < t_N$, all workspace data sources are partitioned by a strict **Periodicity Qualification Gate**:
### 1.1 Included Data Sources (Produce Periodic, Timestamp-Indexed Time-Series Data)
| # | Periodic Data Source | Sampling Cadence ($\Delta t$) | Time-Series Variables & Gematrial Signals Emitted ($X_t$) |
| :- | :--- | :--- | :--- |
| **1** | **US Equity & Macro Watchlist Telemetry (`hs-quant-harvest --mode us-closing-bell`)** | **Mon–Fri `21:30 UTC` (`16:30 EST` Cron `29c871eb6b78`)** + Daily OHLCV history (Yahoo Finance v8 / Stooq CSV / CoinGecko) | • Daily Close $P_t$, Intraday Range $[L_t, H_t]$, Return $r_t$ (`bps`), and 20-Day Volume Ratio $V_t / \bar{V}_{20}$ across all `24` `S1–S6` instruments.<br/>• **Time-Varying Quantitative `AQ` Series:** Integer Close `Gen 1` Spoken `AQ` ($Q^{\text{spoken}}_{i,t}$), Close Digit `AQ` ($Q^{\text{digit}}_{i,t}$), and Basis-Point Move Spoken `AQ` ($Q^{\text{bps}}_{i,t}$).<br/>• **Scope 1 & 2 Lock Indicator Series:** Binary/count impulse series $L^{(1)}_{i,t}, L^{(2)}_{i,t} \in \{0, 1, 2, \dots\}$ firing whenever $P_{i,t}$ or $|\Delta \text{bps}_{i,t}|$ collides with the instrument's own `AQ` (`NVDA = $137 == envideea [137]`, `ASML = +81 bps == asml [81]`) or an `S1–S6` ring coordinate (`292, 260, 256, 211, 193, 191, 189, 183, 163, 160, 137, 135, 129, 128, 125, 95, 91, 81, 71`). |
| **2** | **Daily `00:00 GMT` Global News Wire Dossiers (`collect_news_aq.py` & `25..71-dossier-news-YYYY-MM-DD.md`)** | **Daily `00:00 UTC` (`19:00 EST` Cron `d28b479ec217`)** (`21` dated UTC snapshots from `2026-11-01` to `2026-11-29` + ongoing daily ticks) | • **Daily Memetic Phrase & Coordinate Velocity ($M_{c,t}$):** Count of verified `333 / 666 / 777` equations and cross-story collision classes activating coordinate $c$ on date $t$.<br/>• **News-Wire Co-Presence Series ($C_{i,t} \in \{0, 1\}$):** Whether ticker $i$ (`NVDA`, `ASML`, `TSM`, `ARM`, `ANTHR-PVT`, `BTC-USD`, `BLK`) co-occurred in breaking wire headlines on date $t$ (`SCOPE3_NEWS_WIRE_CO_PRESENCE_LOCK`).<br/>• **Daily Wire Telemetry Series:** Total headlines harvested, Twin-Prime headline count, Isometric lock count ($\Delta = 0$), and Shared Prime Factor attractors ($p \ge 11$). |
| **3** | **Objective Thermodynamic & Emergent `M1–M7+` Regime State Series (`regime_summary` & `memetic-superclass-registry.json`)** | **Daily (`21:30 UTC` & `00:00 UTC` ticks)** | • **Regime Activation State Vector $S_t \in \{0, 1\}^7$:** Daily activation status of `M1` (Entropic Stagnation: vol ratio `< 0.45` & $|\Delta\%| < 0.10$), `M2` (Flash-Crash / Templex Surge: $\Delta\% \le -5.0\%$ or `^VIX >= 25`), `M3` (Leviathan Trillion-Cap Concentration), and `M7+` Two-Run (`Run N -> Run N+1`) persistence counters (`discovered_on_date_utc` -> `confirmed_on_date_utc`). |
| **4** | **Dated Quantitative Economic Anchor Revisions (`quantitative-economic-anchors.json` & `anchor_revisions_detected`)** | **Event-Timestamped Step Series ($Q_t$)** anchored to dated dossiers (`2026-11-01`, `2026-11-18`, `2026-11-24`, `2026-11-30`) | • Step-function repricing series $Q_t$ tracking `anthropic_ipo_price_83` (`$83 [202] -> $89 [193 == anthropik == flash krash]`), `lazarus_heist_6b` (`$6B [211 == koper waier]`), and `bangladesh_factories_481` (`481 [13]`), plotted as regime-shift step overlays on the timeline. |
### 1.2 Strictly Excluded Data Sources (Non-Periodic / Static Corpora — Zero Time-Series Dimension)
| Excluded Source | Reason for Exclusion from `/quant/` Time-Series Engine | Permitted Static Role (Metadata Lookup Only) |
| :--- | :--- | :--- |
| **Static Atomic Lexicon & Thematic Ledgers (`01-ingglish-aq-lexicon.md`, `10–19-ledger-*.md`)** | Timeless orthographic/phonemic dictionaries (`Nait = 80`, `Thing = 103`); no observation timestamp $t$ or periodic sampling interval $\Delta t$. | Used only as a static coordinate label dictionary when hovering a locked integer $c \in [45, 777]$. |
| **Undated Thematic / Cinema / Philosophy Dossiers (`20–24`, `26–45`, `65–69-dossier-*.md`)** | Structural essays on *The Thing*, *Videodrome*, *Anti-Oedipus*, and classes `S1–S6`; not periodically sampled across calendar time. | Excluded from all time-series charts; referenced only for static guild badge descriptions. |
| **22-Volume PDF Encyclopedia & Static `ETI` Tier-List (`encyclopedia/*`, `tier-list-*`)** | Cross-sectional ontological taxonomy (`9` divisions, `388` graph nodes) rather than a longitudinal time series. | Already served on `/encyclopedia/` and `/graph/`; excluded from `/quant/`. |
| **Stakeholder Proposals, Lectures & Podcast Episodes (`proposal-*.md`, `lecture-*.md`, `podcast-ep*.md`)** | Narrative prose documents and audio scripts; produce zero periodic numerical or lexical time-series observations. | Completely excluded from `/quant/`. |
| **231k-Entry Calculator Database (`haiperdohp-jemaytreeah/db.json`)** | Static lookup table for instant string matching; no temporal axis. | Already served on `/calc/`; excluded from `/quant/`. |
---
## 2. Time-Series Data Architecture & Append-Only Ledger (`quant-timeseries-ledger.json`)
Currently, `hs-quant-harvest` writes `/workspace/ingglish-hyperdope-gematria/financial-aq-harvest-latest.json` (the latest snapshot), while `ingglish-aq-archive/` holds `21` dated `*-dossier-news-YYYY-MM-DD.md` files (`2026-11-01` through `2026-11-29`). To power a multi-week/multi-month interactive time-series workbench that works both offline (`file://`) and on `https://hyperstitionstud.io/quant/`:
1. **Historical Backfill + Append-Only Time-Series Ledger (`quant-timeseries-ledger.json`):**
- Extend `hyperstitionstud_io.quant.collector` (`hs-quant-harvest`) with a time-series ledger builder (`build_quant_timeseries_ledger()`) that:
1. Aligns the `24` `S1–S6` market instruments (`NVDA`, `ASML`, `TSM`, `ANTHR-PVT`, `MSFT`, `GOOGL`, `META`, `ORCL`, `AVGO`, `ARM`, `AMD`, `PLTR`, `LMT`, `RTX`, `HG=F`, `^VIX`, `BTC-USD`, `ETH-USD`, `SOL-USD`, `COIN`, `CEG`, `LLY`, `^TNX`, `BLK`) across the canonical November 2026 daily UTC calendar (`2026-11-01` through `2026-11-30`, `30` daily bars per instrument = `720` instrument-day observations) and appends every new daily `us-closing-bell` / `utc-rollover` cron run automatically.
2. Extracts the dated memetic phrase & coordinate time series directly from the `21` dated `*-dossier-news-YYYY-MM-DD.md` archive files (`2026-11-01` to `2026-11-29`), recording per UTC date $t$:
- Exact count of `333`, `666`, and `777` equations synthesized on date $t$,
- Active `S1–S6` signature coordinates (`137, 81, 91, 125, 129, 133, 135, 160, 163, 183, 189, 191, 193, 211, 256, 260, 292`) hit in the day's news wire,
- Verbatim dated memetic gematrial equations (`ing`, `eng`, `target`, `anchor_coord`, `matched_tickers`) from that day's dossier, and
- Cross-joined `co_present_in_news_wire` flags linking each dated news dossier to the 24 market tickers on the same UTC date $t$.
2. **Dual-Portable Synchronous Bundle (`site/quant/quant-timeseries-data.js`) & Lens-Neutral Schema Invariant:**
- Emit both `/workspace/hyperstitionstudio-core/site/quant/quant-timeseries.json` (with IPLD `dag-json` `CIDv1` provenance `baguqeera...`) and `/workspace/hyperstitionstudio-core/site/quant/quant-timeseries-data.js` (`window.HyperstitionStudio.QuantTimeSeries = ...`) so `/quant/index.html` loads instantaneously on both `file://` (zero `fetch()` CORS errors) and `https://hyperstitionstud.io/quant/` (Brotli-11 pre-compressed).
- **Lens-Neutral Field Contract (`quant-timeseries.schema.json`):** Each instrument and guild summary in `quant-timeseries.json` persists strictly canonical mathematical keys under `structural_vector` (`struct_isometric_armor`, `struct_drift_velocity`, `struct_variance_collapse`, `struct_trophic_capture`, `struct_prime_density`, `struct_repricing_resilience`) and `timeseries_moments` (`ts_duty_cycle_pct`, `ts_weighted_resonance`, `ts_excess_over_replacement`, `ts_quantile_profile`, `ts_optimal_lag_days`, `ts_regime_splits`), accompanied by a `lens_projections` map generated by `hyperstitionstud_io.lenses.apply_all_lenses(enabled_lenses)`.
---
## 3. Interactive UX & Four Synchronized Visual Panels on `/quant/index.html`
The `/quant/` subpage uses a zero-dependency, high-DPI HTML5 `<canvas>` + SVG interactive charting engine styled in the workspace's dark slate/cyan/gold/emerald monospace aesthetic (`#020617` canvas, `#0f172a` panels, `DejaVu Sans Mono`):
```text
+---------------------------------------------------------------------------------------------------+
| HEADER: hyperstitionstud.io/quant — Market Ticker & Memetic Gematria Time-Series Workbench |
| [ Guild: ALL | S1..S6 ] [ Lens: Quant Factor | Neutral Math | TierZoo | Fantasy | Pokedex v ] |
| [ Ticker Select: NVDA (Nvidia) v ] [ Open TradingView Chart ↗ ] [ Mode: Spoken AQ | BPS | USD ] |
+---------------------------------------------------------------------------------------------------+
| PANEL 1: Dual-Axis Synchronized Time-Series Canvas (Date Scrubbing, Crosshair & Zoom) |
| • Top Pane (Price & Quantitative AQ Trajectory): |
| - Solid Cyan Curve: Daily Close USD ($P_t$) or Return (bps) |
| - Gold Step-Line: Time-Varying Spoken/Digit AQ ($Q_t$) with horizontal dashed S1-S6 Ring Bands |
| - Crimson/Emerald Beacon Markers: Scope 1 Self-Locks ($137 == envideea, +81 bps == asml) |
| • Middle Pane (Memetic Gematrial Phrase Impulse & News-Wire Co-Presence Histogram): |
| - Stacked Violet/Gold Bars: Daily 333 / 666 / 777 equation counts from dated News Dossiers |
| - Glowing Cyan Diamonds: Days where selected Ticker co-occurred in 00:00 GMT Wire Headlines |
| • Bottom Pane (M1-M7+ Thermodynamic Regime Ribbon & Volume Ratio 20d): |
| - Color-coded regime bands (M1 Entropic, M2 Flash-Crash Surge, M3 Leviathan, M7+ Nucleation) |
+---------------------------------------------------+-----------------------------------------------+
| PANEL 2: Multi-Ticker x Date Contingent Lock | PANEL 3: Selected Date (t) Cross-Sectional |
| Heatmap Matrix (24 Tickers x 30 UTC Days) | Inspector & Memetic Equation Tape |
| • Rows: 24 S1-S6 Tickers (grouped by Guild) | • Clicking/scrubbing any date t displays: |
| • Columns: Ordered UTC Dates (Nov 01 .. Nov 30) | 1. Ticker OHLCV, bps move & 4-mode AQ |
| • Cell Color: | 2. Active Scope 1-3 Contingent Locks |
| - Gold: Scope 1 Intra-Instrument Self-Lock | 3. Verbatim 333/666/777 Memetic Phrases |
| - Cyan: Scope 2 S1-S6 Ring Migration | recorded in that date's News Dossier |
| - Emerald Border: News-Wire Co-Presence | that share the ticker's AQ coordinate |
+---------------------------------------------------+-----------------------------------------------+
| PANEL 4: Coordinate Resonance & Lead-Lag Cross-Correlation Explorer (r_{tau} at lags tau = -5..+5)|
| • Computes empirical cross-correlation between Memetic Coordinate Frequency M_{c,t} (from daily |
| 00:00 GMT wire dossiers) and Ticker Volatility / Basis-Point Moves |Delta bps_{i, t+tau}| |
| across lags tau in {-5, -4, ..., 0, ..., +5} days, plus Portable JSON/CSV Time-Series Export. |
+---------------------------------------------------------------------------------------------------+
```
### 3.1 Panel 1: Synchronized 3-Pane Time-Series Chart (`HTML5 Canvas` with Crosshair Scrubbing)
1. **Top Pane — Market Metric vs. Quantitative `AQ` Trajectory:**
- Plots the selected ticker's price series $P_{i,t}$ (or basis-point change $\Delta \text{bps}_{i,t}$) alongside its time-varying `Gen 1` Ingglish Spoken `AQ` series $Q^{\text{spoken}}_{i,t}$ (`e.g., $137 -> "wuhn huhndrad therdee sevan" = 486` or integer self-lock `137 == envideea`).
- Draws horizontal dashed reference lines at the instrument's own `Gen 0` and `Gen 1` entity `AQ` coordinates (`e.g., 113 and 137 for NVDA; 81 for ASML; 193 for ANTHR-PVT`) and guild partner rings (`125, 183, 191, 211, 256, 292`). Whenever $P_{i,t}$ or $|\Delta \text{bps}_{i,t}|$ crosses a ring line, a pulsing **Scope 1 / Scope 2 Lock Marker** is rendered directly on the time series.
2. **Middle Pane — Dated Memetic Gematrial Phrase Impulse Series ($M_{c,t}$):**
- Plots the daily time series of `333 / 666 / 777` memetic equations and cross-story collision counts harvested by the `00:00 GMT` wire pipeline (`25..71-dossier-news-YYYY-MM-DD.md`), filtered either to the selected ticker's guild (`S1–S6`), its signature coordinate ring $c$, or all global wire clusters.
- Highlights exact **Co-Presence Dates** ($C_{i,t} = 1$) where the ticker's entity name or symbol appeared in the day's news wire simultaneously with a quantitative lock.
3. **Bottom Pane — 20-Day Volume Ratio ($V_{i,t}/\bar{V}_{20}$) & `M1–M7+` Regime State Strip:**
- Renders the 20-day relative volume bar series overlaid with the objective `Scope 3` thermodynamic state gates (`M1` `< 0.45x` stagnation threshold, `M2` `>= 2.5x` or `<= -5.0%` templex surge threshold, `M3` `$1T+` leviathan concentration, and `M7+` two-run nucleation dates `2026-11-28 -> 2026-11-29`).
### 3.2 Panel 2: `24 Tickers × T Dates` Contingent Lock Spatiotemporal Heatmap
- A compact interactive matrix where each row is one of the `24` `S1–S6` instruments and each column is a UTC calendar date $t$.
- Cells light up by lock class:
- **Gold (`Scope 1`):** Intra-Instrument Self-Lock or Repdigit `37×k` Attractor (`NVDA $137`, `ASML 81 bps`, `LLY $777`).
- **Cyan (`Scope 2`):** `S1–S6` Supply-Chain Ring Migration (`TSM $191 == derivativ == lajistiks`, `COIN $292 == sinthetik dayta == asset management`, `CEG $256 == akselerayshan == sovran welth`).
- **Violet (`Anchor Revision`):** Dated `--revise-anchor` step transition (`ANTHR-PVT $83 -> $89 [193]`).
- **Emerald Ring (`News Co-Presence`):** Instrument co-present in that UTC day's `00:00 GMT` wire dossier.
- Clicking any `(Ticker, Date)` cell immediately focuses Panel 1 and Panel 3 on that instrument and timestamp.
### 3.3 Panel 3: Timestamp Cross-Section Inspector, TradingView Launcher & Dated Memetic Phrase Tape
- Selecting any date $t$ on the chart or heatmap displays the exact cross-sectional join for date $t$:
1. **Instrument Telemetry Card & Direct TradingView Launch (`Open TradingView Chart ↗`):**
- Displays Close USD, $\Delta\%$, $\Delta\text{bps}$, 20d volume ratio, market cap, and all 4 quantitative `AQ` encodings (`close_digit_aq`, `close_spoken_ing_aq`, `scaled_cap_spoken_ing_aq`, `bps_spoken_ing_aq`).
- Includes a prominent **`Open TradingView Chart ↗`** action button (also bound to the top toolbar next to the ticker selector, each heatmap row label, and keyboard shortcut `T`) that opens the live interactive TradingView Superchart for the selected instrument in a new browser window/tab (`window.open(tvUrl, "_blank", "noopener,noreferrer")`).
2. **Dated Memetic Gematrial Phrase Tape:** Lists the verbatim `333`, `666`, and `777` Ingglish equations (`ing`, `eng`, word-by-word `AQ` sum, and source dossier link `/archive/<NN>-dossier-news-YYYY-MM-DD.md`) harvested on date $t$ that lock onto the ticker's coordinate ring or guild.
### 3.5 Canonical `S1–S6` Ticker -> TradingView Symbol & URL Resolver (`tradingview_symbol` & `tradingview_url`)
- **Zero-Runtime-Widget Offline Invariant Preserved:** Rather than embedding a third-party `https://s3.tradingview.com/tv.js` iframe inside `/quant/index.html` (which would violate the workspace's strict Zero-External-Script / 100% `file://` offline portability rule in `test_offline_urn_namespaces_and_no_external_https_fonts()`), `/quant/` resolves each of the `24` watchlist instruments to its canonical `EXCHANGE:SYMBOL` TradingView Superchart URL (`https://www.tradingview.com/chart/?symbol=<EXCHANGE>%3A<SYMBOL>`) and opens it on user action in a new browser window (`target="_blank" rel="noopener noreferrer"`):
| Watchlist Symbol | Entity (`Guilds`) | Canonical TradingView Symbol (`tradingview_symbol`) | New-Window Launch URL (`tradingview_url`) |
| :--- | :--- | :--- | :--- |
| `NVDA`, `ASML`, `MSFT`, `GOOGL`, `META`, `AVGO`, `ARM`, `AMD`, `PLTR`, `COIN`, `CEG` | Nasdaq Tech / AI / Compute (`S1–S6`) | `NASDAQ:NVDA`, `NASDAQ:ASML`, `NASDAQ:MSFT`, `NASDAQ:GOOGL`, `NASDAQ:META`, `NASDAQ:AVGO`, `NASDAQ:ARM`, `NASDAQ:AMD`, `NASDAQ:PLTR`, `NASDAQ:COIN`, `NASDAQ:CEG` | `https://www.tradingview.com/chart/?symbol=NASDAQ%3A<SYM>` |
| `TSM`, `ORCL`, `LMT`, `RTX`, `LLY`, `BLK` | NYSE Foundry / Defense / Bio / Capital (`S1, S3, S5, S6`) | `NYSE:TSM`, `NYSE:ORCL`, `NYSE:LMT`, `NYSE:RTX`, `NYSE:LLY`, `NYSE:BLK` | `https://www.tradingview.com/chart/?symbol=NYSE%3A<SYM>` |
| `BTC-USD`, `ETH-USD`, `SOL-USD` | 24/7 Crypto Liquidity Rails (`S2, S6`) | `COINBASE:BTCUSD`, `COINBASE:ETHUSD`, `COINBASE:SOLUSD` | `https://www.tradingview.com/chart/?symbol=COINBASE%3A<COIN>USD` |
| `HG=F` | Copper Futures (`S3, S2`) | `COMEX:HG1!` | `https://www.tradingview.com/chart/?symbol=COMEX%3AHG1%21` |
| `^VIX` | CBOE Volatility Index (`S2`) | `TVC:VIX` | `https://www.tradingview.com/chart/?symbol=TVC%3AVIX` |
| `^TNX` | US 10-Year Treasury Yield (`S6, S2`) | `TVC:US10Y` | `https://www.tradingview.com/chart/?symbol=TVC%3AUS10Y` |
| `ANTHR-PVT` | Anthropic Pre-IPO Valuation Anchor (`S1, S2`) | `NASDAQ:GOOGL` *(Primary public strategic backer proxy; badge notes Pre-IPO Private Anchor `$89`)* | `https://www.tradingview.com/chart/?symbol=NASDAQ%3AGOOGL` |
### 3.4 Panel 4: Lead-Lag Cross-Correlation ($\rho(\tau)$) & Portable Time-Series Export (`JSON` / `CSV`)
- **Lead-Lag Correlation Bar Chart ($\tau \in \{-5, \dots, +5\}$ days):**
Computes the Pearson and Spearman cross-correlation between daily memetic phrase density on coordinate ring $c$ ($M_{c,t}$) and unsigned basis-point volatility ($|\Delta \text{bps}_{i, t+\tau}|$) or volume ratio ($V_{i, t+\tau}$) across lags $\tau = -5 \dots +5$ days, testing whether news-wire gematrial convergence leads, coincides with ($\tau = 0$), or lags market repricing.
- **Zero-Backend Client Export & Custom Snapshot Dropzone:**
- Export the currently filtered time series as a standard `.csv` file or IPLD-compatible `.json` slice.
- Drag-and-drop any historical `financial-aq-harvest-*.json` or custom snapshot file onto the page to overlay and compare trajectories locally in browser memory.
---
## 4. Integration into `hyperstitionstudio-core`, `Caddyfile`, and Deployment Verification
### Phase 1: Lens-Neutral Schema, Pluggable `LENS_REGISTRY` & Time-Series Ledger Compiler (`hyperstitionstud_io.{lenses,quant.timeseries}`)
1. Create `/workspace/hyperstitionstudio-core/schemas/v1/quant-timeseries.schema.json` (`$id: "urn:io:hyperstitionstud:schema:v1:quant-timeseries"`) enforcing lens-neutral mathematical field names (`struct_*` and `ts_*`).
2. Create `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/lenses/__init__.py` implementing `LENS_REGISTRY`, `ENABLED_LENSES` (`neutral_math`, `fund_manager`, `corporate_board`, `tierzoo_ecology`, `fantasy_sabermetrics`, `pokedex_scanner`), `apply_lens()`, and `apply_all_lenses()`.
3. Implement `/workspace/hyperstitionstudio-core/src/hyperstitionstud_io/quant/timeseries.py` (`build_quant_timeseries_bundle()`), which:
- Ingests ONLY periodic sources (`financial-aq-harvest-latest.json`, historical OHLCV/watchlist series, `25..71-dossier-news-YYYY-MM-DD.md`, `news-aq-harvest-*.json`, and dated `quantitative-economic-anchors.json` revisions) while enforcing a programmatic assertion that zero undated/static dossiers (`01-lexicon`, `10–19-ledger`, `20–45`, `65–69`, `encyclopedia`, `proposals`, `podcasts`) enter the time-series arrays.
- Computes lens-neutral `timeseries_moments` (`ts_duty_cycle_pct`, `ts_weighted_resonance`, `ts_excess_over_replacement`, `ts_quantile_profile`, `ts_optimal_lag_days`, `ts_regime_splits`) and projects them through `LENS_REGISTRY`.
- Emits `/workspace/hyperstitionstudio-core/site/quant/quant-timeseries.json` (with `ipld_dag_json_cidv1`) and `/workspace/hyperstitionstudio-core/site/quant/quant-timeseries-data.js` (`window.HyperstitionStudio.QuantTimeSeries`), guarded by `ReadOnlyIsolationGuard`.
- Hook `build_quant_timeseries_bundle()` into `hs-quant-harvest` (`collect_financial_quant_aq.py`) so every `16:30 EST` (`21:30 GMT`) Window A cron run automatically appends the new daily bar to the time-series bundle.
### Phase 2: Build `/workspace/hyperstitionstudio-core/site/quant/index.html` & `quant-app.js`
1. Build the responsive dark-theme workbench at `site/quant/index.html` and `site/quant/quant-app.js` implementing Panels 1–4, the live top-bar **Lens Switcher** (dynamically populated from `ENABLED_LENSES` so disabling any lens requires zero HTML/JS edits), the `Open TradingView Chart ↗` new-window launcher (`window.open(..., "_blank", "noopener,noreferrer")` + keyboard shortcut `T` + per-row heatmap launch icon), keyboard left/right date stepping (`←` / `→`), guild/ticker/mode selectors, `.csv`/`.json` export, and the `"Made with ♥ by Lemurs."` footer.
2. Add a direct launch card/button on `/workspace/hyperstitionstudio-core/site/index.html` (`Open Quant Time-Series Workbench (/quant/)`) and cross-links in `/learn/index.html` and `/graph/index.html`.
3. Register `site/quant/index.html` and `site/quant/quant-app.js` in `hyperstitionstud_io/version_sync.py`.
### Phase 3: Wire into `deploy/sync-vps-repos.sh`, `test-first-deployment.sh` & `tests/test_core_suite.py`
1. In `deploy/sync-vps-repos.sh`, create the relative route symlink `${LIVE_SUDO} ln -sfn "hyperstitionstudio-core/site/quant" "${LIVE_REPOS}/quant"` (Caddy's root `handle { root * /var/www/hyperstitionstud.io/repos/hyperstitionstudio-core/site }` already serves `/quant/*` automatically on `https://hyperstitionstud.io/quant/`).
2. Add `/quant/index.html`, `/quant/quant-app.js`, `/quant/quant-timeseries-data.js`, and `/schemas/v1/quant-timeseries.schema.json` to `deploy/test-first-deployment.sh` and `tests/test_core_suite.py` (including explicit unit tests asserting that 100% of series observations carry a valid `YYYY-MM-DD` UTC timestamp, zero non-periodic dossier sources are present, and `build_quant_timeseries_bundle(enabled_lenses=["neutral_math", "fund_manager"])` passes 100% when `pokedex_scanner`, `tierzoo_ecology`, and `fantasy_sabermetrics` are disabled).