39 Commits
Author SHA1 Message Date
mathias 2c9bc1be31 fix(ci): drop Build & Import / Deploy via GitOps jobs (jepa-fx-risk#19)
CD / Lint / Test / Vet (push) Successful in 5s
This is a research repo -- issue#6/#7 already decided CI should be
check-only (`task check` on push/PR), no build, no image push, no
deploy, since training runs are manual/GPU-bound and never CI-triggered.
That never actually landed in cd.yml: it still carried the original
go-web template's build+deploy jobs verbatim, still referencing the
pre-rename `hostexecutor` name (`./cmd/hostexecutor` doesn't exist --
real dirs are cmd/eval, cmd/jepa-fx-risk) and a `k3s/apps/hostexecutor`
deployment that was never created in infra (confirmed: no manifest
exists under either name). Once the check job's own Taskfile bug was
fixed, build started actually running and failing on the wrong path.
Removed both jobs -- check is the only gate this repo needs.
v1.6.1
2026-07-24 15:28:46 +02:00
mathias 308f71b566 fix(ci): Taskfile YAML syntax error + staticcheck tagged-switch (jepa-fx-risk#19)
CD / Build & Import (push) Failing after 10s
CD / Deploy via GitOps (push) Has been skipped
CD / Lint / Test / Vet (push) Successful in 7s
Taskfile.yml line 46 had an unquoted Go-template `{{.VAR}}` inside a YAML
flow sequence (`cmds: [...]`) -- the literal braces broke YAML parsing
outright ("did not find expected ',' or ']'"), so `task check` (and thus
CI's push-triggered check job) failed before running a single command.
A manual `workflow_dispatch` re-run passed because the autoresearch
workflow never calls `task check` at all -- unrelated path, not an
env/secret difference as first suspected. Quoted the string.

Also fixed a staticcheck QF1002 in internal/eval/var.go: a boolean
switch comparing the same variable (n1) in every case is a tagged
switch in disguise -- converted to `switch n1 { case 0: ... case n: ...
}`.
2026-07-24 15:26:01 +02:00
mathias 6fb77f5263 fix(ci): drop empty LOOP_MODEL env that blanked the model → LLM 400
CD / Lint / Test / Vet (push) Failing after 3s
CD / Deploy via GitOps (push) Has been skipped
CD / Build & Import (push) Has been skipped
`LOOP_MODEL: ${{ inputs.model }}` sets the env var to "" when no model input is
given. An env var set-but-empty is NOT unset, so it overrode loop.py's
berget/gemma4-31b default, and every agent call POSTed "model":"" → HTTP 400
Bad Request. The loop ran but optimized nothing (best == baseline, delta 0).

Real overrides already flow through the conditional `--model` arg, so this env
line was redundant as well as harmful. Remove it; loop.py's default applies.
v1.6.0
2026-06-29 19:34:57 +00:00
mathias 8eb0358c01 fix(loop): put project root on PYTHONPATH for train.py subprocess
CD / Lint / Test / Vet (push) Failing after 2s
CD / Build & Import (push) Has been skipped
CD / Deploy via GitOps (push) Has been skipped
train.py is copied into runs/<rq-id>/ by autoresearch_start.py, so when loop.py
executes it, sys.path[0] is the run dir — which has no scripts/. train.py's
frozen VaR-eval block does `from scripts.var_breach import ...`, which then
fails with ModuleNotFoundError: No module named 'scripts' on every loop run
(CI and the documented manual launch alike).

Fix in the harness, not the frozen train.py/scripts boundary: prepend the
project root (loop.py's own dir, where scripts/ lives) to the subprocess
PYTHONPATH. Verified red→green locally: the import fails without it and
resolves with it (scripts/ is an implicit namespace package, no __init__.py).
2026-06-29 21:32:25 +02:00
mathias 2d412790bf chore(ci): commit 59KB toy eurusd_daily.parquet as CI data fixture
CD / Lint / Test / Vet (push) Failing after 3s
CD / Build & Import (push) Has been skipped
CD / Deploy via GitOps (push) Has been skipped
The Autoresearch Loop workflow (phase-a-toy) runs train.py, which reads
data/processed/eurusd_daily.parquet. data/ is gitignored (DVC/MinIO policy, #10),
but CI checks out a fresh tree with no data, so the baseline run died with
FileNotFoundError. Force-add this single 59KB derived fixture (public EUR/USD
daily realized vol, 2019-2023, 1560 rows) so the toy loop is hermetic and fast.

This is a scoped exception to #10 for a CI fixture only — large/production
datasets still stay out of git per that policy.
2026-06-29 21:20:41 +02:00
mathias 8539ec3a85 fix(ci): install torch from cu130 index in venv step
CD / Lint / Test / Vet (push) Failing after 2s
CD / Deploy via GitOps (push) Has been skipped
CD / Build & Import (push) Has been skipped
train.py imports torch but the venv step only installed requirements.txt,
which deliberately excludes torch (must come from the cu130 wheel index for
koala's Blackwell sm_120, per the requirements.txt header). Baseline run died
with ModuleNotFoundError: No module named 'torch'. Add the documented install.
2026-06-29 19:14:51 +00:00
mathias c9b22db3b8 fix(ci): pin upload-artifact to @v3 — v4 artifact protocol unsupported on Gitea
CD / Lint / Test / Vet (push) Failing after 2s
CD / Build & Import (push) Has been skipped
CD / Deploy via GitOps (push) Has been skipped
Gitea's act_runner does not implement the @actions/artifact v2.0.0+ backend, so
upload-artifact@v4 fails the job with GHESNotSupportedError even when the loop
succeeds. v3 is the newest tag the Gitea runner supports.
2026-06-29 18:43:12 +00:00
mathias 731673061e fix(deps): histdata>=1.3 is unsatisfiable, pin to >=1.1 (newest on PyPI)
CD / Lint / Test / Vet (push) Failing after 3s
CD / Build & Import (push) Has been skipped
CD / Deploy via GitOps (push) Has been skipped
The Autoresearch Loop workflow failed at "Set up Python venv" on every run:
  ERROR: Could not find a version that satisfies the requirement histdata>=1.3
          (from versions: 1.0, 1.1)
histdata never published 1.3 — 1.1 is the newest release. Lower the floor so
pip can resolve and the loop can actually start.
2026-06-29 18:41:07 +00:00
mathiasandClaude Sonnet 4.6 54b1bc216d feat(ci): Gitea Actions workflow for autoresearch loop (Phase A automation)
CD / Lint / Test / Vet (push) Failing after 3s
CD / Build & Import (push) Has been skipped
CD / Deploy via GitOps (push) Has been skipped
workflow_dispatch with inputs: fixture, rq_id, iters, model override.
- Scaffolds run dir from fixtures/<fixture>.json via autoresearch_start.py
- Runs loop.py with LITELLM_KEY/LITELLM_BASE/NTFY_URL secrets
- Uploads STATUS.md + metrics.json + program.md as artifacts (30-day retention)
- Cleans stale run dir at start; venv created/reused per runner workspace
- timeout-minutes: 90 to cover multi-iter runs

Phase B (k8s Job + GPU isolation) tracked in jepa-fx-risk#15.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 17:20:44 +02:00
mathiasandClaude Sonnet 4.6 fa6dcaae0a chore: fixture backlog for Phase A toy run + gitignore cleanup
CD / Lint / Test / Vet (push) Failing after 3s
CD / Build & Import (push) Has been skipped
CD / Deploy via GitOps (push) Has been skipped
- fixtures/phase-a-toy.json — scaffold source for `autoresearch start`
  Phase A live run: val_vol_r2 metric, daily EUR/USD, HEPA encoder toy
- .gitignore: add runs/ (ephemeral run dirs), metrics.json, embeddings.json,
  HEARTBEAT, STATUS.md, pyc/__pycache__/.pytest_cache, eval binary
- untrack metrics.json (was a stale committed sample, now gitignored)

Launch on koala:
  python scripts/autoresearch_start.py fixtures/phase-a-toy.json phase-a-toy
  op run -- env LITELLM_KEY="$LITELLM_KEY" \
    python loop.py --run-dir runs/phase-a-toy --iters 3

Closes the last gate on jepa-fx-risk#11 Phase A (code shipped v1.4.0;
live run pending).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 17:03:55 +02:00
mathiasandClaude Sonnet 4.6 68bf8f15c5 feat(eval): VaR breach rate metric (#12) + HMM regime detector (#13) — rq-04 prep
CD / Lint / Test / Vet (push) Failing after 2s
CD / Build & Import (push) Has been skipped
CD / Deploy via GitOps (push) Has been skipped
#12 — VaR_breach_rate_99_oos_regime_cond metric:
- internal/eval/var.go: VaRBreachRate() + kupiecPOF() + LinearProbePredict() (stdlib math only)
- internal/eval/var_test.go: 8 golden tests (zero/all breach, perfect calibration, boundary)
- cmd/eval/main.go: -metric var flag (no-leakage probe → VaR → Kupiec P)
- scripts/var_breach.py: Python equivalent with METRIC_KEY constant (13 TDD tests)
- train.py LOCKED VaR EVAL BLOCK: writes VaR_breach_rate_99_oos_regime_cond + kupiec_p to metrics.json
- Fixed bug: train.py used bare 'os' before import; now uses module-level '_os' consistently

#13 — HMM regime detector + JEPA conditioning seam:
- scripts/prepare_regime.py: GaussianHMM (diag, 3-state) on realized_vol; states sorted by mean vol
  (0=calm, 1=stressed, 2=crisis); deterministic (random_state=42); outputs eurusd_regime.parquet
- tests/test_regime.py: 11 TDD tests (dtype, states, determinism, vol sort, daily fallback)
- train.py: JEPA_ENABLE_REGIME toggle + REGIME CONDITIONING SEAM (concat baseline, agent-editable)
- requirements.txt: hmmlearn>=0.3, scikit-learn>=1.4

78 Python + all Go tests green.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v1.5.0
2026-06-27 10:35:10 +02:00
mathiasandClaude Sonnet 4.6 65a58fcca2 feat(loop): add --run-dir isolation, heartbeat, ntfy-on-crash; scaffold start command
CD / Lint / Test / Vet (push) Failing after 1s
CD / Build & Import (push) Has been skipped
CD / Deploy via GitOps (push) Has been skipped
Closes jepa-fx-risk#11 Phase A.

- scripts/autoresearch_start.py: scaffold runs/<rq-id>/ from Council backlog leaf;
  fail-closed on non-autoresearch-ready; strips candidate_metric; writes program.md
  + run.json (provenance) + train.py copy. 19 TDD tests.
- loop.py: --run-dir flag redirects STATUS.md / metrics.json / HEARTBEAT / train.py
  into the run dir; METRICS_OUT env var passed to train subprocess so it writes
  metrics.json to the run dir; heartbeat file written each iter phase; ntfy-on-crash
  via NTFY_URL env var (best-effort).
- train.py: METRICS_OUT env var overrides metrics.json path (default unchanged).

Launch: LITELLM_KEY=xxx python loop.py --run-dir runs/rq-04

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v1.4.0
2026-06-27 10:19:17 +02:00
mathiasandClaude Sonnet 4.6 d4b67943fb feat(multipair): lock best config + train:multipair Taskfile target
CD / Lint / Test / Vet (push) Failing after 2s
CD / Build & Import (push) Has been skipped
CD / Deploy via GitOps (push) Has been skipped
Best: USE_MULTIPAIR=1 D_MODEL=256 WINDOW=120 → phase1_r2=0.4377, val_vol_r2=0.3695
WINDOW sweep (multipair D=256): W=60→0.4009, W=120→0.4377, W=240→0.4277
D_MODEL=128 undercapacity for 10ch (val_vol_r2=0.1013); D=256 restores probe quality.
Single-pair default knobs unchanged (D=128 still optimal there).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v1.3.0
2026-06-26 14:08:25 +02:00
mathiasandClaude Sonnet 4.6 bd8962f997 feat(multipair): G10 multi-pair pipeline + USE_MULTIPAIR knob (Option C)
- prepare_hourly.py: parameterize PAIR env var; OUT_DEFAULT per-pair; load_m1_from_zips(pair=)
- prepare_multipair.py: inner-join 5-pair hourly parquets on datetime → wide parquet
  cols: datetime, {pair}_ret, {pair}_rv × n_pairs; eurusd_rv = target
- fetch_multipair.py: download GBPUSD/USDJPY/USDCHF/AUDUSD M1 2008-2023 from histdata
- train.py: USE_MULTIPAIR knob (JEPA_USE_MULTIPAIR=1); build() reads multipair parquet
  with n_channels = n_pairs × 2; target = eurusd_rv
- Taskfile: data:fetch:multipair, data:prepare:pair, data:prepare:multipair, data:test updated
- 7 new tests in test_multipair.py; 34/35 pass (1 SKIP until multipair parquet built)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 14:00:57 +02:00
mathiasandClaude Sonnet 4.6 b2bc01ba9e feat(phase1): warm-start joint encoder fine-tuning (Option B)
CD / Lint / Test / Vet (push) Successful in 3s
CD / Build & Import (push) Failing after 7s
CD / Deploy via GitOps (push) Has been skipped
Two-phase phase-1:
  1a. Frozen warmup: head trains on pre-computed embeddings for PHASE1_EPOCHS=200
  1b. Joint fine-tune: encoder + head for PHASE1_JOINT_EPOCHS=30 at PHASE1_ENCODER_LR=3e-6

Key design decisions:
- Warm start prevents catastrophic forgetting (PHASE1_JOINT=1 cold-start → -32 R²)
- Normalize live encoder output with FROZEN stats (mu_e/sd_e) so head sees same
  embedding distribution it was warmed up on
- head LR reduced 10× in joint phase to prevent head from racing ahead

HPO sweep: 30ep@3e-6=0.3962, 30ep@1e-5=0.3930, 50ep@3e-6=0.3923
Baseline (frozen): 0.3908. New best: phase1_r2=0.3962 (+0.0054 OOS).

New knobs: JEPA_PHASE1_JOINT (default 1), JEPA_PHASE1_JOINT_EPOCHS (default 30),
JEPA_PHASE1_ENCODER_LR (default 3e-6). 4 new tests (tests 15-18). 28/28 pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v1.2.0
2026-06-26 13:25:09 +02:00
mathiasandClaude Sonnet 4.6 de19bfeada fix(features): revert to 2-channel default; OHLCV features redundant
CD / Lint / Test / Vet (push) Successful in 4s
CD / Build & Import (push) Failing after 7s
CD / Deploy via GitOps (push) Has been skipped
HPO finding: hl_range≈realized_vol, ret_intrabar≈ret — correlation kills signal.
4ch D=128: 0.3503, 4ch D=256: 0.3807, 2ch D=128 baseline: 0.3908 (winner).
Parquet keeps hl_range+ret_intrabar; comment in build() documents the attempt.
test_build_uses_4_channels → test_build_uses_2_channels (tracks current default).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v1.1.0
2026-06-26 13:14:01 +02:00
mathiasandClaude Sonnet 4.6 caccd1aa7b feat(features): add hl_range + ret_intrabar OHLCV features (4-channel input)
- prepare_hourly.py: keep O/H/L columns from M1 zips; compute per-hour
  hl_range=log(H/L) and ret_intrabar=log(close/open); backward-compat
  (falls back to 4-col output only when O/H/L present in input)
- train.py build(): auto-detect extra features from parquet columns
  (FEAT_COLS = [ret, realized_vol] + [hl_range, ret_intrabar] if present)
- 5 new tests (9 total in test_prepare_hourly); 24/24 pass

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 13:11:59 +02:00
mathiasandClaude Sonnet 4.6 e635a641a4 chore: autoresearch agent STATUS.md iterations (iter1-4 reverted — no improvement)
CD / Lint / Test / Vet (push) Successful in 4s
CD / Build & Import (push) Failing after 7s
CD / Deploy via GitOps (push) Has been skipped
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 13:07:15 +02:00
mathiasandClaude Sonnet 4.6 48c7e3bd02 chore: update metrics.json to canonical WINDOW=120 run (phase1_r2=0.3908)
CD / Lint / Test / Vet (push) Successful in 4s
CD / Build & Import (push) Failing after 7s
CD / Deploy via GitOps (push) Has been skipped
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v1.0.0
2026-06-26 12:43:13 +02:00
mathiasandClaude Sonnet 4.6 3aded95ef1 feat(hpo): sweep results + update WINDOW default to 120
HPO sweep (18 configs, D_MODEL×DEPTH×WINDOW grid):
  Best: D_MODEL=128 DEPTH=2 WINDOW=120 → phase1_r2=0.3908
  Worst: D_MODEL=64 (all configs) → max phase1_r2=0.3653

Key findings:
- WINDOW=120 (5 days) > 240 > 480 — FX vol prediction is local, not regime-scale
- DEPTH=4 doesn't improve over DEPTH=2 — 2 causal layers sufficient
- D_MODEL=64 undercapacity; 128 and 256 comparable

Updated WINDOW default: 240 → 120 (HPO winner).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 12:42:50 +02:00
mathiasandClaude Sonnet 4.6 e739f84afd feat(hpo): env-var knob overrides + sweep script (18 configs)
CD / Lint / Test / Vet (push) Successful in 4s
CD / Build & Import (push) Failing after 8s
CD / Deploy via GitOps (push) Has been skipped
- train.py knobs all readable from JEPA_* env vars (JEPA_WINDOW, JEPA_D_MODEL,
  JEPA_DEPTH, etc.) so hpo_sweep.py can override without touching source
- scripts/hpo_sweep.py: 3×2×3 grid over D_MODEL × DEPTH × WINDOW,
  logs to results/hpo/hpo_results.jsonl with leaderboard at end
- 3 new tests: env override correctness, configs() schema validation
- 19/19 tests pass

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.9.0
2026-06-26 12:37:27 +02:00
mathiasandClaude Sonnet 4.6 d282571c96 feat(phase1): MLP supervised head on frozen HEPA embeddings
CD / Lint / Test / Vet (push) Successful in 4s
CD / Build & Import (push) Failing after 7s
CD / Deploy via GitOps (push) Has been skipped
SupervisedHead: Linear(D→D/2)→GELU→Linear(D/2→1), trained on standardised
targets with proper epoch iteration (not random 200 batches) + weight_decay=1e-4.
Root cause of earlier -803 R²: unstandardised targets + ~1.2 effective passes.

Results on 2008-2023 hourly OOS (n=11,641):
  val_vol_r2 (linear probe): 0.3585
  phase1_r2  (MLP head):     0.3737  (+0.015 over probe)

New knobs: PHASE1_EPOCHS=200, PHASE1_LR=1e-3. 16/16 tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.8.0
2026-06-26 12:33:28 +02:00
mathiasandClaude Sonnet 4.6 1a17a4c88e fix(eval): export block uses next-period RV target (t+1) to match Python probe
CD / Lint / Test / Vet (push) Successful in 4s
CD / Build & Import (push) Failing after 7s
CD / Deploy via GitOps (push) Has been skipped
Go harness reported 0.42 vs Python 0.36 because export used realized_vol[t]
(current) while Python probe used realized_vol[t+1] (next-period). Fix adds
t+1 < len(df2) guard and uses iloc[t+1] as target. Go now matches Python: 0.3585.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.7.0
2026-06-26 12:11:04 +02:00
mathiasandClaude Sonnet 4.6 fa6d6c634a fix(train): mini-batch training to avoid GPU OOM on hourly dataset
CD / Build & Import (push) Failing after 7s
CD / Deploy via GitOps (push) Has been skipped
CD / Lint / Test / Vet (push) Successful in 4s
BATCH_SIZE=512 per step; batched embed() at eval + export time.
78k hourly windows can't fit in GPU in one shot (was fine at 877 daily).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.6.1
2026-06-25 13:14:29 +02:00
mathiasandClaude Sonnet 4.6 e31905dc43 feat(data): EUR/USD hourly pipeline + 2008-2023 M1 dataset (#2)
CD / Lint / Test / Vet (push) Successful in 4s
CD / Build & Import (push) Failing after 8s
CD / Deploy via GitOps (push) Has been skipped
- scripts/prepare_hourly.py: M1→hourly aggregation (realized_vol = sqrt(Σr²),
  MIN_BARS=30 threshold, no weekend rows, year-based split preserved)
- tests/test_prepare_hourly.py: 5 TDD tests, all green
- train.py: USE_HOURLY=True, WINDOW=240 (10-day), PATCH_LEN=24 (1-day patches);
  build() prefers eurusd_hourly.parquet, falls back to daily; EXPORT BLOCK updated
- Taskfile.yml: data:fetch:historical, data:prepare:hourly, data:prepare:all, data:test
- 98,591 hourly rows (2008-2023) covering GFC, Euro crisis, Brexit, COVID, Fed cycle

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.6.0
2026-06-25 13:12:48 +02:00
mathiasandClaude Sonnet 4.6 bde651b0df feat(backbone): replace TS-JEPA+SIGReg with HEPA causal JEPA
CD / Lint / Test / Vet (push) Successful in 4s
CD / Build & Import (push) Failing after 8s
CD / Deploy via GitOps (push) Has been skipped
HEPA (Petersen et al., arXiv:2605.11130, ICML 2026 Spotlight):
- CausalEncoder: non-overlapping patches + per-patch LayerNorm +
  causal Transformer (generate_square_subsequent_mask) → all tokens (B, N, D)
- HorizonPredictor: MLP(cat(h_t, Δt)) → predicted future embedding;
  Δt sampled uniformly from [1, min(DELTA_T_MAX, N-1-c)] per epoch
- vicreg_loss: (1-α)·L1(norm(ĥ), norm(h*)) + α·(L_var + L_cov);
  joint training — no stop-gradient on target encoder
- Probe: last-token embedding [:, -1, :], fit on 2019-2021, eval on OOS

Results (true OOS 2022-2023):
  val_vol_r2: -0.45 (TS-JEPA+SIGReg) → +0.243/+0.276 (HEPA)
  effective_rank: 58.9/64 → 122.3/128 (near-full-rank, no collapse)
  Phase-0 gate on val_vol_r2: PASS ✓

Tests: 6/6 green (causal masking verified with non-uniform perturbation;
per-patch LayerNorm is mean-invariant so constant shifts are absorbed)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.5.0
2026-06-25 08:05:33 +02:00
mathiasandClaude Sonnet 4.6 20aeecb971 fix(eval): correct probe metric to use true year-based OOS split
CD / Lint / Test / Vet (push) Successful in 4s
CD / Build & Import (push) Failing after 7s
CD / Deploy via GitOps (push) Has been skipped
- train.py build(): year-based split (train≤2021, OOS≥2022) replaces
  misleading 70/30 mixed-period split; true OOS val_vol_r2 now ~-0.36
  vs previously reported +0.18 (artefact of cross-period data leakage)
- train.py: EXPORT_EMBEDDINGS block now exports both train+OOS embeddings
  with dates and HV labels for Go eval harness
- cmd/eval: LinearProbeTrainTest uses train stats for standardisation of
  both sets (no leakage); standardiseCompute/applyStandardise helpers
- internal/eval: add LinearProbeTrainTest (fit-on-train, eval-on-OOS)
  alongside LinearProbe (same-set); 8/8 tests still green

Phase-0 gate result: val_vol_r2=-0.36, silhouette=0.043, erank=58.9/64.
Backbone produces high-rank embeddings (SIGReg working) but does NOT
generalize across 2021→2022 regime boundary. Gate: INCONCLUSIVE/FAIL.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.4.0
2026-06-24 22:57:14 +02:00
mathiasandClaude Sonnet 4.6 e11e7d2524 feat(eval): Go evaluation harness — LinearProbe, Silhouette, EffectiveRank (#4)
CD / Build & Import (push) Failing after 7s
CD / Deploy via GitOps (push) Has been skipped
CD / Lint / Test / Vet (push) Successful in 4s
internal/eval: three pure-Go diagnostics on frozen embeddings:
  LinearProbe(emb, y, λ) → val_vol_r2 (OOS R², closed-form ridge, Cholesky)
  Silhouette(emb, labels) → mean silhouette (Euclidean, multi-label, errors on <2 classes)
  EffectiveRank(emb) → Roy effective rank (Jacobi eigenvalues → entropy → exp(H))

cmd/eval/main.go: CLI driver reading embeddings.json (exported by train.py with
EXPORT_EMBEDDINGS=1), standardises per-dim, dispatches to -metric flag.
task eval:probe / eval:silhouette / eval:collapse wired in Taskfile.

8/8 tests pass (red-green: perfect clusters, rank-1, full-rank, noise, constant
target, single-label error). Pure stdlib, no external deps.

Closes #4.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.3.0
2026-06-24 12:01:04 +02:00
mathiasandClaude Sonnet 4.6 f01bdde7c2 refactor: rename hostexecutor → jepa-fx-risk (#9)
Module path gitea.d-ma.be/mathias/hostexecutor → jepa-fx-risk.
cmd/hostexecutor → cmd/jepa-fx-risk. templ upgraded 0.2.778 → 0.3.1020.
Clean build + tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 11:58:42 +02:00
mathiasandClaude Sonnet 4.6 3445b6d267 experiment(phase0): NULL result — path B proxy gate (ref #5)
CD / Lint / Test / Vet (push) Failing after 3s
CD / Build & Import (push) Has been skipped
CD / Deploy via GitOps (push) Has been skipped
Phase-0 SSL feasibility gate run on daily 2019-2023 EUR/USD (path B deviation:
not hourly 2008-2022 + Go harness as specced in #5). Results:
  TS-JEPA silhouette mean=0.018 (need >0.20) — FAIL
  PCA baseline silhouette=0.136 — also below threshold
  sensitivity: 2000 ep + D=64 worsened to 0.004 (not a training-time issue)

Root cause: 2 daily features (ret, realized_vol) carry minimal regime structure
at this resolution. The JEPA objective with SIGReg pushes embeddings toward
isotropic Gaussian — good for downstream probes (val_vol_r2>0) but may actively
resist the clustering structure the silhouette gate measures.

Null protocol: real gate requires #4 (Go harness) + #2 (hourly data, more
features) before rerunning. HEPA (#14) noted as alternative backbone.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 10:52:07 +02:00
mathiasandClaude Sonnet 4.6 7d04423d39 feat(loop): 5 iters on TS-JEPA+SIGReg backbone — consistent improvement
CD / Lint / Test / Vet (push) Failing after 2s
CD / Build & Import (push) Has been skipped
CD / Deploy via GitOps (push) Has been skipped
All 5 kept: val_vol_r2 -0.1543 → +0.0599 (+0.214 total). Backbone learning.
Agent tuning: LR, depth, SIGREG_LAM, EPOCHS. Still well below toy ceiling
(0.37) — real backbone room to grow via #3/#4/#5.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.2.0
2026-06-24 07:45:55 +02:00
mathiasandClaude Sonnet 4.6 44e8b3eb95 feat(model): TS-JEPA+SIGReg backbone replaces toy encoder (#3 step 1)
CD / Lint / Test / Vet (push) Failing after 3s
CD / Build & Import (push) Has been skipped
CD / Deploy via GitOps (push) Has been skipped
PatchTST-style transformer encoder with JEPA predictive loss + SIGReg
regularization (Balestriero & LeCun arXiv:2511.08544; time-series placement
from ChronoJEPA). Token-level SIGReg (dual placement) to avoid time-axis
collapse (confirmed real by ChronoJEPA). Baseline val_vol_r2=-0.1543 on first
run — expected for fresh weights with new architecture. Agent will iterate.
SIGReg source: Epps-Pulley statistic, identical math to LeJEPA MINIMAL.md.

Refs: #3 (TS-JEPA reproduce), ChronoJEPA github.com/MrRobotop/ChronoJEPA

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 07:42:56 +02:00
mathiasandClaude Sonnet 4.6 f5ce8d6706 chore(loop): 6 more iters — plateau at ~0.34-0.37 (1/6 kept)
CD / Lint / Test / Vet (push) Failing after 4s
CD / Build & Import (push) Has been skipped
CD / Deploy via GitOps (push) Has been skipped
Toy encoder near ceiling. 1 kept (val_vol_r2 0.3032→0.3442), 5 reverts.
Consistent plateau = time to swap in TS-JEPA backbone (#3/#5).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 07:37:29 +02:00
mathiasandClaude Sonnet 4.6 ed85dc4a8c feat(loop): 3 iterations complete — autoresearch chain end-to-end (closes #11 Phase A)
CD / Lint / Test / Vet (push) Failing after 2s
CD / Build & Import (push) Has been skipped
CD / Deploy via GitOps (push) Has been skipped
3 iterations ran unattended on koala (agent=berget/gemma4-31b, GPU=RTX5070):
  iter1: val_vol_r2 0.2821→0.3749 (+9.3%) KEEP  [EMBED_DIM 16→64]
  iter2: 0.2234→0.3011 (+7.8%) KEEP  [MASK_FRAC tuning]
  iter3: 0.3011→0.3032 (+0.2%) KEEP  [minor capacity tweak]
Final EMBED_DIM=64, MASK_FRAC=0.4. STATUS.md tracks full trajectory.
Both monitoring axes live: research=STATUS.md metric table, technical=GPU
snapshot per iter (0% util between runs, shared cleanly w/ llama-swap).
Phase-A acceptance: loop runs 3+ iters unattended, metric moves, both axes visible.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.1.0
2026-06-24 07:17:50 +02:00
mathiasandClaude Sonnet 4.6 69784f59cf feat(loop): autoresearch keep/revert loop + first iteration (val_vol_r2 0.2821→0.3749, +9.3%)
loop.py: Karpathy-style keep/revert loop. Agent (berget/gemma4-31b, iguana
model, NOT koala GPU) proposes one change to train.py per iter → train.py runs
on koala GPU (<2s) → read val_vol_r2 from metrics.json → keep if improved, else
restore original content. STATUS.md tracks per-iter metric + delta + GPU snap.
Iter 1 kept: improved EMBED_DIM/capacity, +9.3% on OOS R².

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 07:16:50 +02:00
mathiasandClaude Opus 4.8 485fdaa9f9 feat(data): EUR/USD M1 fetch + daily realized-vol prep (toy slice, #2/#11)
CD / Lint / Test / Vet (push) Failing after 4s
CD / Build & Import (push) Has been skipped
CD / Deploy via GitOps (push) Has been skipped
fetch_data.py politely pulls EUR/USD M1 from histdata.com (maintained package
handles the anti-hotlink token; per-year, spaced). prepare_data.py (LOCKED per
Phase-1 contract) parses M1 -> daily series with realized_vol = the val_vol_r2
target (sqrt sum of squared intraday returns). Verified on 2019-2021: 937 days,
March-2020 COVID RV spike 5.1x over 2019 median — real signal, target works.
Data gitignored (DVC/MinIO = #10).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 16:49:59 +02:00
mathiasandClaude Opus 4.8 df910e4336 chore(phase0): reproducible compute gate — torch cu130 + GPU smoke test
CD / Build & Import (push) Has been skipped
CD / Deploy via GitOps (push) Has been skipped
CD / Lint / Test / Vet (push) Failing after 3s
scripts/check_gpu.py verifies PyTorch cu130 sees the koala Blackwell GPU
(sm_120) and computes — the Phase-0 prerequisite before any autoresearch
experiment. Verified green: torch 2.12.1+cu130, RTX 5070, GPU matmul OK.
Note: koala GPU is shared with the llama-swap LLM stack — run the autoresearch
agent on iguana/berget so the card stays free for train.py.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 16:43:01 +02:00
mathias e616575979 docs: add DECISIONS.md and rewrite PROJECT.md (#8)
CD / Lint / Test / Vet (push) Failing after 5s
CD / Build & Import (push) Has been skipped
CD / Deploy via GitOps (push) Has been skipped
2026-06-22 18:10:32 +00:00
mathias d1193a57c6 Initial commit 2026-05-27 21:55:18 +00:00