SPB Git

spb/wp41_uqo

Public
7.8 KB · 129 lines markdown
1<!-- Author: Simon-Pierre Boucher — simon-pierre.boucher@uqo.ca -->2# ⏱️ CHRONOS-X34**UQO Working Paper No. 41** — *Universal Intraday Representation Learning for Probabilistic Financial Forecasting*56[![Paper](https://img.shields.io/badge/paper-PDF-b31b1b?logo=latex&logoColor=white)](paper/main.pdf)7[![Python](https://img.shields.io/badge/python-3.12%2B%20·%20uv%20·%20PyTorch%20MPS-3776AB?logo=python&logoColor=white)](pyproject.toml)8[![Data](https://img.shields.io/badge/data-FinData%20OS%20·%20300%20instruments%20·%20234%20M%201--min%20bars-4051b5)](docs/DATA_CARD.md)9[![Reproducible](https://img.shields.io/badge/reproducible-tests%20·%20synthetic%20example%20·%20phase%20reports-2e7d32)](docs/REPRODUCIBILITY.md)10[![Institution](https://img.shields.io/badge/UQO-D%C3%A9pt.%20des%20sciences%20administratives-16365c)](https://uqo.ca)11[![Author](https://img.shields.io/badge/author-Simon--Pierre%20Boucher-16365c)](mailto:simon-pierre.boucher@uqo.ca)1213> **TL;DR** — Can a compact multi-resolution patch Transformer (MRPT) that reads the last 390 one-minute bars plus14> five days of 5-minute and twenty days of 30-minute past-only aggregates produce better-calibrated distributions15> of the next 5/15/30/60-minute returns than equal-budget one-minute-only models and well-specified volatility16> baselines? Tested on 300 U.S. stocks and ETFs (2018–2025, 234 M one-minute bars from FinData OS), with17> matched information sets, proper scoring rules, day-cluster inference, 60 held-out instruments and an untouched18> 2025 test. **See `docs/PHASE_5..7_REPORT.md` and the paper for the measured answer; no claim is made beyond them.**1920---2122## 📌 Status2324| Item | Value |25|---|---|26| Version | 1.0 (November 2026) — built autonomously on 2026-11-02 under the owner's brief (`CLAUDE.md`) |27| SSRN | not yet submitted |28| Journal | — (research software + working paper) |29| Code & data | reproducible from `scripts/` against FinData OS (private FirstRate Data license); synthetic example runs without a license |3031## 🎯 What this paper does3233Five pre-registered, falsifiable hypotheses (`paper/sections/hypotheses.tex`): H1 multi-resolution context vs34one-minute-only at equal parameters; H2 transfer to unseen instruments; H3 history-only regime conditioning and35calibration under stress; H4 coherent joint paths (low-rank Gaussian copula over the 60 future minutes) vs36independent marginals; H5 (exploratory) economic content after assumed costs. Targets are return distributions37(per-minute Student-t marginals, cumulative returns, realised variance, tail events), never price levels.3839## 🏆 Headline results4041Filled from `results/metrics/main`, `ablations`, `final` by `scripts/evaluate.py` — see `docs/PHASE_7_REPORT.md`.4243## 🗂 Repository layout4445```46wp41_uqo/47├── CLAUDE.md · README.md · pyproject.toml · Makefile48├── configs/        pilot · feasibility · main · ablations · baselines · final · synthetic_smoke (.yaml)49├── src/chronos_x/50│   ├── data/       client · exports · universe · calendar · quality · adjustments · features · windows · synthetic51│   ├── models/     patches · encoder · fusion · regime · student_t · joint_path · model52│   ├── train/      trainer · losses · sampling · checkpoint · tracking53│   ├── eval/       scores · calibration · statistics · subgroups · economic · figures54│   ├── baselines/  naive · har · garch · trees · neural · features55│   ├── inference/  predict · serialization · cli56│   └── pipeline.py · experiment.py · config.py57├── scripts/        audit_api · build_universe · audit_coverage · download_pilot · run_experiment · train_pilot · train_main58│                   · benchmark · evaluate · make_figures · build_references · make_synthetic · node_run.sh59├── tests/          unit · integration (live API, synthetic pipeline) · leakage · synthetic · numerical60├── data/manifests  universe_main.json (hash inside) · universe_main_v1_precoverage.json · candidates · universe_synthetic.json61├── results/        metrics/<exp>/ (summaries, leaderboards, comparisons, train logs) · logs/ (provenance JSONL)62├── paper/          main.tex · sections/ · tables/ (generated) · figures/ (generated) · references.bib (Crossref-verified) · main.pdf63└── docs/           DATA_CARD · MODEL_CARD · REPRODUCIBILITY · LICENSE · OPERATIONS · PHASE_0..9_REPORT64```6566## 🚀 Quick start6768```bash69make install && make test                                   # venv + 26 offline tests70.venv/bin/python scripts/make_synthetic.py                  # license-free fixtures in the FinData schema71.venv/bin/python scripts/run_experiment.py --config configs/synthetic_smoke.yaml   # bars -> grids -> baselines -> MRPT -> scores (~3 min)72.venv/bin/python scripts/evaluate.py --exps synthetic_smoke && .venv/bin/python scripts/make_figures.py --exps synthetic_smoke73cd paper && make                                            # latexmk -> main.pdf74```75Full study: `docs/REPRODUCIBILITY.md`. Compute node and operations: `docs/OPERATIONS.md`.7677## 🗃 Data7879FinData OS (`https://findata.spboucher.ai/api/v1`), FirstRate Data one-minute bars, private license (no raw data in80this repository). Universe: 300 instruments selected point-in-time at 2017-12-29 (ADV ≥ 5 M USD, ≥ 80 % regular-hours81minute coverage, stratified by asset class × dollar volume × volatility, SIC / ETF category balanced), 60 held out.82Sample 2018-01-02 → 2025-12-31: 233 958 776 rows, 220 142 835 in regular hours. Details and conventions (bar-open83stamps, 391/211-slot sessions, masks, split policy): `docs/DATA_CARD.md`, `docs/PHASE_0_REPORT.md`, `docs/PHASE_1_REPORT.md`.8485## 🔬 Methodology86871. Audit the live API and conventions on real rows (`scripts/audit_api.py`, live tests).882. Build the PIT universe, audit coverage, freeze the manifest (`build_universe.py`, `audit_coverage.py`).893. Export bars per instrument, build dense grids and past-only aggregates (`download_pilot.py`, `data/features.py`).904. Index origins and build causal windows and masked targets (`data/windows.py`; leakage tests).915. Fit baselines on the same origins (`baselines/`, `experiment.fit_and_predict_baselines`).926. Train MRPT variants with the Student-t NLL, early stopping and checkpoints (`train/trainer.py`).937. Predict, sample, score, bootstrap and test (`inference/predict.py`, `eval/`, `pipeline.py`).948. Ablations, zero-shot instruments, untouched 2025 (`configs/ablations.yaml`, `--heldout`, `configs/final.yaml`).959. Tables, macros and figures from saved results only (`evaluate.py`, `make_figures.py`); LaTeX build.9697## 🖼 Figures & tables inventory9899Generated into `paper/figures/` and `paper/tables/` by the scripts above (see `docs/PHASE_8_REPORT.md`).100101## ⚠️ Limitations102103Survivor-heavy liquid universe (coverage gate; delisted archives partial), bars without quotes, regular hours only,104single-node compute without mixed precision, foundation-model baselines not run. Full list: `paper/sections/limitations.tex`.105106## 📝 Citation107108```bibtex109@techreport{boucher2026chronosx,110  author      = {Boucher, Simon-Pierre},111  title       = {CHRONOS-X: Universal Intraday Representation Learning for Probabilistic Financial Forecasting},112  institution = {Universit\'e du Qu\'ebec en Outaouais, D\'epartement des sciences administratives},113  type        = {Working Paper},114  number      = {41},115  year        = {2026},116  month       = {November}117}118```119120## 👤 Author & contact121122**Simon-Pierre Boucher** — Département des sciences administratives, Université du Québec en Outaouais (UQO), Gatineau, QC.123📧 [simon-pierre.boucher@uqo.ca](mailto:simon-pierre.boucher@uqo.ca)124125## 🗒 Notes126127- Directory named `wp41_uqo` as requested by the brief (the standard would be a descriptive slug).128- Intraday data: FirstRate Data (private license), accessed through FinData OS; attribution required, redistribution prohibited.129
Files · e976cfd0ab0ee7e59d46d9e75fd8b8fb0a861c50
Menu

Theme