1# CLAUDE.md — UQO Research WP4123## CHRONOS-X: Universal Intraday Representation Learning for Probabilistic Financial Forecasting45**Project ID:** `wp41_uqo` · **Institution:** Université du Québec en Outaouais (UQO) · **PI:** Simon-Pierre Boucher6**Language:** English · **Primary data:** FinData OS, `https://findata.spboucher.ai/api/v1` (FirstRate Data, private license)7**Status:** research hypotheses, not established findings. Built autonomously on 2026-11-02 under the owner's brief8(the owner's original brief is the authoritative text; this file condenses it and records the decisions taken).910## Mission and hard rules11Build, test, benchmark, document and publish a reproducible research software package and a LaTeX working paper on one12question: can a compact, transferable, multi-resolution model learn minute-level structure and improve *calibrated*13forecasts of the next 5, 15, 30 and 60 minutes? Rules:141. Never promise positive results, trading profits, novelty or journal acceptance. Null findings are reported.152. Preserve every other working paper and production system in `Recherche-UQO/` and on the cluster. This directory is16 its own git repository (`origin = gitsrv:srv/git/wp41_uqo.git`).173. No fake experiments, invented figures, invented citations or untested code. Every phase ends with18 `docs/PHASE_N_REPORT.md` (commands, artifacts, test counts, coverage, hardware, wall-clock, memory, blockers, go/no-go).194. FinData OS is the mandatory primary source. Finnhub (or any other vendor) is optional, separate and unused unless its20 credentials, terms and history are verified and documented. Never log credentials; never commit secrets.215. FirstRate Data private-use license: no raw bars in git, logs, figures, the manuscript or any release. Release code,22 aggregate results and synthetic fixtures only (`docs/LICENSE.md`).236. Read `API.md`, `DATA_DICTIONARY.md`, `DISCOVERY.md` (FinData repo) and the live OpenAPI before any ingestion.247. Do not proceed past a failed leakage, numerical or provenance gate.2526## Hypotheses (falsifiable)27H1 multi-resolution history beats equal-budget 1m-only models on probabilistic scores · H2 pooled training transfers28to unseen instruments better than matched baselines · H3 history-only regime conditioning improves calibration during29regime shifts · H4 a coherent joint-path decoder improves path-level scores over independent minute marginals ·30H5 (exploratory) incremental economic information after realistic costs.3132## Data conventions (verified against the live API on 2026-11-02, see docs/PHASE_0_REPORT.md)33- `timestamp_utc` = bar OPEN; the 09:30 bar is complete at 09:31. Regular XNYS session 09:30–16:00 ET: 391 bars on a34 normal day (390 + the 16:00 closing print), 211 on a 13:00 early close. Extended hours 04:00–20:00 ET are separate.35- Zero-volume minutes are absent at the source: never forward-fill silently; missingness is a feature and a mask.36- Stored bars are raw; splits are applied explicitly (`adjustment=split`); dividends are not applied to intraday37 returns (window-dependent artifact). Corporate-action policy is in `docs/DATA_CARD.md`.38- At origin t only completed bars are used; targets are log returns of completed future bars; origins whose horizon39 crosses the close are excluded for regular-hours models.4041## Where things are42| Item | Location |43|---|---|44| Configs | `configs/{pilot,main,ablations,baselines,final}.yaml` |45| Code | `src/chronos_x/{data,models,train,eval,baselines,inference}` |46| Scripts | `scripts/{audit_api,build_universe,download_pilot,train_pilot,train_main,evaluate,benchmark}.py` |47| Tests | `tests/{unit,integration,leakage,synthetic,numerical}` (`pytest`; live tests need `WP41_LIVE=1`) |48| Manifests / synthetic data | `data/manifests`, `data/synthetic` (never proprietary bars) |49| Results | `results/{tables,figures,metrics,logs}` |50| Paper | `paper/main.tex`, `sections/`, `figures/`, `tables/`, `appendix/`, `references.bib` |51| Docs | `docs/{DATA_CARD,MODEL_CARD,REPRODUCIBILITY,LICENSE,OPERATIONS}.md`, `docs/PHASE_N_REPORT.md` |5253## Compute54Compute node **M3U96b** (Mac Studio M3 Ultra, 28 CPU cores, 60 GPU cores, 96 GB) — `~/wp41_uqo`, venv `.venv`55(Python 3.12, PyTorch MPS). Data over the LAN from M3U96a (`FINDATA_BASE_URL=http://192.168.2.80:8600/api/v1`),56bars cache `~/wp41-cache` (outside git). Laptop = mirror and LaTeX build. See `docs/OPERATIONS.md`.57