From b533743f29dbc2a9c0d2e4dda4d450a6bd223e0a Mon Sep 17 00:00:00 2001 From: Dennis Donaghy Date: Sat, 28 Mar 2026 04:13:33 +0000 Subject: [PATCH 1/3] feat(phase4): add platform tooling for research digest, blockchain tracing, pages dashboard, and ingestion preflight --- .github/workflows/pages-dashboard.yml | 46 ++ docs/MULTIAGENT_OPERATING_MODEL.md | 53 +++ docs/PHASE4_PLATFORM_EXPANSION_PLAN.md | 48 ++ docs/ROADMAP.md | 54 ++- docs/VPS_HARDENING_AND_OPERATIONS.md | 49 ++ frontend/github-pages/README.md | 31 ++ frontend/github-pages/app.js | 113 +++++ frontend/github-pages/data/ARXIV_DIGEST.md | 76 ++++ .../github-pages/data/PAPER_SNAPSHOT.json | 31 ++ .../github-pages/data/PHASE3_ALLOCATOR.json | 141 ++++++ .../github-pages/data/PHASE3_ALLOCATOR.md | 19 + .../data/PHASE3_BACKTEST_MATRIX.json | 286 ++++++++++++ .../data/PHASE3_BACKTEST_MATRIX.md | 20 + .../data/PHASE3_DATA_QUALITY_AUDIT.md | 31 ++ .../data/PHASE3_METHOD_VALIDITY.md | 96 ++++ .../github-pages/data/PHASE3_WALKFORWARD.json | 422 ++++++++++++++++++ .../github-pages/data/PHASE3_WALKFORWARD.md | 37 ++ frontend/github-pages/data/RUN_LEDGER.json | 65 +++ frontend/github-pages/data/RUN_LEDGER.md | 12 + frontend/github-pages/index.html | 82 ++++ frontend/github-pages/scripts/sync_data.sh | 38 ++ frontend/github-pages/styles.css | 44 ++ lean-cli/docs/RUN_LEDGER.json | 65 +++ lean-cli/docs/RUN_LEDGER.md | 12 + .../scripts/backtests/build_run_ledger.py | 82 ++++ research/README_RESEARCH_AUTOMATION.md | 24 + research/arxiv/topics.json | 8 + research/data/ARXIV_DIGEST.md | 76 ++++ research/data/arxiv_digest.jsonl | 68 +++ research/scripts/update_arxiv_digest.py | 202 +++++++++ services/blockchain/README.md | 40 +- .../analysis/scan_solidity_contract.py | 89 ++++ services/blockchain/analysis/trace_btc_tx.py | 80 ++++ services/blockchain/analysis/trace_eth_tx.py | 103 +++++ services/blockchain/hardhat/package.json | 3 +- .../blockchain/hardhat/scripts/introspect.js | 29 ++ services/ingestion/preflight_phase4.py | 75 ++++ services/ingestion/run_all_ingestors.sh | 20 +- services/ingestion/run_phase2_cycle.sh | 19 +- services/ingestion/run_phase3_1_data_lanes.sh | 19 +- services/ingestion/run_phase4_cycle.sh | 30 ++ 41 files changed, 2813 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/pages-dashboard.yml create mode 100644 docs/MULTIAGENT_OPERATING_MODEL.md create mode 100644 docs/PHASE4_PLATFORM_EXPANSION_PLAN.md create mode 100644 docs/VPS_HARDENING_AND_OPERATIONS.md create mode 100644 frontend/github-pages/README.md create mode 100644 frontend/github-pages/app.js create mode 100644 frontend/github-pages/data/ARXIV_DIGEST.md create mode 100644 frontend/github-pages/data/PAPER_SNAPSHOT.json create mode 100644 frontend/github-pages/data/PHASE3_ALLOCATOR.json create mode 100644 frontend/github-pages/data/PHASE3_ALLOCATOR.md create mode 100644 frontend/github-pages/data/PHASE3_BACKTEST_MATRIX.json create mode 100644 frontend/github-pages/data/PHASE3_BACKTEST_MATRIX.md create mode 100644 frontend/github-pages/data/PHASE3_DATA_QUALITY_AUDIT.md create mode 100644 frontend/github-pages/data/PHASE3_METHOD_VALIDITY.md create mode 100644 frontend/github-pages/data/PHASE3_WALKFORWARD.json create mode 100644 frontend/github-pages/data/PHASE3_WALKFORWARD.md create mode 100644 frontend/github-pages/data/RUN_LEDGER.json create mode 100644 frontend/github-pages/data/RUN_LEDGER.md create mode 100644 frontend/github-pages/index.html create mode 100755 frontend/github-pages/scripts/sync_data.sh create mode 100644 frontend/github-pages/styles.css create mode 100644 lean-cli/docs/RUN_LEDGER.json create mode 100644 lean-cli/docs/RUN_LEDGER.md create mode 100755 lean-cli/scripts/backtests/build_run_ledger.py create mode 100644 research/README_RESEARCH_AUTOMATION.md create mode 100644 research/arxiv/topics.json create mode 100644 research/data/ARXIV_DIGEST.md create mode 100644 research/data/arxiv_digest.jsonl create mode 100755 research/scripts/update_arxiv_digest.py create mode 100755 services/blockchain/analysis/scan_solidity_contract.py create mode 100755 services/blockchain/analysis/trace_btc_tx.py create mode 100755 services/blockchain/analysis/trace_eth_tx.py create mode 100644 services/blockchain/hardhat/scripts/introspect.js create mode 100755 services/ingestion/preflight_phase4.py create mode 100755 services/ingestion/run_phase4_cycle.sh diff --git a/.github/workflows/pages-dashboard.yml b/.github/workflows/pages-dashboard.yml new file mode 100644 index 0000000..2c2ca30 --- /dev/null +++ b/.github/workflows/pages-dashboard.yml @@ -0,0 +1,46 @@ +name: Deploy Quant Dashboard (GitHub Pages) + +on: + push: + branches: [main] + paths: + - 'frontend/github-pages/**' + - 'lean-cli/docs/**' + - 'research/data/**' + - 'services/ingestion/sample_*_snapshot.json' + - '.github/workflows/pages-dashboard.yml' + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: true + +jobs: + deploy: + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Sync dashboard data + run: bash frontend/github-pages/scripts/sync_data.sh + + - name: Setup Pages + uses: actions/configure-pages@v5 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: frontend/github-pages + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/docs/MULTIAGENT_OPERATING_MODEL.md b/docs/MULTIAGENT_OPERATING_MODEL.md new file mode 100644 index 0000000..a9d0fc7 --- /dev/null +++ b/docs/MULTIAGENT_OPERATING_MODEL.md @@ -0,0 +1,53 @@ +# Multi-Agent Operating Model (Quant Platform) + +## Objective +Use specialized agents to speed up iteration without losing rigor or auditability. + +## Agent Roles + +1. **Data Agent** + - Owns ingestion jobs, schema validation, data quality checks. + - Produces freshness/gap reports and replay artifacts. + +2. **Strategy Agent** + - Owns sleeve code changes and signal logic. + - Must attach matrix + walk-forward evidence for every strategy PR. + +3. **Execution Agent** + - Owns paper-trade connectors, order-state safety, slippage realism. + - Validates fill semantics and risk controls. + +4. **Research Agent** + - Owns paper curation and hypothesis queue. + - Delivers token-efficient digest updates and evidence mapping. + +5. **Governance Agent** + - Owns repo health, CI policies, branch protection, changelog quality. + - Runs org audit scripts and tracks risk score deltas. + +## Hand-off Contract +Every agent hand-off must include: +- objective, +- changed files, +- reproducible command list, +- artifact output paths, +- known caveats. + +## Definition of Done (DoD) +A strategy change is only done if all are present: +1. Matrix run artifact +2. Walk-forward artifact +3. Data quality statement +4. Risk/cost caveats +5. PR summary with exact file paths + +## Escalation Rules +- If OOS net <= 0 in >= 2 windows: sleeve marked **candidate off**. +- If data requests failure > 2%: no new alpha claims until resolved. +- If CI/governance risk score rises: freeze merges except remediation. + +## Cadence +- Daily: data freshness + paper snapshot checks +- 2-3x weekly: strategy matrix reruns for active sleeves +- Weekly: walk-forward and allocator refresh +- Monthly: governance + security hardening review diff --git a/docs/PHASE4_PLATFORM_EXPANSION_PLAN.md b/docs/PHASE4_PLATFORM_EXPANSION_PLAN.md new file mode 100644 index 0000000..f6ffec7 --- /dev/null +++ b/docs/PHASE4_PLATFORM_EXPANSION_PLAN.md @@ -0,0 +1,48 @@ +# Phase 4 Platform Expansion Plan + +## User goals addressed +- Strong quantitative strategy system with valid evaluation +- Execution + data ingest/transform/access tooling +- Secure VPS operations +- Move toward multi-agent operating model +- Interactive GitHub Pages frontend for strategy/portfolio/report visibility +- Token-efficient research loop (ArXiv and beyond) +- On-chain transaction tracing + Solidity analysis lane + +## What is implemented now + +### Quant strategy/eval lane +- Reproducible matrix, tuning, OOS, walk-forward, allocator, run ledger scripts. +- Methodology validity and data quality reports committed. + +### Data tooling +- Ingestion runners + validation layer + new Phase 4 cycle runner. +- Added preflight script with auth-level DB check. + +### Research tooling (token-efficient) +- `research/scripts/update_arxiv_digest.py` (no LLM usage; metadata scoring). +- ArXiv topic config and ranked digest outputs. + +### Frontend +- New GitHub Pages dashboard scaffold: + - `frontend/github-pages/index.html` + - `frontend/github-pages/app.js` + - `frontend/github-pages/scripts/sync_data.sh` +- GitHub Actions Pages deploy workflow. + +### Blockchain lane +- Ethereum tx tracer script (RPC-driven; optional debug trace). +- Bitcoin tx flow tracer script (Blockstream API). +- Solidity static risk scanner. +- Hardhat contract introspection script. + +## Immediate blockers +1. Postgres credential mismatch for ingestion user (`quant`) causing write failures. +2. Expanded remote LEAN data download blocked until QC org data terms accepted. + +## Next execution order +1. Fix DB auth and re-run full ingestion cycle. +2. Accept QC terms and run expanded data pull. +3. Re-run Phase 3 matrix/walk-forward on expanded data horizon. +4. Add confidence intervals + cost stress framework. +5. Promote only sleeves that pass robustness thresholds. diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index c08e6a1..5f5ecd2 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -1,19 +1,51 @@ # MultiClaw Quant Roadmap -## Phase 1 — Proven baseline (in progress) +## Phase 1 — Proven baseline (complete) - [x] LEAN setup and authenticated execution - [x] Baseline backtest run and artifact generation - [x] Postgres + Hasura + Qdrant stack online - [x] Backtest summary ingestion + GraphQL query validation -## Phase 2 — Data productization -- [ ] Robust ingestion for bars/options/index options/futures -- [ ] Continuous greeks snapshot pipeline -- [ ] Data quality checks with alerting -- [ ] Idempotent replay/recovery tooling +## Phase 2 — Data productization (in progress) +- [x] Multi-source ingestion skeleton (equities/options/crypto/macro) +- [x] Pydantic validation layer for ingest payloads +- [x] Replayable ingestion shell runners +- [ ] Continuous, monitored quality checks + alerting +- [ ] Idempotent replay/recovery with quarantine reprocess UI -## Phase 3 — Strategy intelligence -- [ ] Regime-aware signal library -- [ ] Scenario engine and stress testing APIs -- [ ] Portfolio/risk dashboards with near real-time updates -- [ ] Research-to-production model lifecycle integration with MLflow +## Phase 3 — Strategy intelligence (in progress) +- [x] Sleeve set: baseline/regime/statarb/options/anchored-vwap +- [x] Reproducible matrix scripts +- [x] Walk-forward stability scripts +- [x] Methodology validity report + caveats +- [ ] Cost-stress confidence intervals and bootstrap significance +- [ ] Expanded data horizon (post-2021, pending QC terms acceptance) + +## Phase 4 — Production quant platform hardening (active) +- [x] Org GitHub governance baseline (branch protection + CI hygiene) +- [x] Multi-repo health audit tooling +- [x] Phase 3 infra hardening in OpenClaw fallback model chain +- [ ] VPS hardening scorecard automation (OS patching/firewall/least-privilege) +- [ ] Unified run ledger: backtest + paper-trade + improvement lineage graph +- [ ] Multi-agent orchestration playbook and role contracts + +## Phase 5 — Execution & observability product +- [ ] GitHub Pages interactive dashboard for: + - strategy roster + code links + - latest matrix/walk-forward metrics + - paper portfolio snapshots + - run logs and analysis changelog +- [ ] RPC/GraphQL endpoints powering dashboard with signed read-only access +- [ ] Nightly/weekly report generation with provenance hashes + +## Phase 6 — On-chain alpha lane (BTC/ETH) +- [ ] Ethereum transaction tracing toolkit (receipt/log/call-trace support) +- [ ] Bitcoin UTXO flow tracing toolkit +- [ ] Solidity static risk scanner + Hardhat introspection workflow +- [ ] Event-driven on-chain feature extraction for quant models + +## Phase 7 — Token-efficient research machine +- [ ] ArXiv/SSRN digest updater with topic scoring and dedup +- [ ] Minimal-token abstract triage and backlog ranking +- [ ] Strategy-to-paper mapping and evidence matrix +- [ ] Auto-generated “research changed what in code?” traceability notes diff --git a/docs/VPS_HARDENING_AND_OPERATIONS.md b/docs/VPS_HARDENING_AND_OPERATIONS.md new file mode 100644 index 0000000..3d54d7f --- /dev/null +++ b/docs/VPS_HARDENING_AND_OPERATIONS.md @@ -0,0 +1,49 @@ +# VPS Hardening & Operations Checklist + +## Current status (2026-03-28) + +### OpenClaw +- Gateway running and reachable locally. +- Phase 3 fallback-chain hardening applied (small-model fallback removed). +- Remaining warning: reverse proxy trusted headers not configured (safe if local-only UI). + +### Quant stack +- Strategy matrix / walk-forward / allocator pipelines operational. +- Ingestion lane scripts now use dynamic repo-root resolution (portable across paths). +- Phase 4 cycle runner available: `services/ingestion/run_phase4_cycle.sh`. + +### Blocking issue +- Postgres auth mismatch for ingestion user `quant`. +- Symptom from preflight: + - `postgres_tcp_5432`: OK + - `postgres_auth_query`: FAIL (password authentication failed) + +## Immediate fix sequence + +1. Validate DB credentials in `infra/.env` + `.secrets`. +2. Test manually: + ```bash + PGPASSWORD='' psql -h 127.0.0.1 -U quant -d quant -c 'select 1;' + ``` +3. If invalid, rotate/reset user password in Postgres and update secrets source. +4. Re-run preflight: + ```bash + bash services/ingestion/run_phase4_cycle.sh + ``` + +## Security controls to enforce + +- OS patching cadence (weekly, unattended upgrades where appropriate) +- UFW/NFT firewall: only required ports open +- SSH hardening: key-only auth, fail2ban, no root login +- Secrets policy: no plaintext secrets in repo; use env/secrets files with strict perms +- Backups: encrypted daily snapshots for DB + strategy artifacts +- Monitoring: basic process and disk alerts + +## Operational cadence + +- Daily: run Phase 4 cycle + inspect preflight + ingestion results +- 2-3x weekly: backtest matrix refresh +- Weekly: walk-forward + allocator refresh +- Weekly: `openclaw security audit --deep` +- Monthly: vulnerability scan + dependency upgrades diff --git a/frontend/github-pages/README.md b/frontend/github-pages/README.md new file mode 100644 index 0000000..99b1345 --- /dev/null +++ b/frontend/github-pages/README.md @@ -0,0 +1,31 @@ +# Quant GitHub Pages Dashboard + +Static interactive dashboard for market/portfolio/strategy visibility. + +## What it shows +- Strategy matrix and walk-forward reports +- Sleeve allocator outputs +- Methodology and data quality docs +- Paper-trading snapshot JSON (if present) + +## Local preview + +```bash +cd frontend/github-pages +python3 -m http.server 8080 +# open http://localhost:8080 +``` + +## Refresh dashboard data + +From repo root: + +```bash +bash frontend/github-pages/scripts/sync_data.sh +``` + +This copies latest docs JSON/MD artifacts into `frontend/github-pages/data/`. + +## GitHub Pages +- Set repository Pages source to `frontend/github-pages` (or publish this folder via Actions). +- Dashboard works with static JSON/MD files only; no backend required. diff --git a/frontend/github-pages/app.js b/frontend/github-pages/app.js new file mode 100644 index 0000000..fd9b113 --- /dev/null +++ b/frontend/github-pages/app.js @@ -0,0 +1,113 @@ +async function fetchJson(path) { + const r = await fetch(path, { cache: 'no-store' }); + if (!r.ok) throw new Error(`${path}: ${r.status}`); + return r.json(); +} + +function cell(tr, text) { + const td = document.createElement('td'); + td.textContent = text ?? ''; + tr.appendChild(td); +} + +function addRow(tbody, values) { + const tr = document.createElement('tr'); + values.forEach(v => cell(tr, v)); + tbody.appendChild(tr); +} + +async function loadStrategyMatrix() { + const data = await fetchJson('data/PHASE3_BACKTEST_MATRIX.json'); + const tbody = document.querySelector('#strategy-table tbody'); + tbody.innerHTML = ''; + for (const row of data) { + const s = row.stats || {}; + addRow(tbody, [ + row.project, + row.scenario, + s['Net Profit'], + s['Sharpe Ratio'], + s['Drawdown'], + s['Total Orders'] + ]); + } +} + +async function loadWalkforward() { + const data = await fetchJson('data/PHASE3_WALKFORWARD.json'); + const tbody = document.querySelector('#walk-table tbody'); + tbody.innerHTML = ''; + for (const row of data) { + const s = row.stats || {}; + addRow(tbody, [ + row.sleeve, + row.window, + s['Net Profit'], + s['Sharpe Ratio'], + s['Drawdown'], + s['Total Orders'] + ]); + } +} + +async function loadAllocator() { + const data = await fetchJson('data/PHASE3_ALLOCATOR.json'); + const tbody = document.querySelector('#alloc-table tbody'); + tbody.innerHTML = ''; + + const selected = data.selected || {}; + const scores = data.scores || {}; + const weights = data.weights || {}; + + for (const sleeve of Object.keys(weights)) { + addRow(tbody, [ + sleeve, + (selected[sleeve] || {}).scenario || 'n/a', + weights[sleeve]?.toFixed?.(4) ?? weights[sleeve], + scores[sleeve]?.toFixed?.(4) ?? scores[sleeve] + ]); + } +} + +async function loadPaperSnapshot() { + try { + const data = await fetchJson('data/PAPER_SNAPSHOT.json'); + document.getElementById('paper-json').textContent = JSON.stringify(data, null, 2); + } catch (_) { + document.getElementById('paper-json').textContent = 'No paper snapshot found in data/PAPER_SNAPSHOT.json'; + } +} + +function renderArtifacts() { + const div = document.getElementById('artifact-list'); + div.innerHTML = ` + + `; +} + +async function main() { + renderArtifacts(); + const errors = []; + + for (const fn of [loadStrategyMatrix, loadWalkforward, loadAllocator, loadPaperSnapshot]) { + try { + await fn(); + } catch (e) { + errors.push(String(e)); + } + } + + if (errors.length) { + console.warn('Dashboard load warnings:', errors); + } +} + +main(); diff --git a/frontend/github-pages/data/ARXIV_DIGEST.md b/frontend/github-pages/data/ARXIV_DIGEST.md new file mode 100644 index 0000000..dd15154 --- /dev/null +++ b/frontend/github-pages/data/ARXIV_DIGEST.md @@ -0,0 +1,76 @@ +# ArXiv Quant Digest + +Generated: 2026-03-28T04:08:32.099902+00:00 + +Token-efficient mode: metadata scoring only (no LLM summarization). + +| Rank | Topic | Score | Published | Title | URL | +|---:|---|---:|---|---|---| +| 1 | portfolio_regime | 7.035 | 2026-03-24 | Designing Agentic AI-Based Screening for Portfolio Investment | https://arxiv.org/abs/2603.23300v1 | +| 2 | portfolio_regime | 6.795 | 2026-03-26 | Modeling and Forecasting Tail Risk Spillovers: A Component-Based CAViaR Approach | https://arxiv.org/abs/2603.25217v1 | +| 3 | options_vol_surface | 6.501 | 2026-03-17 | Shallow Representation of Option Implied Information | https://arxiv.org/abs/2603.17151v1 | +| 4 | portfolio_regime | 6.040 | 2026-03-25 | The Geometry of Risk: Path-Dependent Regulation and Anticipatory Hedging via the SigSwap | https://arxiv.org/abs/2603.24154v1 | +| 5 | portfolio_regime | 6.016 | 2026-03-20 | If Not Now, Then When? Model Risk in the Optimal Exercise of American Options | https://arxiv.org/abs/2603.19984v1 | +| 6 | crypto_market_structure | 5.785 | 2026-03-24 | Stablecoins as Dry Powder: A Copula-Based Risk Analysis of Cryptocurrency Markets | https://arxiv.org/abs/2603.23480v1 | +| 7 | execution_microstructure | 5.540 | 2026-03-25 | Bridging the Reality Gap in Limit Order Book Simulation | https://arxiv.org/abs/2603.24137v1 | +| 8 | crypto_market_structure | 5.540 | 2026-03-26 | Decoding Market Emotions in Cryptocurrency Tweets via Predictive Statement Classification with Machine Learning and Transformers | https://arxiv.org/abs/2603.24933v1 | +| 9 | options_vol_surface | 5.456 | 2026-03-08 | Differential Machine Learning for 0DTE Options with Stochastic Volatility and Jumps | https://arxiv.org/abs/2603.07600v1 | +| 10 | portfolio_regime | 4.766 | 2026-03-21 | Outperforming a Benchmark with $α$-Bregman Wasserstein divergence | https://arxiv.org/abs/2603.20580v1 | +| 11 | trend_momentum | 4.632 | 2026-02-21 | Overreaction as an indicator for momentum in algorithmic trading: A Case of AAPL stocks | https://arxiv.org/abs/2602.18912v1 | +| 12 | portfolio_regime | 4.280 | 2026-03-23 | Mean Field Equilibrium Asset Pricing Models With Exponential Utility | https://arxiv.org/abs/2603.22058v1 | +| 13 | execution_microstructure | 4.275 | 2026-03-22 | FinRL-X: An AI-Native Modular Infrastructure for Quantitative Trading | https://arxiv.org/abs/2603.21330v1 | +| 14 | trend_momentum | 3.961 | 2026-03-09 | Spectral Portfolio Theory: From SGD Weight Matrices to Wealth Dynamics | https://arxiv.org/abs/2603.09006v1 | +| 15 | trend_momentum | 3.932 | 2026-03-03 | Range-Based Volatility Estimators for Monitoring Market Stress: Evidence from Local Food Price Data | https://arxiv.org/abs/2603.02898v1 | +| 16 | portfolio_regime | 3.795 | 2026-03-26 | Semi-Static Variance-Optimal Hedging of Covariance Risk in Multi-Asset Derivatives | https://arxiv.org/abs/2603.25320v1 | +| 17 | portfolio_regime | 3.785 | 2026-03-24 | Portfolio Optimization under Recursive Utility via Reinforcement Learning | https://arxiv.org/abs/2603.22880v1 | +| 18 | trend_momentum | 3.746 | 2026-03-16 | Hyper-Adaptive Momentum Dynamics for Native Cubic Portfolio Optimization: Avoiding Quadratization Distortion in Higher-Order Cardinality-Constrained Search | https://arxiv.org/abs/2603.15947v1 | +| 19 | portfolio_regime | 3.530 | 2026-03-23 | Mislearning of Factor Risk Premia under Structural Breaks: A Misspecified Bayesian Learning Framework | https://arxiv.org/abs/2603.21672v2 | +| 20 | execution_microstructure | 3.515 | 2026-03-20 | Neural Hidden Markov Model with Adaptive Granularity Attention for High-Frequency Order Flow Modeling | https://arxiv.org/abs/2603.20456v1 | +| 21 | portfolio_regime | 3.515 | 2026-03-20 | Optimal Hedge Ratio for Delta-Neutral Liquidity Provision under Liquidation Constraints | https://arxiv.org/abs/2603.19716v1 | +| 22 | statarb_pairs | 3.510 | 2026-03-19 | Adaptive Regime-Aware Stock Price Prediction Using Autoencoder-Gated Dual Node Transformers with Reinforcement Learning Control | https://arxiv.org/abs/2603.19136v1 | +| 23 | options_vol_surface | 3.456 | 2026-03-08 | SABR Type Libor (Forward) Market Model (SABR/LMM) with time-dependent skew and smile | https://arxiv.org/abs/2603.07616v1 | +| 24 | options_vol_surface | 3.241 | 2026-03-16 | At-the-money short-time call-price asymptotics for new classes of exponential Lévy models | https://arxiv.org/abs/2603.14760v1 | +| 25 | trend_momentum | 3.216 | 2026-03-10 | Hybrid Hidden Markov Model for Modeling Equity Excess Growth Rate Dynamics: A Discrete-State Approach with Jump-Diffusion | https://arxiv.org/abs/2603.10202v1 | +| 26 | portfolio_regime | 3.045 | 2026-03-26 | Shifting Correlations: How Trade Policy Uncertainty Alters stock-T bill Relationships | https://arxiv.org/abs/2603.25285v1 | +| 27 | portfolio_regime | 3.040 | 2026-03-25 | Ordering results for extreme claim amounts based on random number of claims | https://arxiv.org/abs/2603.24640v1 | +| 28 | portfolio_regime | 3.030 | 2026-03-23 | Proxy-Reliance Control in Conformal Recalibration of One-Sided Value-at-Risk | https://arxiv.org/abs/2603.22569v1 | +| 29 | options_vol_surface | 2.912 | 2026-02-27 | TradeFM: A Generative Foundation Model for Trade-flow and Market Microstructure | https://arxiv.org/abs/2602.23784v1 | +| 30 | trend_momentum | 2.897 | 2026-02-24 | When Alpha Breaks: Two-Level Uncertainty for Safe Deployment of Cross-Sectional Stock Rankers | https://arxiv.org/abs/2603.13252v1 | +| 31 | options_vol_surface | 2.756 | 2026-03-18 | Can Blindfolded LLMs Still Trade? An Anonymization-First Framework for Portfolio Optimization | https://arxiv.org/abs/2603.17692v1 | +| 32 | trend_momentum | 2.734 | 2026-01-22 | Design and Empirical Study of a Large Language Model-Based Multi-Agent Investment System for Chinese Public REITs | https://arxiv.org/abs/2602.00082v1 | +| 33 | options_vol_surface | 2.682 | 2026-03-03 | Same Error, Different Function: The Optimizer as an Implicit Prior in Financial Time Series | https://arxiv.org/abs/2603.02620v1 | +| 34 | trend_momentum | 2.553 | 2026-02-05 | Insider Purchase Signals in Microcap Equities: Gradient Boosting Detection of Abnormal Returns | https://arxiv.org/abs/2602.06198v1 | +| 35 | trend_momentum | 2.549 | 2026-02-04 | Same Returns, Different Risks: How Cryptocurrency Markets Process Infrastructure vs Regulatory Shocks | https://arxiv.org/abs/2602.07046v2 | +| 36 | portfolio_regime | 2.540 | 2026-03-25 | Utility-Invariant Support Selection and Eventwise Decoupling for Simultaneous Independent Multi-Outcome Bets | https://arxiv.org/abs/2603.24064v1 | +| 37 | crypto_market_structure | 2.530 | 2026-03-23 | TrustTrade: Human-Inspired Selective Consensus Reduces Decision Uncertainty in LLM Trading Agents | https://arxiv.org/abs/2603.22567v1 | +| 38 | statarb_pairs | 2.510 | 2026-03-19 | Survivorship Bias in Emerging Market Small-Cap Indices: Evidence from India's NIFTY Smallcap 250 | https://arxiv.org/abs/2603.19380v1 | +| 39 | execution_microstructure | 2.501 | 2026-03-17 | From Natural Language to Executable Option Strategies via Large Language Models | https://arxiv.org/abs/2603.16434v1 | +| 40 | portfolio_regime | 2.295 | 2026-03-26 | Optimal Dividend, Reinsurance, and Capital Injection for Collaborating Business Lines under Model Uncertainty | https://arxiv.org/abs/2603.25350v1 | +| 41 | execution_microstructure | 2.256 | 2026-03-18 | ARTEMIS: A Neuro Symbolic Framework for Economically Constrained Market Dynamics | https://arxiv.org/abs/2603.18107v1 | +| 42 | trend_momentum | 2.241 | 2026-03-15 | Information Propagation Across Investor Types: Transfer Entropy Networks in the Korean Equity Market | https://arxiv.org/abs/2603.20271v1 | +| 43 | options_vol_surface | 2.236 | 2026-03-14 | Conditioning on a Volatility Proxy Compresses the Apparent Timescale of Collective Market Correlation | https://arxiv.org/abs/2603.14072v1 | +| 44 | options_vol_surface | 2.236 | 2026-03-14 | Bid--Ask Martingale Optimal Transport | https://arxiv.org/abs/2603.24605v1 | +| 45 | options_vol_surface | 2.226 | 2026-03-12 | Feynman-Kac Derivatives Pricing on the Full Forward Curve | https://arxiv.org/abs/2603.12375v1 | +| 46 | options_vol_surface | 2.221 | 2026-03-11 | SPX-VIX Risk Computations Via Perturbed Optimal Transport | https://arxiv.org/abs/2603.10857v2 | +| 47 | options_vol_surface | 2.216 | 2026-03-10 | Uncertainty-Aware Deep Hedging | https://arxiv.org/abs/2603.10137v1 | +| 48 | options_vol_surface | 2.137 | 2026-02-22 | Finite Element Solution of the Two-Dimensional Bates Model for Option Pricing Under Stochastic Volatility and Jumps | https://arxiv.org/abs/2602.19092v1 | +| 49 | statarb_pairs | 2.030 | 2026-03-23 | Flexible Information Acquisition in the Kyle Model | https://arxiv.org/abs/2603.21842v1 | +| 50 | statarb_pairs | 2.025 | 2026-03-22 | Approximate Dynamic Programming for Degradation-aware Market Participation of Battery Energy Storage Systems: Bridging Market and Degradation Timescales | https://arxiv.org/abs/2603.21089v1 | +| 51 | trend_momentum | 1.999 | 2026-01-25 | MarketGANs: Multivariate financial time-series data augmentation using generative adversarial networks | https://arxiv.org/abs/2601.17773v1 | +| 52 | options_vol_surface | 1.971 | 2026-03-11 | On Utility Maximization under Multivariate Fake Stationary Affine Volterra Models | https://arxiv.org/abs/2603.11046v1 | +| 53 | options_vol_surface | 1.966 | 2026-03-10 | Two-Factor Hull-White Model Revisited: Correlation Structure for Two-Factor Interest Rate Model in CVA Calculation | https://arxiv.org/abs/2603.20243v1 | +| 54 | trend_momentum | 1.946 | 2026-03-06 | Stock Market Prediction Using Node Transformer Architecture Integrated with BERT Sentiment Analysis | https://arxiv.org/abs/2603.05917v1 | +| 55 | trend_momentum | 1.803 | 2026-02-05 | Algorithmic Monitoring: Measuring Market Stress with Machine Learning | https://arxiv.org/abs/2602.07066v1 | +| 56 | statarb_pairs | 1.795 | 2026-03-26 | Optimal threshold resetting in collective diffusive search | https://arxiv.org/abs/2603.25338v1 | +| 57 | statarb_pairs | 1.790 | 2026-03-25 | Adapting Altman's bankruptcy prediction model to the compositional data methodology | https://arxiv.org/abs/2603.24215v1 | +| 58 | statarb_pairs | 1.790 | 2026-03-25 | Dynamical thermalization and turbulence in social stratification models | https://arxiv.org/abs/2603.24190v1 | +| 59 | crypto_market_structure | 1.790 | 2026-03-25 | MolEvolve: LLM-Guided Evolutionary Search for Interpretable Molecular Optimization | https://arxiv.org/abs/2603.24382v1 | +| 60 | crypto_market_structure | 1.790 | 2026-03-25 | S$^{3}$G: Stock State Space Graph for Enhanced Stock Trend Prediction | https://arxiv.org/abs/2603.24236v1 | +| 61 | statarb_pairs | 1.785 | 2026-03-24 | Conditionally Identifiable Latent Representation for Multivariate Time Series with Structural Dynamics | https://arxiv.org/abs/2603.22886v1 | +| 62 | crypto_market_structure | 1.785 | 2026-03-24 | Option pricing model under the G-expectation framework | https://arxiv.org/abs/2603.22831v1 | +| 63 | crypto_market_structure | 1.780 | 2026-03-23 | ParlayMarket: Automated Market Making for Parlay-style Joint Contracts | https://arxiv.org/abs/2603.22596v1 | +| 64 | statarb_pairs | 1.770 | 2026-03-21 | Learning to Aggregate Zero-Shot LLM Agents for Corporate Disclosure Classification | https://arxiv.org/abs/2603.20965v1 | +| 65 | statarb_pairs | 1.766 | 2026-03-20 | Large Language Models and Stock Investing: Is the Human Factor Required? | https://arxiv.org/abs/2603.19944v1 | +| 66 | execution_microstructure | 1.751 | 2026-03-17 | Open vs. Sealed: Auction Format Choice for Maximal Extractable Value | https://arxiv.org/abs/2603.16333v1 | +| 67 | trend_momentum | 1.647 | 2026-02-24 | Stochastic Discount Factors with Cross-Asset Spillovers | https://arxiv.org/abs/2602.20856v1 | +| 68 | trend_momentum | 1.484 | 2026-01-22 | A Nonlinear Target-Factor Model with Attention Mechanism for Mixed-Frequency Data | https://arxiv.org/abs/2601.16274v1 | \ No newline at end of file diff --git a/frontend/github-pages/data/PAPER_SNAPSHOT.json b/frontend/github-pages/data/PAPER_SNAPSHOT.json new file mode 100644 index 0000000..db8365f --- /dev/null +++ b/frontend/github-pages/data/PAPER_SNAPSHOT.json @@ -0,0 +1,31 @@ +{ + "as_of": "2026-03-01T04:30:00Z", + "account": { + "status": "ACTIVE", + "base_currency": "USD", + "equity": 100000 + }, + "positions": [ + { + "symbol": "QQQ", + "qty": 5, + "avg_entry_price": 441.2, + "market_price": 442.0, + "market_value": 2210.0, + "unrealized_pl": 4.0 + } + ], + "orders": [ + { + "id": "tradier-paper-ord-001", + "symbol": "QQQ", + "side": "buy", + "type": "limit", + "status": "open", + "qty": 5, + "filled_qty": 0, + "submitted_at": "2026-03-01T04:22:00Z", + "updated_at": "2026-03-01T04:22:00Z" + } + ] +} diff --git a/frontend/github-pages/data/PHASE3_ALLOCATOR.json b/frontend/github-pages/data/PHASE3_ALLOCATOR.json new file mode 100644 index 0000000..38ced4c --- /dev/null +++ b/frontend/github-pages/data/PHASE3_ALLOCATOR.json @@ -0,0 +1,141 @@ +{ + "generated_at": "2026-03-28T03:17:00.674823+00:00", + "matrix_source": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/docs/PHASE3_BACKTEST_MATRIX_2026-03-28_phase3_matrix.json", + "selected": { + "baseline-strategy": { + "project": "baseline-strategy", + "scenario": "baseline_phase3_oos", + "params": { + "start_year": "2019", + "end_year": "2021", + "risk_per_trade": "0.004", + "max_positions": "6" + }, + "status_code": 0, + "duration_sec": 28.61, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/baseline-strategy/backtests/2026-03-28_phase3_matrix/baseline_phase3_oos", + "stats": { + "Total Orders": "72", + "Net Profit": "3.019%", + "End Equity": "103018.94", + "Drawdown": "3.200%", + "Sharpe Ratio": "-0.325", + "Sortino Ratio": "-0.136", + "Total Fees": "$31.46", + "Portfolio Turnover": "0.56%" + } + }, + "regime-ensemble-alpha": { + "project": "regime-ensemble-alpha", + "scenario": "regime_phase3_core", + "params": { + "start_year": "2014", + "end_year": "2020", + "include_crypto": "false", + "risk_tickers": "SPY,QQQ,IWM,EEM,AAPL,BAC,IBM,GOOG", + "def_tickers": "USO,BNO" + }, + "status_code": 0, + "duration_sec": 60.52, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/regime-ensemble-alpha/backtests/2026-03-28_phase3_matrix/regime_phase3_core", + "stats": { + "Total Orders": "1421", + "Net Profit": "24.228%", + "End Equity": "124227.61", + "Drawdown": "9.500%", + "Sharpe Ratio": "0.185", + "Sortino Ratio": "0.182", + "Total Fees": "$511.59", + "Portfolio Turnover": "2.26%" + } + }, + "anchored-vwap-sleeve": { + "project": "anchored-vwap-sleeve", + "scenario": "avwap_phase3_conservative", + "params": { + "start_year": "2014", + "end_year": "2020", + "include_crypto": "false", + "equity_tickers": "SPY,QQQ,IWM,EEM,AAPL,BAC,IBM,USO,BNO", + "risk_per_trade": "0.0025", + "max_positions": "2", + "max_position_weight": "0.10", + "entry_gap_pct_max": "0.03", + "max_entries_per_day": "1" + }, + "status_code": 0, + "duration_sec": 26.03, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/anchored-vwap-sleeve/backtests/2026-03-28_phase3_matrix/avwap_phase3_conservative", + "stats": { + "Total Orders": "1136", + "Net Profit": "-1.582%", + "End Equity": "98418.27", + "Drawdown": "6.100%", + "Sharpe Ratio": "-1.034", + "Sortino Ratio": "-0.67", + "Total Fees": "$326.69", + "Portfolio Turnover": "2.25%" + } + }, + "statarb-spread-engine": { + "project": "statarb-spread-engine", + "scenario": "statarb_phase3_oos", + "params": { + "start_year": "2019", + "end_year": "2021" + }, + "status_code": 0, + "duration_sec": 57.29, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/statarb-spread-engine/backtests/2026-03-28_phase3_matrix/statarb_phase3_oos", + "stats": { + "Total Orders": "20", + "Net Profit": "-0.090%", + "End Equity": "99909.59", + "Drawdown": "0.100%", + "Sharpe Ratio": "-29.083", + "Sortino Ratio": "-5.314", + "Total Fees": "$20.00", + "Portfolio Turnover": "0.02%" + } + }, + "options-greeks-vix": { + "project": "options-greeks-vix", + "scenario": "options_phase3_fallback", + "params": { + "start_year": "2014", + "end_year": "2015", + "enable_options": "false", + "fallback_equity_mode": "true", + "option_underlying_ticker": "AAPL", + "underlying_ticker": "SPY" + }, + "status_code": 0, + "duration_sec": 20.46, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/options-greeks-vix/backtests/2026-03-28_phase3_matrix/options_phase3_fallback", + "stats": { + "Total Orders": "7", + "Net Profit": "3.170%", + "End Equity": "103169.76", + "Drawdown": "2.700%", + "Sharpe Ratio": "0.154", + "Sortino Ratio": "0.168", + "Total Fees": "$7.01", + "Portfolio Turnover": "0.19%" + } + } + }, + "scores": { + "baseline-strategy": 0.6368203125, + "regime-ensemble-alpha": 3.022124210526316, + "anchored-vwap-sleeve": 0.0, + "statarb-spread-engine": 0.0, + "options-greeks-vix": 1.3548814814814814 + }, + "weights": { + "baseline-strategy": 0.1270128464624524, + "regime-ensemble-alpha": 0.6027580948778846, + "anchored-vwap-sleeve": 0.0, + "statarb-spread-engine": 0.0, + "options-greeks-vix": 0.270229058659663 + } +} \ No newline at end of file diff --git a/frontend/github-pages/data/PHASE3_ALLOCATOR.md b/frontend/github-pages/data/PHASE3_ALLOCATOR.md new file mode 100644 index 0000000..6ec1858 --- /dev/null +++ b/frontend/github-pages/data/PHASE3_ALLOCATOR.md @@ -0,0 +1,19 @@ +# Phase 3 Sleeve Allocator — 2026-03-28_phase3_allocator + +Generated: 2026-03-28T03:17:00.674823+00:00 + +Source matrix: `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/docs/PHASE3_BACKTEST_MATRIX_2026-03-28_phase3_matrix.json` +JSON artifact: `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/docs/PHASE3_SLEEVE_ALLOCATOR_2026-03-28_phase3_allocator.json` + +| Sleeve | Selected Scenario | Net Profit | Sharpe | Drawdown | Score | Suggested Weight | +|---|---|---:|---:|---:|---:|---:| +| baseline-strategy | baseline_phase3_oos | 3.019% | -0.325 | 3.200% | 0.6368 | 0.1270 | +| regime-ensemble-alpha | regime_phase3_core | 24.228% | 0.185 | 9.500% | 3.0221 | 0.6028 | +| anchored-vwap-sleeve | avwap_phase3_conservative | -1.582% | -1.034 | 6.100% | 0.0000 | 0.0000 | +| statarb-spread-engine | statarb_phase3_oos | -0.090% | -29.083 | 0.100% | 0.0000 | 0.0000 | +| options-greeks-vix | options_phase3_fallback | 3.170% | 0.154 | 2.700% | 1.3549 | 0.2702 | + +## Allocation Rule +- Zero weight if net profit <= 0 or drawdown > 20%. +- Otherwise score = (net% * (1 + sharpe_clamped)) / drawdown%. +- Normalize positive scores to 100% total. \ No newline at end of file diff --git a/frontend/github-pages/data/PHASE3_BACKTEST_MATRIX.json b/frontend/github-pages/data/PHASE3_BACKTEST_MATRIX.json new file mode 100644 index 0000000..a8fdcff --- /dev/null +++ b/frontend/github-pages/data/PHASE3_BACKTEST_MATRIX.json @@ -0,0 +1,286 @@ +[ + { + "project": "baseline-strategy", + "scenario": "baseline_phase3_core", + "params": { + "start_year": "2018", + "end_year": "2020", + "risk_per_trade": "0.004", + "max_positions": "6" + }, + "status_code": 0, + "duration_sec": 37.99, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/baseline-strategy/backtests/2026-03-28_phase3_matrix/baseline_phase3_core", + "stats": { + "Total Orders": "73", + "Net Profit": "2.692%", + "End Equity": "102691.64", + "Drawdown": "3.200%", + "Sharpe Ratio": "-0.799", + "Sortino Ratio": "-0.365", + "Total Fees": "$32.82", + "Portfolio Turnover": "0.59%" + } + }, + { + "project": "baseline-strategy", + "scenario": "baseline_phase3_oos", + "params": { + "start_year": "2019", + "end_year": "2021", + "risk_per_trade": "0.004", + "max_positions": "6" + }, + "status_code": 0, + "duration_sec": 28.61, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/baseline-strategy/backtests/2026-03-28_phase3_matrix/baseline_phase3_oos", + "stats": { + "Total Orders": "72", + "Net Profit": "3.019%", + "End Equity": "103018.94", + "Drawdown": "3.200%", + "Sharpe Ratio": "-0.325", + "Sortino Ratio": "-0.136", + "Total Fees": "$31.46", + "Portfolio Turnover": "0.56%" + } + }, + { + "project": "regime-ensemble-alpha", + "scenario": "regime_phase3_core", + "params": { + "start_year": "2014", + "end_year": "2020", + "include_crypto": "false", + "risk_tickers": "SPY,QQQ,IWM,EEM,AAPL,BAC,IBM,GOOG", + "def_tickers": "USO,BNO" + }, + "status_code": 0, + "duration_sec": 60.52, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/regime-ensemble-alpha/backtests/2026-03-28_phase3_matrix/regime_phase3_core", + "stats": { + "Total Orders": "1421", + "Net Profit": "24.228%", + "End Equity": "124227.61", + "Drawdown": "9.500%", + "Sharpe Ratio": "0.185", + "Sortino Ratio": "0.182", + "Total Fees": "$511.59", + "Portfolio Turnover": "2.26%" + } + }, + { + "project": "regime-ensemble-alpha", + "scenario": "regime_phase3_oos", + "params": { + "start_year": "2019", + "end_year": "2021", + "include_crypto": "false", + "risk_tickers": "SPY,QQQ,IWM,EEM,AAPL,BAC,IBM,GOOG", + "def_tickers": "USO,BNO" + }, + "status_code": 0, + "duration_sec": 37.31, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/regime-ensemble-alpha/backtests/2026-03-28_phase3_matrix/regime_phase3_oos", + "stats": { + "Total Orders": "527", + "Net Profit": "22.557%", + "End Equity": "122557.40", + "Drawdown": "9.000%", + "Sharpe Ratio": "0.717", + "Sortino Ratio": "0.6", + "Total Fees": "$195.09", + "Portfolio Turnover": "1.99%" + } + }, + { + "project": "anchored-vwap-sleeve", + "scenario": "avwap_phase3_core", + "params": { + "start_year": "2014", + "end_year": "2020", + "include_crypto": "false", + "equity_tickers": "SPY,QQQ,IWM,EEM,AAPL,BAC,IBM,USO,BNO" + }, + "status_code": 0, + "duration_sec": 24.88, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/anchored-vwap-sleeve/backtests/2026-03-28_phase3_matrix/avwap_phase3_core", + "stats": { + "Total Orders": "1209", + "Net Profit": "-3.084%", + "End Equity": "96915.69", + "Drawdown": "7.200%", + "Sharpe Ratio": "-0.883", + "Sortino Ratio": "-0.586", + "Total Fees": "$406.23", + "Portfolio Turnover": "3.00%" + } + }, + { + "project": "anchored-vwap-sleeve", + "scenario": "avwap_phase3_conservative", + "params": { + "start_year": "2014", + "end_year": "2020", + "include_crypto": "false", + "equity_tickers": "SPY,QQQ,IWM,EEM,AAPL,BAC,IBM,USO,BNO", + "risk_per_trade": "0.0025", + "max_positions": "2", + "max_position_weight": "0.10", + "entry_gap_pct_max": "0.03", + "max_entries_per_day": "1" + }, + "status_code": 0, + "duration_sec": 26.03, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/anchored-vwap-sleeve/backtests/2026-03-28_phase3_matrix/avwap_phase3_conservative", + "stats": { + "Total Orders": "1136", + "Net Profit": "-1.582%", + "End Equity": "98418.27", + "Drawdown": "6.100%", + "Sharpe Ratio": "-1.034", + "Sortino Ratio": "-0.67", + "Total Fees": "$326.69", + "Portfolio Turnover": "2.25%" + } + }, + { + "project": "anchored-vwap-sleeve", + "scenario": "avwap_phase3_oos", + "params": { + "start_year": "2019", + "end_year": "2021", + "include_crypto": "false", + "equity_tickers": "SPY,QQQ,IWM,EEM,AAPL,BAC,IBM,USO,BNO" + }, + "status_code": 0, + "duration_sec": 20.39, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/anchored-vwap-sleeve/backtests/2026-03-28_phase3_matrix/avwap_phase3_oos", + "stats": { + "Total Orders": "471", + "Net Profit": "-3.880%", + "End Equity": "96120.21", + "Drawdown": "4.300%", + "Sharpe Ratio": "-1.049", + "Sortino Ratio": "-0.631", + "Total Fees": "$140.98", + "Portfolio Turnover": "2.24%" + } + }, + { + "project": "statarb-spread-engine", + "scenario": "statarb_phase3_core", + "params": { + "start_year": "2014", + "end_year": "2020" + }, + "status_code": 0, + "duration_sec": 70.16, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/statarb-spread-engine/backtests/2026-03-28_phase3_matrix/statarb_phase3_core", + "stats": { + "Total Orders": "40", + "Net Profit": "-0.097%", + "End Equity": "99903.27", + "Drawdown": "0.100%", + "Sharpe Ratio": "-44.725", + "Sortino Ratio": "-8.075", + "Total Fees": "$40.00", + "Portfolio Turnover": "0.02%" + } + }, + { + "project": "statarb-spread-engine", + "scenario": "statarb_phase3_tighter", + "params": { + "start_year": "2014", + "end_year": "2020", + "entry_z": "3.2", + "min_edge_z": "1.8", + "roundtrip_cost_pct": "0.0022", + "pair_risk_pct": "0.02" + }, + "status_code": 0, + "duration_sec": 70.6, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/statarb-spread-engine/backtests/2026-03-28_phase3_matrix/statarb_phase3_tighter", + "stats": { + "Total Orders": "32", + "Net Profit": "-0.133%", + "End Equity": "99866.80", + "Drawdown": "0.200%", + "Sharpe Ratio": "-64.99", + "Sortino Ratio": "-10.361", + "Total Fees": "$32.00", + "Portfolio Turnover": "0.01%" + } + }, + { + "project": "statarb-spread-engine", + "scenario": "statarb_phase3_oos", + "params": { + "start_year": "2019", + "end_year": "2021" + }, + "status_code": 0, + "duration_sec": 57.29, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/statarb-spread-engine/backtests/2026-03-28_phase3_matrix/statarb_phase3_oos", + "stats": { + "Total Orders": "20", + "Net Profit": "-0.090%", + "End Equity": "99909.59", + "Drawdown": "0.100%", + "Sharpe Ratio": "-29.083", + "Sortino Ratio": "-5.314", + "Total Fees": "$20.00", + "Portfolio Turnover": "0.02%" + } + }, + { + "project": "options-greeks-vix", + "scenario": "options_phase3_core", + "params": { + "start_year": "2014", + "end_year": "2015", + "enable_options": "true", + "option_underlying_ticker": "AAPL", + "underlying_ticker": "SPY" + }, + "status_code": 0, + "duration_sec": 29.26, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/options-greeks-vix/backtests/2026-03-28_phase3_matrix/options_phase3_core", + "stats": { + "Total Orders": "21", + "Net Profit": "2.776%", + "End Equity": "102776.15", + "Drawdown": "2.600%", + "Sharpe Ratio": "0.099", + "Sortino Ratio": "0.107", + "Total Fees": "$21.03", + "Portfolio Turnover": "0.57%" + } + }, + { + "project": "options-greeks-vix", + "scenario": "options_phase3_fallback", + "params": { + "start_year": "2014", + "end_year": "2015", + "enable_options": "false", + "fallback_equity_mode": "true", + "option_underlying_ticker": "AAPL", + "underlying_ticker": "SPY" + }, + "status_code": 0, + "duration_sec": 20.46, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/options-greeks-vix/backtests/2026-03-28_phase3_matrix/options_phase3_fallback", + "stats": { + "Total Orders": "7", + "Net Profit": "3.170%", + "End Equity": "103169.76", + "Drawdown": "2.700%", + "Sharpe Ratio": "0.154", + "Sortino Ratio": "0.168", + "Total Fees": "$7.01", + "Portfolio Turnover": "0.19%" + } + } +] \ No newline at end of file diff --git a/frontend/github-pages/data/PHASE3_BACKTEST_MATRIX.md b/frontend/github-pages/data/PHASE3_BACKTEST_MATRIX.md new file mode 100644 index 0000000..90b81c9 --- /dev/null +++ b/frontend/github-pages/data/PHASE3_BACKTEST_MATRIX.md @@ -0,0 +1,20 @@ +# Phase 3 Backtest Matrix — 2026-03-28_phase3_matrix + +Generated: 2026-03-28T03:16:48.835888+00:00 + +JSON: `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/docs/PHASE3_BACKTEST_MATRIX_2026-03-28_phase3_matrix.json` + +| Project | Scenario | Orders | Net Profit | Sharpe | Drawdown | End Equity | Fees | Turnover | Output | +|---|---|---:|---:|---:|---:|---:|---:|---:|---| +| baseline-strategy | baseline_phase3_core | 73 | 2.692% | -0.799 | 3.200% | 102691.64 | $32.82 | 0.59% | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/baseline-strategy/backtests/2026-03-28_phase3_matrix/baseline_phase3_core` | +| baseline-strategy | baseline_phase3_oos | 72 | 3.019% | -0.325 | 3.200% | 103018.94 | $31.46 | 0.56% | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/baseline-strategy/backtests/2026-03-28_phase3_matrix/baseline_phase3_oos` | +| regime-ensemble-alpha | regime_phase3_core | 1421 | 24.228% | 0.185 | 9.500% | 124227.61 | $511.59 | 2.26% | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/regime-ensemble-alpha/backtests/2026-03-28_phase3_matrix/regime_phase3_core` | +| regime-ensemble-alpha | regime_phase3_oos | 527 | 22.557% | 0.717 | 9.000% | 122557.40 | $195.09 | 1.99% | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/regime-ensemble-alpha/backtests/2026-03-28_phase3_matrix/regime_phase3_oos` | +| anchored-vwap-sleeve | avwap_phase3_core | 1209 | -3.084% | -0.883 | 7.200% | 96915.69 | $406.23 | 3.00% | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/anchored-vwap-sleeve/backtests/2026-03-28_phase3_matrix/avwap_phase3_core` | +| anchored-vwap-sleeve | avwap_phase3_conservative | 1136 | -1.582% | -1.034 | 6.100% | 98418.27 | $326.69 | 2.25% | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/anchored-vwap-sleeve/backtests/2026-03-28_phase3_matrix/avwap_phase3_conservative` | +| anchored-vwap-sleeve | avwap_phase3_oos | 471 | -3.880% | -1.049 | 4.300% | 96120.21 | $140.98 | 2.24% | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/anchored-vwap-sleeve/backtests/2026-03-28_phase3_matrix/avwap_phase3_oos` | +| statarb-spread-engine | statarb_phase3_core | 40 | -0.097% | -44.725 | 0.100% | 99903.27 | $40.00 | 0.02% | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/statarb-spread-engine/backtests/2026-03-28_phase3_matrix/statarb_phase3_core` | +| statarb-spread-engine | statarb_phase3_tighter | 32 | -0.133% | -64.99 | 0.200% | 99866.80 | $32.00 | 0.01% | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/statarb-spread-engine/backtests/2026-03-28_phase3_matrix/statarb_phase3_tighter` | +| statarb-spread-engine | statarb_phase3_oos | 20 | -0.090% | -29.083 | 0.100% | 99909.59 | $20.00 | 0.02% | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/statarb-spread-engine/backtests/2026-03-28_phase3_matrix/statarb_phase3_oos` | +| options-greeks-vix | options_phase3_core | 21 | 2.776% | 0.099 | 2.600% | 102776.15 | $21.03 | 0.57% | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/options-greeks-vix/backtests/2026-03-28_phase3_matrix/options_phase3_core` | +| options-greeks-vix | options_phase3_fallback | 7 | 3.170% | 0.154 | 2.700% | 103169.76 | $7.01 | 0.19% | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/options-greeks-vix/backtests/2026-03-28_phase3_matrix/options_phase3_fallback` | \ No newline at end of file diff --git a/frontend/github-pages/data/PHASE3_DATA_QUALITY_AUDIT.md b/frontend/github-pages/data/PHASE3_DATA_QUALITY_AUDIT.md new file mode 100644 index 0000000..0c25e49 --- /dev/null +++ b/frontend/github-pages/data/PHASE3_DATA_QUALITY_AUDIT.md @@ -0,0 +1,31 @@ +# Phase 3 Data Quality Audit + +Generated: 2026-03-28T01:59:59.179460Z + +## Local Equity Daily Coverage + +| Symbol | First Date | Last Date | Bars | +|---|---:|---:|---:| +| SPY | 19980102 00:00 | 20210331 00:00 | 5849 | +| QQQ | 19990310 00:00 | 20210331 00:00 | 3964 | +| IWM | 20000526 00:00 | 20210331 00:00 | 5244 | +| EEM | 19980106 00:00 | 20210331 00:00 | 5245 | +| AAPL | 19980102 00:00 | 20210331 00:00 | 5849 | +| BAC | 19980102 00:00 | 20210331 00:00 | 5849 | +| IBM | 19980102 00:00 | 20210331 00:00 | 5849 | +| GOOG | 20040819 00:00 | 20210331 00:00 | 4183 | +| USO | 19980102 00:00 | 20210331 00:00 | 3910 | +| BNO | 19980102 00:00 | 20210331 00:00 | 3827 | + +## Local Options Data +- Option data files found: **92** + +## Local Crypto Daily Coverage (Coinbase) + +| File | First Date | Last Date | Bars | +|---|---:|---:|---:| +| btcusd_trade.zip | 20141201 00:00 | 20180813 00:00 | 1318 | + +## Remote Data Expansion Probe +- `lean backtest --download-data --data-purchase-limit 0` probe failed before fetch due terms gate on API Data Provider. +- Required action: accept data terms at QuantConnect organization terms URL shown by LEAN error before remote pulls can proceed. \ No newline at end of file diff --git a/frontend/github-pages/data/PHASE3_METHOD_VALIDITY.md b/frontend/github-pages/data/PHASE3_METHOD_VALIDITY.md new file mode 100644 index 0000000..8315090 --- /dev/null +++ b/frontend/github-pages/data/PHASE3_METHOD_VALIDITY.md @@ -0,0 +1,96 @@ +# Phase 3 Methodology & Validity Report (2026-03-28) + +## Objective + +Provide **audit-ready** evidence for algorithm quality without inflating results: +- run reproducible backtests from scripts, +- include weak/negative sleeves (no selective hiding), +- separate matrix/tuning/walk-forward outputs, +- record known data limitations and failure modes. + +## What Was Run + +### 1) Phase 3 matrix (single-pass scenario suite) +- Script: `scripts/backtests/run_phase3_matrix.py` +- Report: `docs/PHASE3_BACKTEST_MATRIX_2026-03-28_phase3_matrix.md` +- JSON: `docs/PHASE3_BACKTEST_MATRIX_2026-03-28_phase3_matrix.json` + +### 2) Sleeve allocator construction (from matrix results) +- Script: `scripts/backtests/build_phase3_sleeve_allocator.py` +- Report: `docs/PHASE3_SLEEVE_ALLOCATOR_2026-03-28_phase3_allocator.md` +- JSON: `docs/PHASE3_SLEEVE_ALLOCATOR_2026-03-28_phase3_allocator.json` + +### 3) Walk-forward stability windows +- Script: `scripts/backtests/run_phase3_walkforward.py` +- Windows: 2014–2016, 2017–2018, 2019–2020 +- Report: `docs/PHASE3_WALKFORWARD_2026-03-28_phase3_walkforward.md` +- JSON: `docs/PHASE3_WALKFORWARD_2026-03-28_phase3_walkforward.json` + +### 4) Data quality audit +- Report: `docs/PHASE3_DATA_QUALITY_AUDIT.md` + +## Integrity Controls Used + +1. **Reproducible scripts, not ad hoc CLI-only claims** + - Every matrix/walk-forward result generated from committed runner scripts. + +2. **No positive-only selection in reports** + - AVWAP and statarb negative performance retained and reported. + +3. **Multiple windows for stability** + - Walk-forward runs show where performance is regime-dependent. + +4. **Hard artifact paths** + - Every scenario row includes exact `backtests/...` output path. + +5. **Known data constraints explicitly documented** + - Local sample coverage ends around 2021 for key equities. + - Remote data pull blocked until QC organization data terms accepted. + +## Main Findings (Plain) + +1. **Regime sleeve improved materially** in this local environment and across recent windows, but has window sensitivity (weak in 2014–2016, stronger in 2019–2020). +2. **Baseline sleeve is modest/low-vol** with mixed Sharpe; it is not fake alpha, just low edge on this data slice. +3. **Options sleeve (and fallback mode) is currently the most consistently positive** across tested windows in this environment. +4. **AVWAP sleeve remains negative across windows** (improved drawdown control, but no edge yet). +5. **Statarb sleeve remains near-flat to negative after costs** (likely insufficient spread edge under current assumptions). + +## Important Caveats + +1. **Local data limitation** + - Results are valid for available local dataset, but not yet “institutional complete” for full-history confidence. + +2. **QC terms gate for remote data expansion** + - `--download-data` run fails until QC organization data terms are accepted. + +3. **Sharpe reliability on low-trade sleeves** + - Very low order counts can produce unstable/extreme Sharpe values (especially statarb). + +4. **Daily-bar model limitations** + - Stop/entry sequencing and gap behavior can diverge from intraday/live execution. + +## Replication Commands + +From `lean-cli/`: + +```bash +python3 scripts/backtests/run_phase3_matrix.py +python3 scripts/backtests/build_phase3_sleeve_allocator.py +python3 scripts/backtests/run_phase3_walkforward.py +``` + +## What Should Be Challenged (by external reviewers) + +If reviewing with Claude/ChatGPT or other peers, challenge these explicitly: +- regime sleeve robustness under different transaction-cost assumptions, +- options sleeve behavior under alternative option-chain quality filters, +- whether AVWAP sleeve needs structural redesign instead of parameter tuning, +- statarb viability after stricter cost and borrow assumptions, +- overfitting risk if selecting only best windows. + +## Next Actions (Phase 4 candidate) + +1. Accept QC data terms and run expanded data pulls. +2. Re-run matrix + walk-forward on expanded dataset. +3. Add cost-stress multipliers and bootstrapped confidence intervals. +4. Keep AVWAP/statarb at zero allocation until they clear minimum robustness thresholds. diff --git a/frontend/github-pages/data/PHASE3_WALKFORWARD.json b/frontend/github-pages/data/PHASE3_WALKFORWARD.json new file mode 100644 index 0000000..207521c --- /dev/null +++ b/frontend/github-pages/data/PHASE3_WALKFORWARD.json @@ -0,0 +1,422 @@ +[ + { + "project": "baseline-strategy", + "sleeve": "baseline", + "window": "2014-2016", + "params": { + "risk_per_trade": "0.004", + "max_positions": "6", + "start_year": "2014", + "end_year": "2016" + }, + "status_code": 0, + "duration_sec": 32.72, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/baseline-strategy/backtests/2026-03-28_phase3_walkforward/baseline_2014_2016", + "stats": { + "Total Orders": "77", + "Net Profit": "-3.118%", + "Sharpe Ratio": "-1.892", + "Drawdown": "3.200%", + "End Equity": "96882.17", + "Total Fees": "$35.75", + "Portfolio Turnover": "0.66%" + } + }, + { + "project": "baseline-strategy", + "sleeve": "baseline", + "window": "2017-2018", + "params": { + "risk_per_trade": "0.004", + "max_positions": "6", + "start_year": "2017", + "end_year": "2018" + }, + "status_code": 0, + "duration_sec": 23.94, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/baseline-strategy/backtests/2026-03-28_phase3_walkforward/baseline_2017_2018", + "stats": { + "Total Orders": "55", + "Net Profit": "3.982%", + "Sharpe Ratio": "-0.375", + "Drawdown": "1.600%", + "End Equity": "103981.92", + "Total Fees": "$31.36", + "Portfolio Turnover": "0.83%" + } + }, + { + "project": "baseline-strategy", + "sleeve": "baseline", + "window": "2019-2020", + "params": { + "risk_per_trade": "0.004", + "max_positions": "6", + "start_year": "2019", + "end_year": "2020" + }, + "status_code": 0, + "duration_sec": 24.07, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/baseline-strategy/backtests/2026-03-28_phase3_walkforward/baseline_2019_2020", + "stats": { + "Total Orders": "59", + "Net Profit": "3.012%", + "Sharpe Ratio": "-0.337", + "Drawdown": "3.200%", + "End Equity": "103012.21", + "Total Fees": "$27.21", + "Portfolio Turnover": "0.73%" + } + }, + { + "project": "regime-ensemble-alpha", + "sleeve": "regime", + "window": "2014-2016", + "params": { + "include_crypto": "false", + "risk_tickers": "SPY,QQQ,IWM,EEM,AAPL,BAC,IBM,GOOG", + "def_tickers": "USO,BNO", + "start_year": "2014", + "end_year": "2016" + }, + "status_code": 0, + "duration_sec": 36.19, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/regime-ensemble-alpha/backtests/2026-03-28_phase3_walkforward/regime_2014_2016", + "stats": { + "Total Orders": "624", + "Net Profit": "-1.151%", + "Sharpe Ratio": "-0.263", + "Drawdown": "9.500%", + "End Equity": "98849.20", + "Total Fees": "$222.35", + "Portfolio Turnover": "2.30%" + } + }, + { + "project": "regime-ensemble-alpha", + "sleeve": "regime", + "window": "2017-2018", + "params": { + "include_crypto": "false", + "risk_tickers": "SPY,QQQ,IWM,EEM,AAPL,BAC,IBM,GOOG", + "def_tickers": "USO,BNO", + "start_year": "2017", + "end_year": "2018" + }, + "status_code": 0, + "duration_sec": 36.42, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/regime-ensemble-alpha/backtests/2026-03-28_phase3_walkforward/regime_2017_2018", + "stats": { + "Total Orders": "405", + "Net Profit": "5.419%", + "Sharpe Ratio": "-0.015", + "Drawdown": "8.500%", + "End Equity": "105418.92", + "Total Fees": "$146.16", + "Portfolio Turnover": "2.29%" + } + }, + { + "project": "regime-ensemble-alpha", + "sleeve": "regime", + "window": "2019-2020", + "params": { + "include_crypto": "false", + "risk_tickers": "SPY,QQQ,IWM,EEM,AAPL,BAC,IBM,GOOG", + "def_tickers": "USO,BNO", + "start_year": "2019", + "end_year": "2020" + }, + "status_code": 0, + "duration_sec": 29.79, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/regime-ensemble-alpha/backtests/2026-03-28_phase3_walkforward/regime_2019_2020", + "stats": { + "Total Orders": "387", + "Net Profit": "17.792%", + "Sharpe Ratio": "0.742", + "Drawdown": "9.000%", + "End Equity": "117791.67", + "Total Fees": "$141.00", + "Portfolio Turnover": "2.14%" + } + }, + { + "project": "anchored-vwap-sleeve", + "sleeve": "avwap", + "window": "2014-2016", + "params": { + "include_crypto": "false", + "equity_tickers": "SPY,QQQ,IWM,EEM,AAPL,BAC,IBM,USO,BNO", + "start_year": "2014", + "end_year": "2016" + }, + "status_code": 0, + "duration_sec": 23.0, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/anchored-vwap-sleeve/backtests/2026-03-28_phase3_walkforward/avwap_2014_2016", + "stats": { + "Total Orders": "432", + "Net Profit": "-1.276%", + "Sharpe Ratio": "-0.733", + "Drawdown": "3.400%", + "End Equity": "98723.65", + "Total Fees": "$141.26", + "Portfolio Turnover": "2.47%" + } + }, + { + "project": "anchored-vwap-sleeve", + "sleeve": "avwap", + "window": "2017-2018", + "params": { + "include_crypto": "false", + "equity_tickers": "SPY,QQQ,IWM,EEM,AAPL,BAC,IBM,USO,BNO", + "start_year": "2017", + "end_year": "2018" + }, + "status_code": 0, + "duration_sec": 21.78, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/anchored-vwap-sleeve/backtests/2026-03-28_phase3_walkforward/avwap_2017_2018", + "stats": { + "Total Orders": "391", + "Net Profit": "-0.453%", + "Sharpe Ratio": "-1.022", + "Drawdown": "4.600%", + "End Equity": "99547.29", + "Total Fees": "$150.39", + "Portfolio Turnover": "3.98%" + } + }, + { + "project": "anchored-vwap-sleeve", + "sleeve": "avwap", + "window": "2019-2020", + "params": { + "include_crypto": "false", + "equity_tickers": "SPY,QQQ,IWM,EEM,AAPL,BAC,IBM,USO,BNO", + "start_year": "2019", + "end_year": "2020" + }, + "status_code": 0, + "duration_sec": 21.53, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/anchored-vwap-sleeve/backtests/2026-03-28_phase3_walkforward/avwap_2019_2020", + "stats": { + "Total Orders": "386", + "Net Profit": "-1.372%", + "Sharpe Ratio": "-0.944", + "Drawdown": "3.700%", + "End Equity": "98627.80", + "Total Fees": "$117.29", + "Portfolio Turnover": "2.82%" + } + }, + { + "project": "statarb-spread-engine", + "sleeve": "statarb", + "window": "2014-2016", + "params": { + "start_year": "2014", + "end_year": "2016" + }, + "status_code": 0, + "duration_sec": 42.73, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/statarb-spread-engine/backtests/2026-03-28_phase3_walkforward/statarb_2014_2016", + "stats": { + "Total Orders": "20", + "Net Profit": "-0.045%", + "Sharpe Ratio": "-33.391", + "Drawdown": "0.100%", + "End Equity": "99955.36", + "Total Fees": "$20.00", + "Portfolio Turnover": "0.02%" + } + }, + { + "project": "statarb-spread-engine", + "sleeve": "statarb", + "window": "2017-2018", + "params": { + "start_year": "2017", + "end_year": "2018" + }, + "status_code": 0, + "duration_sec": 37.27, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/statarb-spread-engine/backtests/2026-03-28_phase3_walkforward/statarb_2017_2018", + "stats": { + "Total Orders": "4", + "Net Profit": "0.014%", + "Sharpe Ratio": "-341.694", + "Drawdown": "0.000%", + "End Equity": "100013.84", + "Total Fees": "$4.00", + "Portfolio Turnover": "0.01%" + } + }, + { + "project": "statarb-spread-engine", + "sleeve": "statarb", + "window": "2019-2020", + "params": { + "start_year": "2019", + "end_year": "2020" + }, + "status_code": 0, + "duration_sec": 37.47, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/statarb-spread-engine/backtests/2026-03-28_phase3_walkforward/statarb_2019_2020", + "stats": { + "Total Orders": "16", + "Net Profit": "-0.066%", + "Sharpe Ratio": "-34.125", + "Drawdown": "0.100%", + "End Equity": "99934.07", + "Total Fees": "$16.00", + "Portfolio Turnover": "0.03%" + } + }, + { + "project": "options-greeks-vix", + "sleeve": "options", + "window": "2014-2016", + "params": { + "enable_options": "true", + "option_underlying_ticker": "AAPL", + "underlying_ticker": "SPY", + "start_year": "2014", + "end_year": "2016" + }, + "status_code": 0, + "duration_sec": 23.66, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/options-greeks-vix/backtests/2026-03-28_phase3_walkforward/options_2014_2016", + "stats": { + "Total Orders": "21", + "Net Profit": "5.409%", + "Sharpe Ratio": "0.18", + "Drawdown": "2.800%", + "End Equity": "105408.99", + "Total Fees": "$21.03", + "Portfolio Turnover": "0.38%" + } + }, + { + "project": "options-greeks-vix", + "sleeve": "options", + "window": "2017-2018", + "params": { + "enable_options": "true", + "option_underlying_ticker": "AAPL", + "underlying_ticker": "SPY", + "start_year": "2017", + "end_year": "2018" + }, + "status_code": 0, + "duration_sec": 18.07, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/options-greeks-vix/backtests/2026-03-28_phase3_walkforward/options_2017_2018", + "stats": { + "Total Orders": "67", + "Net Profit": "1.074%", + "Sharpe Ratio": "-0.762", + "Drawdown": "4.200%", + "End Equity": "101074.05", + "Total Fees": "$67.05", + "Portfolio Turnover": "1.83%" + } + }, + { + "project": "options-greeks-vix", + "sleeve": "options", + "window": "2019-2020", + "params": { + "enable_options": "true", + "option_underlying_ticker": "AAPL", + "underlying_ticker": "SPY", + "start_year": "2019", + "end_year": "2020" + }, + "status_code": 0, + "duration_sec": 18.83, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/options-greeks-vix/backtests/2026-03-28_phase3_walkforward/options_2019_2020", + "stats": { + "Total Orders": "29", + "Net Profit": "6.714%", + "Sharpe Ratio": "0.163", + "Drawdown": "7.500%", + "End Equity": "106714.38", + "Total Fees": "$28.92", + "Portfolio Turnover": "0.79%" + } + }, + { + "project": "options-greeks-vix", + "sleeve": "options_fallback", + "window": "2014-2016", + "params": { + "enable_options": "false", + "fallback_equity_mode": "true", + "option_underlying_ticker": "AAPL", + "underlying_ticker": "SPY", + "start_year": "2014", + "end_year": "2016" + }, + "status_code": 0, + "duration_sec": 18.48, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/options-greeks-vix/backtests/2026-03-28_phase3_walkforward/options_fallback_2014_2016", + "stats": { + "Total Orders": "7", + "Net Profit": "5.891%", + "Sharpe Ratio": "0.22", + "Drawdown": "2.900%", + "End Equity": "105891.10", + "Total Fees": "$7.01", + "Portfolio Turnover": "0.13%" + } + }, + { + "project": "options-greeks-vix", + "sleeve": "options_fallback", + "window": "2017-2018", + "params": { + "enable_options": "false", + "fallback_equity_mode": "true", + "option_underlying_ticker": "AAPL", + "underlying_ticker": "SPY", + "start_year": "2017", + "end_year": "2018" + }, + "status_code": 0, + "duration_sec": 19.14, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/options-greeks-vix/backtests/2026-03-28_phase3_walkforward/options_fallback_2017_2018", + "stats": { + "Total Orders": "67", + "Net Profit": "1.170%", + "Sharpe Ratio": "-0.747", + "Drawdown": "4.200%", + "End Equity": "101170.13", + "Total Fees": "$67.11", + "Portfolio Turnover": "1.83%" + } + }, + { + "project": "options-greeks-vix", + "sleeve": "options_fallback", + "window": "2019-2020", + "params": { + "enable_options": "false", + "fallback_equity_mode": "true", + "option_underlying_ticker": "AAPL", + "underlying_ticker": "SPY", + "start_year": "2019", + "end_year": "2020" + }, + "status_code": 0, + "duration_sec": 20.41, + "output_dir": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/options-greeks-vix/backtests/2026-03-28_phase3_walkforward/options_fallback_2019_2020", + "stats": { + "Total Orders": "29", + "Net Profit": "6.714%", + "Sharpe Ratio": "0.163", + "Drawdown": "7.500%", + "End Equity": "106714.38", + "Total Fees": "$28.92", + "Portfolio Turnover": "0.79%" + } + } +] \ No newline at end of file diff --git a/frontend/github-pages/data/PHASE3_WALKFORWARD.md b/frontend/github-pages/data/PHASE3_WALKFORWARD.md new file mode 100644 index 0000000..df705f4 --- /dev/null +++ b/frontend/github-pages/data/PHASE3_WALKFORWARD.md @@ -0,0 +1,37 @@ +# Phase 3 Walk-Forward Stability — 2026-03-28_phase3_walkforward + +Generated: 2026-03-28T03:26:02.480247+00:00 + +JSON: `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/docs/PHASE3_WALKFORWARD_2026-03-28_phase3_walkforward.json` + +| Sleeve | Window | Orders | Net Profit | Sharpe | Drawdown | End Equity | Output | +|---|---|---:|---:|---:|---:|---:|---| +| baseline | 2014-2016 | 77 | -3.118% | -1.892 | 3.200% | 96882.17 | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/baseline-strategy/backtests/2026-03-28_phase3_walkforward/baseline_2014_2016` | +| baseline | 2017-2018 | 55 | 3.982% | -0.375 | 1.600% | 103981.92 | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/baseline-strategy/backtests/2026-03-28_phase3_walkforward/baseline_2017_2018` | +| baseline | 2019-2020 | 59 | 3.012% | -0.337 | 3.200% | 103012.21 | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/baseline-strategy/backtests/2026-03-28_phase3_walkforward/baseline_2019_2020` | +| regime | 2014-2016 | 624 | -1.151% | -0.263 | 9.500% | 98849.20 | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/regime-ensemble-alpha/backtests/2026-03-28_phase3_walkforward/regime_2014_2016` | +| regime | 2017-2018 | 405 | 5.419% | -0.015 | 8.500% | 105418.92 | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/regime-ensemble-alpha/backtests/2026-03-28_phase3_walkforward/regime_2017_2018` | +| regime | 2019-2020 | 387 | 17.792% | 0.742 | 9.000% | 117791.67 | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/regime-ensemble-alpha/backtests/2026-03-28_phase3_walkforward/regime_2019_2020` | +| avwap | 2014-2016 | 432 | -1.276% | -0.733 | 3.400% | 98723.65 | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/anchored-vwap-sleeve/backtests/2026-03-28_phase3_walkforward/avwap_2014_2016` | +| avwap | 2017-2018 | 391 | -0.453% | -1.022 | 4.600% | 99547.29 | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/anchored-vwap-sleeve/backtests/2026-03-28_phase3_walkforward/avwap_2017_2018` | +| avwap | 2019-2020 | 386 | -1.372% | -0.944 | 3.700% | 98627.80 | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/anchored-vwap-sleeve/backtests/2026-03-28_phase3_walkforward/avwap_2019_2020` | +| statarb | 2014-2016 | 20 | -0.045% | -33.391 | 0.100% | 99955.36 | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/statarb-spread-engine/backtests/2026-03-28_phase3_walkforward/statarb_2014_2016` | +| statarb | 2017-2018 | 4 | 0.014% | -341.694 | 0.000% | 100013.84 | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/statarb-spread-engine/backtests/2026-03-28_phase3_walkforward/statarb_2017_2018` | +| statarb | 2019-2020 | 16 | -0.066% | -34.125 | 0.100% | 99934.07 | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/statarb-spread-engine/backtests/2026-03-28_phase3_walkforward/statarb_2019_2020` | +| options | 2014-2016 | 21 | 5.409% | 0.18 | 2.800% | 105408.99 | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/options-greeks-vix/backtests/2026-03-28_phase3_walkforward/options_2014_2016` | +| options | 2017-2018 | 67 | 1.074% | -0.762 | 4.200% | 101074.05 | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/options-greeks-vix/backtests/2026-03-28_phase3_walkforward/options_2017_2018` | +| options | 2019-2020 | 29 | 6.714% | 0.163 | 7.500% | 106714.38 | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/options-greeks-vix/backtests/2026-03-28_phase3_walkforward/options_2019_2020` | +| options_fallback | 2014-2016 | 7 | 5.891% | 0.22 | 2.900% | 105891.10 | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/options-greeks-vix/backtests/2026-03-28_phase3_walkforward/options_fallback_2014_2016` | +| options_fallback | 2017-2018 | 67 | 1.170% | -0.747 | 4.200% | 101170.13 | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/options-greeks-vix/backtests/2026-03-28_phase3_walkforward/options_fallback_2017_2018` | +| options_fallback | 2019-2020 | 29 | 6.714% | 0.163 | 7.500% | 106714.38 | `/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/options-greeks-vix/backtests/2026-03-28_phase3_walkforward/options_fallback_2019_2020` | + +## Stability Summary + +| Sleeve | Windows Positive Net | Avg Net % | Avg Sharpe | Worst Drawdown % | +|---|---:|---:|---:|---:| +| baseline | 2/3 | 1.292 | -0.868 | 3.200 | +| regime | 2/3 | 7.353 | 0.155 | 9.500 | +| avwap | 0/3 | -1.034 | -0.900 | 4.600 | +| statarb | 1/3 | -0.032 | -136.403 | 0.100 | +| options | 3/3 | 4.399 | -0.140 | 7.500 | +| options_fallback | 3/3 | 4.592 | -0.121 | 7.500 | \ No newline at end of file diff --git a/frontend/github-pages/data/RUN_LEDGER.json b/frontend/github-pages/data/RUN_LEDGER.json new file mode 100644 index 0000000..9c4404a --- /dev/null +++ b/frontend/github-pages/data/RUN_LEDGER.json @@ -0,0 +1,65 @@ +{ + "generated_at": "2026-03-28T04:08:31.784962+00:00", + "rows": [ + { + "lane": "phase3_walkforward", + "path": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/docs/PHASE3_WALKFORWARD_2026-03-28_phase3_walkforward.json", + "name": "PHASE3_WALKFORWARD_2026-03-28_phase3_walkforward.json", + "modified_utc": "2026-03-28T03:26:02.479167+00:00", + "summary": { + "type": "list", + "rows": 18 + } + }, + { + "lane": "phase3_allocator", + "path": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/docs/PHASE3_SLEEVE_ALLOCATOR_2026-03-28_phase3_allocator.json", + "name": "PHASE3_SLEEVE_ALLOCATOR_2026-03-28_phase3_allocator.json", + "modified_utc": "2026-03-28T03:17:00.674088+00:00", + "summary": { + "type": "allocator", + "rows": 5 + } + }, + { + "lane": "phase3_matrix", + "path": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/docs/PHASE3_BACKTEST_MATRIX_2026-03-28_phase3_matrix.json", + "name": "PHASE3_BACKTEST_MATRIX_2026-03-28_phase3_matrix.json", + "modified_utc": "2026-03-28T03:16:48.835011+00:00", + "summary": { + "type": "list", + "rows": 12 + } + }, + { + "lane": "phase2_tuning", + "path": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/docs/PHASE2_TUNING_2026-03-27_phase2_tuning.json", + "name": "PHASE2_TUNING_2026-03-27_phase2_tuning.json", + "modified_utc": "2026-03-27T22:53:16.206048+00:00", + "summary": { + "type": "list", + "rows": 15 + } + }, + { + "lane": "phase2_oos", + "path": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/docs/PHASE2_OOS_VALIDATION_2026-03-27_phase2_oos.json", + "name": "PHASE2_OOS_VALIDATION_2026-03-27_phase2_oos.json", + "modified_utc": "2026-03-27T22:40:13.036520+00:00", + "summary": { + "type": "list", + "rows": 10 + } + }, + { + "lane": "phase2_matrix", + "path": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/docs/PHASE2_BACKTEST_MATRIX_2026-03-27_phase2_matrix.json", + "name": "PHASE2_BACKTEST_MATRIX_2026-03-27_phase2_matrix.json", + "modified_utc": "2026-03-27T22:33:21.563089+00:00", + "summary": { + "type": "list", + "rows": 15 + } + } + ] +} \ No newline at end of file diff --git a/frontend/github-pages/data/RUN_LEDGER.md b/frontend/github-pages/data/RUN_LEDGER.md new file mode 100644 index 0000000..c6a0c61 --- /dev/null +++ b/frontend/github-pages/data/RUN_LEDGER.md @@ -0,0 +1,12 @@ +# Run Ledger + +Generated: 2026-03-28T04:08:31.785286+00:00 + +| Lane | File | Modified UTC | Summary | +|---|---|---|---| +| phase3_walkforward | `PHASE3_WALKFORWARD_2026-03-28_phase3_walkforward.json` | 2026-03-28T03:26:02.479167+00:00 | `{'type': 'list', 'rows': 18}` | +| phase3_allocator | `PHASE3_SLEEVE_ALLOCATOR_2026-03-28_phase3_allocator.json` | 2026-03-28T03:17:00.674088+00:00 | `{'type': 'allocator', 'rows': 5}` | +| phase3_matrix | `PHASE3_BACKTEST_MATRIX_2026-03-28_phase3_matrix.json` | 2026-03-28T03:16:48.835011+00:00 | `{'type': 'list', 'rows': 12}` | +| phase2_tuning | `PHASE2_TUNING_2026-03-27_phase2_tuning.json` | 2026-03-27T22:53:16.206048+00:00 | `{'type': 'list', 'rows': 15}` | +| phase2_oos | `PHASE2_OOS_VALIDATION_2026-03-27_phase2_oos.json` | 2026-03-27T22:40:13.036520+00:00 | `{'type': 'list', 'rows': 10}` | +| phase2_matrix | `PHASE2_BACKTEST_MATRIX_2026-03-27_phase2_matrix.json` | 2026-03-27T22:33:21.563089+00:00 | `{'type': 'list', 'rows': 15}` | \ No newline at end of file diff --git a/frontend/github-pages/index.html b/frontend/github-pages/index.html new file mode 100644 index 0000000..0ee0c7d --- /dev/null +++ b/frontend/github-pages/index.html @@ -0,0 +1,82 @@ + + + + + + MultiClaw Quant Dashboard + + + +
+

MultiClaw Quant Dashboard

+

Paper-trading research cockpit (static GitHub Pages view)

+
+ +
+
+

Latest Artifacts

+
Loading...
+
+ +
+

Strategy Overview

+ + + + + + + + + + + + +
ProjectScenarioNet ProfitSharpeDrawdownOrders
+
+ +
+

Walk-Forward Stability

+ + + + + + + + + + + + +
SleeveWindowNet ProfitSharpeDrawdownOrders
+
+ +
+

Recommended Sleeve Weights

+ + + + + + + + + + +
SleeveScenarioWeightScore
+
+ +
+

Paper Trading Snapshot

+
No snapshot loaded.
+
+
+ +
+ Generated from repo artifacts. For execution use internal tools only. +
+ + + + diff --git a/frontend/github-pages/scripts/sync_data.sh b/frontend/github-pages/scripts/sync_data.sh new file mode 100755 index 0000000..e3fe6d8 --- /dev/null +++ b/frontend/github-pages/scripts/sync_data.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd)" +DOCS="$ROOT/lean-cli/docs" +OUT="$ROOT/frontend/github-pages/data" + +mkdir -p "$OUT" + +cp "$DOCS/PHASE3_BACKTEST_MATRIX_2026-03-28_phase3_matrix.json" "$OUT/PHASE3_BACKTEST_MATRIX.json" +cp "$DOCS/PHASE3_BACKTEST_MATRIX_2026-03-28_phase3_matrix.md" "$OUT/PHASE3_BACKTEST_MATRIX.md" + +cp "$DOCS/PHASE3_WALKFORWARD_2026-03-28_phase3_walkforward.json" "$OUT/PHASE3_WALKFORWARD.json" +cp "$DOCS/PHASE3_WALKFORWARD_2026-03-28_phase3_walkforward.md" "$OUT/PHASE3_WALKFORWARD.md" + +cp "$DOCS/PHASE3_SLEEVE_ALLOCATOR_2026-03-28_phase3_allocator.json" "$OUT/PHASE3_ALLOCATOR.json" +cp "$DOCS/PHASE3_SLEEVE_ALLOCATOR_2026-03-28_phase3_allocator.md" "$OUT/PHASE3_ALLOCATOR.md" + +cp "$DOCS/PHASE3_METHOD_VALIDITY_REPORT_2026-03-28.md" "$OUT/PHASE3_METHOD_VALIDITY.md" +cp "$DOCS/PHASE3_DATA_QUALITY_AUDIT.md" "$OUT/PHASE3_DATA_QUALITY_AUDIT.md" + +if [[ -f "$DOCS/RUN_LEDGER.json" ]]; then + cp "$DOCS/RUN_LEDGER.json" "$OUT/RUN_LEDGER.json" +fi +if [[ -f "$DOCS/RUN_LEDGER.md" ]]; then + cp "$DOCS/RUN_LEDGER.md" "$OUT/RUN_LEDGER.md" +fi + +if [[ -f "$ROOT/research/data/ARXIV_DIGEST.md" ]]; then + cp "$ROOT/research/data/ARXIV_DIGEST.md" "$OUT/ARXIV_DIGEST.md" +fi + +if [[ -f "$ROOT/services/ingestion/sample_tradier_paper_snapshot.json" ]]; then + cp "$ROOT/services/ingestion/sample_tradier_paper_snapshot.json" "$OUT/PAPER_SNAPSHOT.json" +fi + +echo "Synced dashboard data to $OUT" diff --git a/frontend/github-pages/styles.css b/frontend/github-pages/styles.css new file mode 100644 index 0000000..581597b --- /dev/null +++ b/frontend/github-pages/styles.css @@ -0,0 +1,44 @@ +body { + font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; + margin: 0; + background: #0d1117; + color: #e6edf3; +} +header, footer { + padding: 1rem 1.5rem; + background: #161b22; + border-bottom: 1px solid #30363d; +} +footer { + border-top: 1px solid #30363d; + border-bottom: none; +} +main { + padding: 1rem; + display: grid; + gap: 1rem; +} +.card { + background: #161b22; + border: 1px solid #30363d; + border-radius: 10px; + padding: 1rem; +} +table { + width: 100%; + border-collapse: collapse; +} +th, td { + border-bottom: 1px solid #30363d; + padding: 0.45rem; + text-align: left; + font-size: 0.9rem; +} +th { color: #7ee787; } +pre { + background: #0b1320; + border: 1px solid #30363d; + padding: 0.75rem; + overflow: auto; +} +a { color: #58a6ff; } diff --git a/lean-cli/docs/RUN_LEDGER.json b/lean-cli/docs/RUN_LEDGER.json new file mode 100644 index 0000000..9c4404a --- /dev/null +++ b/lean-cli/docs/RUN_LEDGER.json @@ -0,0 +1,65 @@ +{ + "generated_at": "2026-03-28T04:08:31.784962+00:00", + "rows": [ + { + "lane": "phase3_walkforward", + "path": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/docs/PHASE3_WALKFORWARD_2026-03-28_phase3_walkforward.json", + "name": "PHASE3_WALKFORWARD_2026-03-28_phase3_walkforward.json", + "modified_utc": "2026-03-28T03:26:02.479167+00:00", + "summary": { + "type": "list", + "rows": 18 + } + }, + { + "lane": "phase3_allocator", + "path": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/docs/PHASE3_SLEEVE_ALLOCATOR_2026-03-28_phase3_allocator.json", + "name": "PHASE3_SLEEVE_ALLOCATOR_2026-03-28_phase3_allocator.json", + "modified_utc": "2026-03-28T03:17:00.674088+00:00", + "summary": { + "type": "allocator", + "rows": 5 + } + }, + { + "lane": "phase3_matrix", + "path": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/docs/PHASE3_BACKTEST_MATRIX_2026-03-28_phase3_matrix.json", + "name": "PHASE3_BACKTEST_MATRIX_2026-03-28_phase3_matrix.json", + "modified_utc": "2026-03-28T03:16:48.835011+00:00", + "summary": { + "type": "list", + "rows": 12 + } + }, + { + "lane": "phase2_tuning", + "path": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/docs/PHASE2_TUNING_2026-03-27_phase2_tuning.json", + "name": "PHASE2_TUNING_2026-03-27_phase2_tuning.json", + "modified_utc": "2026-03-27T22:53:16.206048+00:00", + "summary": { + "type": "list", + "rows": 15 + } + }, + { + "lane": "phase2_oos", + "path": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/docs/PHASE2_OOS_VALIDATION_2026-03-27_phase2_oos.json", + "name": "PHASE2_OOS_VALIDATION_2026-03-27_phase2_oos.json", + "modified_utc": "2026-03-27T22:40:13.036520+00:00", + "summary": { + "type": "list", + "rows": 10 + } + }, + { + "lane": "phase2_matrix", + "path": "/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/docs/PHASE2_BACKTEST_MATRIX_2026-03-27_phase2_matrix.json", + "name": "PHASE2_BACKTEST_MATRIX_2026-03-27_phase2_matrix.json", + "modified_utc": "2026-03-27T22:33:21.563089+00:00", + "summary": { + "type": "list", + "rows": 15 + } + } + ] +} \ No newline at end of file diff --git a/lean-cli/docs/RUN_LEDGER.md b/lean-cli/docs/RUN_LEDGER.md new file mode 100644 index 0000000..c6a0c61 --- /dev/null +++ b/lean-cli/docs/RUN_LEDGER.md @@ -0,0 +1,12 @@ +# Run Ledger + +Generated: 2026-03-28T04:08:31.785286+00:00 + +| Lane | File | Modified UTC | Summary | +|---|---|---|---| +| phase3_walkforward | `PHASE3_WALKFORWARD_2026-03-28_phase3_walkforward.json` | 2026-03-28T03:26:02.479167+00:00 | `{'type': 'list', 'rows': 18}` | +| phase3_allocator | `PHASE3_SLEEVE_ALLOCATOR_2026-03-28_phase3_allocator.json` | 2026-03-28T03:17:00.674088+00:00 | `{'type': 'allocator', 'rows': 5}` | +| phase3_matrix | `PHASE3_BACKTEST_MATRIX_2026-03-28_phase3_matrix.json` | 2026-03-28T03:16:48.835011+00:00 | `{'type': 'list', 'rows': 12}` | +| phase2_tuning | `PHASE2_TUNING_2026-03-27_phase2_tuning.json` | 2026-03-27T22:53:16.206048+00:00 | `{'type': 'list', 'rows': 15}` | +| phase2_oos | `PHASE2_OOS_VALIDATION_2026-03-27_phase2_oos.json` | 2026-03-27T22:40:13.036520+00:00 | `{'type': 'list', 'rows': 10}` | +| phase2_matrix | `PHASE2_BACKTEST_MATRIX_2026-03-27_phase2_matrix.json` | 2026-03-27T22:33:21.563089+00:00 | `{'type': 'list', 'rows': 15}` | \ No newline at end of file diff --git a/lean-cli/scripts/backtests/build_run_ledger.py b/lean-cli/scripts/backtests/build_run_ledger.py new file mode 100755 index 0000000..4e5e45b --- /dev/null +++ b/lean-cli/scripts/backtests/build_run_ledger.py @@ -0,0 +1,82 @@ +#!/usr/bin/env python3 +""" +Build a run ledger of matrix/walkforward/tuning outputs for auditability. +""" + +from __future__ import annotations + +import json +import re +from datetime import datetime, timezone +from pathlib import Path + +DOCS = Path('/home/aimls-dtd/.openclaw-nemoclaw/workspace/projects/quantconnect/lean-cli/docs') +OUT_JSON = DOCS / 'RUN_LEDGER.json' +OUT_MD = DOCS / 'RUN_LEDGER.md' + +PATTERNS = { + 'phase2_matrix': r'^PHASE2_BACKTEST_MATRIX_.*\.json$', + 'phase2_oos': r'^PHASE2_OOS_VALIDATION_.*\.json$', + 'phase2_tuning': r'^PHASE2_TUNING_.*\.json$', + 'phase3_matrix': r'^PHASE3_BACKTEST_MATRIX_.*\.json$', + 'phase3_walkforward': r'^PHASE3_WALKFORWARD_.*\.json$', + 'phase3_allocator': r'^PHASE3_SLEEVE_ALLOCATOR_.*\.json$', +} + + +def latest(pattern: str): + rx = re.compile(pattern) + cands = sorted([p for p in DOCS.iterdir() if p.is_file() and rx.match(p.name)]) + return cands[-1] if cands else None + + +def summarize_json(path: Path): + j = json.loads(path.read_text()) + if isinstance(j, dict): + if 'weights' in j: + return { + 'type': 'allocator', + 'rows': len(j.get('weights', {})), + } + return {'type': 'dict', 'keys': list(j.keys())[:12]} + if isinstance(j, list): + return {'type': 'list', 'rows': len(j)} + return {'type': type(j).__name__} + + +def main(): + rows = [] + for lane, pat in PATTERNS.items(): + p = latest(pat) + if not p: + continue + stat = p.stat() + summary = summarize_json(p) + rows.append({ + 'lane': lane, + 'path': str(p), + 'name': p.name, + 'modified_utc': datetime.fromtimestamp(stat.st_mtime, tz=timezone.utc).isoformat(), + 'summary': summary, + }) + + rows = sorted(rows, key=lambda x: x['modified_utc'], reverse=True) + + OUT_JSON.write_text(json.dumps({ + 'generated_at': datetime.now(timezone.utc).isoformat(), + 'rows': rows, + }, indent=2), encoding='utf-8') + + md = ['# Run Ledger', '', f"Generated: {datetime.now(timezone.utc).isoformat()}", ''] + md.append('| Lane | File | Modified UTC | Summary |') + md.append('|---|---|---|---|') + for r in rows: + md.append(f"| {r['lane']} | `{r['name']}` | {r['modified_utc']} | `{r['summary']}` |") + + OUT_MD.write_text('\n'.join(md), encoding='utf-8') + print(OUT_JSON) + print(OUT_MD) + + +if __name__ == '__main__': + main() diff --git a/research/README_RESEARCH_AUTOMATION.md b/research/README_RESEARCH_AUTOMATION.md new file mode 100644 index 0000000..99198a9 --- /dev/null +++ b/research/README_RESEARCH_AUTOMATION.md @@ -0,0 +1,24 @@ +# Research Automation (Token-Efficient) + +## Goal +Continuously harvest high-signal research without burning LLM tokens on fullpaper summarization. + +## Pipeline +1. Pull ArXiv metadata for quant topics. +2. Score entries using deterministic heuristics (recency + keyword relevance). +3. Store ranked digest as JSONL + Markdown. +4. Use LLM only on shortlisted papers when implementing strategy upgrades. + +## Run + +```bash +python3 research/scripts/update_arxiv_digest.py --per-topic 25 --top 80 +``` + +Outputs: +- `research/data/arxiv_digest.jsonl` +- `research/data/ARXIV_DIGEST.md` + +## Notes +- This is intentionally model-free to preserve token budget. +- Extend `research/arxiv/topics.json` as strategy scope grows. diff --git a/research/arxiv/topics.json b/research/arxiv/topics.json new file mode 100644 index 0000000..f0792d6 --- /dev/null +++ b/research/arxiv/topics.json @@ -0,0 +1,8 @@ +{ + "trend_momentum": "(all:momentum OR all:trend-following OR all:cross-sectional momentum) AND (cat:q-fin.ST OR cat:q-fin.PM)", + "options_vol_surface": "(all:implied volatility OR all:volatility surface OR all:0DTE OR all:greeks) AND (cat:q-fin.PR OR cat:q-fin.CP)", + "statarb_pairs": "(all:statistical arbitrage OR all:pairs trading OR all:cointegration) AND (cat:q-fin.ST OR cat:q-fin.TR)", + "execution_microstructure": "(all:market microstructure OR all:optimal execution OR all:order flow) AND (cat:q-fin.TR OR cat:q-fin.ST)", + "crypto_market_structure": "(all:cryptocurrency OR all:crypto market microstructure OR all:on-chain) AND (cat:q-fin.TR OR cat:cs.CE)", + "portfolio_regime": "(all:portfolio optimization OR all:regime detection OR all:volatility targeting) AND (cat:q-fin.PM OR cat:q-fin.RM)" +} diff --git a/research/data/ARXIV_DIGEST.md b/research/data/ARXIV_DIGEST.md new file mode 100644 index 0000000..dd15154 --- /dev/null +++ b/research/data/ARXIV_DIGEST.md @@ -0,0 +1,76 @@ +# ArXiv Quant Digest + +Generated: 2026-03-28T04:08:32.099902+00:00 + +Token-efficient mode: metadata scoring only (no LLM summarization). + +| Rank | Topic | Score | Published | Title | URL | +|---:|---|---:|---|---|---| +| 1 | portfolio_regime | 7.035 | 2026-03-24 | Designing Agentic AI-Based Screening for Portfolio Investment | https://arxiv.org/abs/2603.23300v1 | +| 2 | portfolio_regime | 6.795 | 2026-03-26 | Modeling and Forecasting Tail Risk Spillovers: A Component-Based CAViaR Approach | https://arxiv.org/abs/2603.25217v1 | +| 3 | options_vol_surface | 6.501 | 2026-03-17 | Shallow Representation of Option Implied Information | https://arxiv.org/abs/2603.17151v1 | +| 4 | portfolio_regime | 6.040 | 2026-03-25 | The Geometry of Risk: Path-Dependent Regulation and Anticipatory Hedging via the SigSwap | https://arxiv.org/abs/2603.24154v1 | +| 5 | portfolio_regime | 6.016 | 2026-03-20 | If Not Now, Then When? Model Risk in the Optimal Exercise of American Options | https://arxiv.org/abs/2603.19984v1 | +| 6 | crypto_market_structure | 5.785 | 2026-03-24 | Stablecoins as Dry Powder: A Copula-Based Risk Analysis of Cryptocurrency Markets | https://arxiv.org/abs/2603.23480v1 | +| 7 | execution_microstructure | 5.540 | 2026-03-25 | Bridging the Reality Gap in Limit Order Book Simulation | https://arxiv.org/abs/2603.24137v1 | +| 8 | crypto_market_structure | 5.540 | 2026-03-26 | Decoding Market Emotions in Cryptocurrency Tweets via Predictive Statement Classification with Machine Learning and Transformers | https://arxiv.org/abs/2603.24933v1 | +| 9 | options_vol_surface | 5.456 | 2026-03-08 | Differential Machine Learning for 0DTE Options with Stochastic Volatility and Jumps | https://arxiv.org/abs/2603.07600v1 | +| 10 | portfolio_regime | 4.766 | 2026-03-21 | Outperforming a Benchmark with $α$-Bregman Wasserstein divergence | https://arxiv.org/abs/2603.20580v1 | +| 11 | trend_momentum | 4.632 | 2026-02-21 | Overreaction as an indicator for momentum in algorithmic trading: A Case of AAPL stocks | https://arxiv.org/abs/2602.18912v1 | +| 12 | portfolio_regime | 4.280 | 2026-03-23 | Mean Field Equilibrium Asset Pricing Models With Exponential Utility | https://arxiv.org/abs/2603.22058v1 | +| 13 | execution_microstructure | 4.275 | 2026-03-22 | FinRL-X: An AI-Native Modular Infrastructure for Quantitative Trading | https://arxiv.org/abs/2603.21330v1 | +| 14 | trend_momentum | 3.961 | 2026-03-09 | Spectral Portfolio Theory: From SGD Weight Matrices to Wealth Dynamics | https://arxiv.org/abs/2603.09006v1 | +| 15 | trend_momentum | 3.932 | 2026-03-03 | Range-Based Volatility Estimators for Monitoring Market Stress: Evidence from Local Food Price Data | https://arxiv.org/abs/2603.02898v1 | +| 16 | portfolio_regime | 3.795 | 2026-03-26 | Semi-Static Variance-Optimal Hedging of Covariance Risk in Multi-Asset Derivatives | https://arxiv.org/abs/2603.25320v1 | +| 17 | portfolio_regime | 3.785 | 2026-03-24 | Portfolio Optimization under Recursive Utility via Reinforcement Learning | https://arxiv.org/abs/2603.22880v1 | +| 18 | trend_momentum | 3.746 | 2026-03-16 | Hyper-Adaptive Momentum Dynamics for Native Cubic Portfolio Optimization: Avoiding Quadratization Distortion in Higher-Order Cardinality-Constrained Search | https://arxiv.org/abs/2603.15947v1 | +| 19 | portfolio_regime | 3.530 | 2026-03-23 | Mislearning of Factor Risk Premia under Structural Breaks: A Misspecified Bayesian Learning Framework | https://arxiv.org/abs/2603.21672v2 | +| 20 | execution_microstructure | 3.515 | 2026-03-20 | Neural Hidden Markov Model with Adaptive Granularity Attention for High-Frequency Order Flow Modeling | https://arxiv.org/abs/2603.20456v1 | +| 21 | portfolio_regime | 3.515 | 2026-03-20 | Optimal Hedge Ratio for Delta-Neutral Liquidity Provision under Liquidation Constraints | https://arxiv.org/abs/2603.19716v1 | +| 22 | statarb_pairs | 3.510 | 2026-03-19 | Adaptive Regime-Aware Stock Price Prediction Using Autoencoder-Gated Dual Node Transformers with Reinforcement Learning Control | https://arxiv.org/abs/2603.19136v1 | +| 23 | options_vol_surface | 3.456 | 2026-03-08 | SABR Type Libor (Forward) Market Model (SABR/LMM) with time-dependent skew and smile | https://arxiv.org/abs/2603.07616v1 | +| 24 | options_vol_surface | 3.241 | 2026-03-16 | At-the-money short-time call-price asymptotics for new classes of exponential Lévy models | https://arxiv.org/abs/2603.14760v1 | +| 25 | trend_momentum | 3.216 | 2026-03-10 | Hybrid Hidden Markov Model for Modeling Equity Excess Growth Rate Dynamics: A Discrete-State Approach with Jump-Diffusion | https://arxiv.org/abs/2603.10202v1 | +| 26 | portfolio_regime | 3.045 | 2026-03-26 | Shifting Correlations: How Trade Policy Uncertainty Alters stock-T bill Relationships | https://arxiv.org/abs/2603.25285v1 | +| 27 | portfolio_regime | 3.040 | 2026-03-25 | Ordering results for extreme claim amounts based on random number of claims | https://arxiv.org/abs/2603.24640v1 | +| 28 | portfolio_regime | 3.030 | 2026-03-23 | Proxy-Reliance Control in Conformal Recalibration of One-Sided Value-at-Risk | https://arxiv.org/abs/2603.22569v1 | +| 29 | options_vol_surface | 2.912 | 2026-02-27 | TradeFM: A Generative Foundation Model for Trade-flow and Market Microstructure | https://arxiv.org/abs/2602.23784v1 | +| 30 | trend_momentum | 2.897 | 2026-02-24 | When Alpha Breaks: Two-Level Uncertainty for Safe Deployment of Cross-Sectional Stock Rankers | https://arxiv.org/abs/2603.13252v1 | +| 31 | options_vol_surface | 2.756 | 2026-03-18 | Can Blindfolded LLMs Still Trade? An Anonymization-First Framework for Portfolio Optimization | https://arxiv.org/abs/2603.17692v1 | +| 32 | trend_momentum | 2.734 | 2026-01-22 | Design and Empirical Study of a Large Language Model-Based Multi-Agent Investment System for Chinese Public REITs | https://arxiv.org/abs/2602.00082v1 | +| 33 | options_vol_surface | 2.682 | 2026-03-03 | Same Error, Different Function: The Optimizer as an Implicit Prior in Financial Time Series | https://arxiv.org/abs/2603.02620v1 | +| 34 | trend_momentum | 2.553 | 2026-02-05 | Insider Purchase Signals in Microcap Equities: Gradient Boosting Detection of Abnormal Returns | https://arxiv.org/abs/2602.06198v1 | +| 35 | trend_momentum | 2.549 | 2026-02-04 | Same Returns, Different Risks: How Cryptocurrency Markets Process Infrastructure vs Regulatory Shocks | https://arxiv.org/abs/2602.07046v2 | +| 36 | portfolio_regime | 2.540 | 2026-03-25 | Utility-Invariant Support Selection and Eventwise Decoupling for Simultaneous Independent Multi-Outcome Bets | https://arxiv.org/abs/2603.24064v1 | +| 37 | crypto_market_structure | 2.530 | 2026-03-23 | TrustTrade: Human-Inspired Selective Consensus Reduces Decision Uncertainty in LLM Trading Agents | https://arxiv.org/abs/2603.22567v1 | +| 38 | statarb_pairs | 2.510 | 2026-03-19 | Survivorship Bias in Emerging Market Small-Cap Indices: Evidence from India's NIFTY Smallcap 250 | https://arxiv.org/abs/2603.19380v1 | +| 39 | execution_microstructure | 2.501 | 2026-03-17 | From Natural Language to Executable Option Strategies via Large Language Models | https://arxiv.org/abs/2603.16434v1 | +| 40 | portfolio_regime | 2.295 | 2026-03-26 | Optimal Dividend, Reinsurance, and Capital Injection for Collaborating Business Lines under Model Uncertainty | https://arxiv.org/abs/2603.25350v1 | +| 41 | execution_microstructure | 2.256 | 2026-03-18 | ARTEMIS: A Neuro Symbolic Framework for Economically Constrained Market Dynamics | https://arxiv.org/abs/2603.18107v1 | +| 42 | trend_momentum | 2.241 | 2026-03-15 | Information Propagation Across Investor Types: Transfer Entropy Networks in the Korean Equity Market | https://arxiv.org/abs/2603.20271v1 | +| 43 | options_vol_surface | 2.236 | 2026-03-14 | Conditioning on a Volatility Proxy Compresses the Apparent Timescale of Collective Market Correlation | https://arxiv.org/abs/2603.14072v1 | +| 44 | options_vol_surface | 2.236 | 2026-03-14 | Bid--Ask Martingale Optimal Transport | https://arxiv.org/abs/2603.24605v1 | +| 45 | options_vol_surface | 2.226 | 2026-03-12 | Feynman-Kac Derivatives Pricing on the Full Forward Curve | https://arxiv.org/abs/2603.12375v1 | +| 46 | options_vol_surface | 2.221 | 2026-03-11 | SPX-VIX Risk Computations Via Perturbed Optimal Transport | https://arxiv.org/abs/2603.10857v2 | +| 47 | options_vol_surface | 2.216 | 2026-03-10 | Uncertainty-Aware Deep Hedging | https://arxiv.org/abs/2603.10137v1 | +| 48 | options_vol_surface | 2.137 | 2026-02-22 | Finite Element Solution of the Two-Dimensional Bates Model for Option Pricing Under Stochastic Volatility and Jumps | https://arxiv.org/abs/2602.19092v1 | +| 49 | statarb_pairs | 2.030 | 2026-03-23 | Flexible Information Acquisition in the Kyle Model | https://arxiv.org/abs/2603.21842v1 | +| 50 | statarb_pairs | 2.025 | 2026-03-22 | Approximate Dynamic Programming for Degradation-aware Market Participation of Battery Energy Storage Systems: Bridging Market and Degradation Timescales | https://arxiv.org/abs/2603.21089v1 | +| 51 | trend_momentum | 1.999 | 2026-01-25 | MarketGANs: Multivariate financial time-series data augmentation using generative adversarial networks | https://arxiv.org/abs/2601.17773v1 | +| 52 | options_vol_surface | 1.971 | 2026-03-11 | On Utility Maximization under Multivariate Fake Stationary Affine Volterra Models | https://arxiv.org/abs/2603.11046v1 | +| 53 | options_vol_surface | 1.966 | 2026-03-10 | Two-Factor Hull-White Model Revisited: Correlation Structure for Two-Factor Interest Rate Model in CVA Calculation | https://arxiv.org/abs/2603.20243v1 | +| 54 | trend_momentum | 1.946 | 2026-03-06 | Stock Market Prediction Using Node Transformer Architecture Integrated with BERT Sentiment Analysis | https://arxiv.org/abs/2603.05917v1 | +| 55 | trend_momentum | 1.803 | 2026-02-05 | Algorithmic Monitoring: Measuring Market Stress with Machine Learning | https://arxiv.org/abs/2602.07066v1 | +| 56 | statarb_pairs | 1.795 | 2026-03-26 | Optimal threshold resetting in collective diffusive search | https://arxiv.org/abs/2603.25338v1 | +| 57 | statarb_pairs | 1.790 | 2026-03-25 | Adapting Altman's bankruptcy prediction model to the compositional data methodology | https://arxiv.org/abs/2603.24215v1 | +| 58 | statarb_pairs | 1.790 | 2026-03-25 | Dynamical thermalization and turbulence in social stratification models | https://arxiv.org/abs/2603.24190v1 | +| 59 | crypto_market_structure | 1.790 | 2026-03-25 | MolEvolve: LLM-Guided Evolutionary Search for Interpretable Molecular Optimization | https://arxiv.org/abs/2603.24382v1 | +| 60 | crypto_market_structure | 1.790 | 2026-03-25 | S$^{3}$G: Stock State Space Graph for Enhanced Stock Trend Prediction | https://arxiv.org/abs/2603.24236v1 | +| 61 | statarb_pairs | 1.785 | 2026-03-24 | Conditionally Identifiable Latent Representation for Multivariate Time Series with Structural Dynamics | https://arxiv.org/abs/2603.22886v1 | +| 62 | crypto_market_structure | 1.785 | 2026-03-24 | Option pricing model under the G-expectation framework | https://arxiv.org/abs/2603.22831v1 | +| 63 | crypto_market_structure | 1.780 | 2026-03-23 | ParlayMarket: Automated Market Making for Parlay-style Joint Contracts | https://arxiv.org/abs/2603.22596v1 | +| 64 | statarb_pairs | 1.770 | 2026-03-21 | Learning to Aggregate Zero-Shot LLM Agents for Corporate Disclosure Classification | https://arxiv.org/abs/2603.20965v1 | +| 65 | statarb_pairs | 1.766 | 2026-03-20 | Large Language Models and Stock Investing: Is the Human Factor Required? | https://arxiv.org/abs/2603.19944v1 | +| 66 | execution_microstructure | 1.751 | 2026-03-17 | Open vs. Sealed: Auction Format Choice for Maximal Extractable Value | https://arxiv.org/abs/2603.16333v1 | +| 67 | trend_momentum | 1.647 | 2026-02-24 | Stochastic Discount Factors with Cross-Asset Spillovers | https://arxiv.org/abs/2602.20856v1 | +| 68 | trend_momentum | 1.484 | 2026-01-22 | A Nonlinear Target-Factor Model with Attention Mechanism for Mixed-Frequency Data | https://arxiv.org/abs/2601.16274v1 | \ No newline at end of file diff --git a/research/data/arxiv_digest.jsonl b/research/data/arxiv_digest.jsonl new file mode 100644 index 0000000..0bb15c4 --- /dev/null +++ b/research/data/arxiv_digest.jsonl @@ -0,0 +1,68 @@ +{"id": "2603.23300v1", "topic": "portfolio_regime", "title": "Designing Agentic AI-Based Screening for Portfolio Investment", "summary": "We introduce a new agentic artificial intelligence (AI) platform for portfolio management. Our architecture consists of three layers. First, two large language model (LLM) agents are assigned specialized tasks: one agent screens for firms with desirable fundamentals, while a sentiment analysis agent screens for firms with desirable news. Second, these agents deliberate to generate and agree upon buy and sell signals from a large portfolio, substantially narrowing the pool of candidate assets. Finally, we apply a high-dimensional precision matrix estimation procedure to determine optimal portfolio weights. A defining theoretical feature of our framework is that the number of assets in the portfolio is itself a random variable, realized through the screening process. We introduce the concept of sensible screening and establish that, under mild screening errors, the squared Sharpe ratio of the screened portfolio consistently estimates its target. Empirically, our method achieves superior Sharpe ratios relative to an unscreened baseline portfolio and to conventional screening approaches, evaluated on S&P 500 data over the period 2020--2024.", "published": "2026-03-24T15:03:40Z", "updated": "2026-03-24T15:03:40Z", "authors": ["Mehmet Caner", "Agostino Capponi", "Nathan Sun", "Jonathan Y. Tan"], "categories": ["q-fin.PM", "cs.AI", "cs.MA", "q-fin.ST"], "url": "https://arxiv.org/abs/2603.23300v1", "score": 7.0352} +{"id": "2603.25217v1", "topic": "portfolio_regime", "title": "Modeling and Forecasting Tail Risk Spillovers: A Component-Based CAViaR Approach", "summary": "This paper introduces a new extension of the Conditional Autoregressive Value at Risk (CAViaR) model aimed at improving tail risk forecasting across assets. The proposed component-based model, CAViaR with Spillover Effects (CAViaR-SE), decomposes the conditional Value at Risk into a proper-risk component and a spillover component driven by a linear combination of tail risks from influential assets. These assets are selected via a recursive partial correlation algorithm, allowing multiple spillover sources with minimal parameterization. The spillover component acts as a predictable quantile shifter, directly affecting the conditional quantile dynamics rather than the volatility scale. Empirical results on Dow Jones Industrial Average stocks show that spillover effects account for a substantial share of total tail risk and significantly improve out-of-sample tail risk forecasts. Backtesting procedures, together with Model Confidence Set (MCS) analysis, confirm that CAViaR-SE provides well-calibrated risk measures and statistically superior forecasts compared to standard and augmented CAViaR models.", "published": "2026-03-26T09:17:14Z", "updated": "2026-03-26T09:17:14Z", "authors": ["Demetrio Lacava"], "categories": ["q-fin.RM"], "url": "https://arxiv.org/abs/2603.25217v1", "score": 6.7951} +{"id": "2603.17151v1", "topic": "options_vol_surface", "title": "Shallow Representation of Option Implied Information", "summary": "Option prices encode the market's collective outlook through implied density and implied volatility. An explicit link between implied density and implied volatility translates the risk-neutrality of the former into conditions on the latter to rule out static arbitrage. Despite earlier recognition of their parity, the two had been studied in isolation for decades until the recent demand in implied volatility modeling rejuvenated such parity. This paper provides a systematic approach to build neural representations of option implied information. As a preliminary, we first revisit the explicit link between implied density and implied volatility through an alternative and minimalist lens, where implied volatility is viewed not as volatility but as a pointwise corrector mapping the Black-Scholes quasi-density into the implied risk-neutral density. Building on this perspective, we propose the neural representation that incorporates arbitrage constraints through the differentiable corrector. With an additive logistic model as the synthetic benchmark, extensive experiments reveal that deeper or wider network structures do not necessarily improve the model performance due to the nonlinearity of both arbitrage constraints and neural derivatives. By contrast, a shallow feedforward network with a single hidden layer and a specific activation effectively approximates implied density and implied volatility.", "published": "2026-03-17T21:29:17Z", "updated": "2026-03-17T21:29:17Z", "authors": ["Jimin Lin"], "categories": ["q-fin.CP", "stat.ML"], "url": "https://arxiv.org/abs/2603.17151v1", "score": 6.5007} +{"id": "2603.24154v1", "topic": "portfolio_regime", "title": "The Geometry of Risk: Path-Dependent Regulation and Anticipatory Hedging via the SigSwap", "summary": "This paper introduces a transformative framework for managing path-dependent financial risk by shifting from traditional distribution-centric models to a geometry-based approach. We propose the SigSwap as a new regulatory instrument that allows market participants to decompose complex risk into terminal price law and the underlying texture of the price path. By utilising the mathematical properties of the path-signature, we demonstrate how previously unmodellable risks, such as lead-lag dynamics and flash-crash spiralling, can be converted into transparent and linear risk factors. Central to this framework is the introduction of Signature Expected Shortfall, a risk metric designed to capture toxic path geometries that traditional methods often overlook. We also present a proactive monitoring system based on the Temporal Exposure Profile, which utilises anticipatory learning to detect potential liquidity traps and geometric decoupling before they manifest as realised volatility. The proposed methodology offers a rigorous alignment with global regulatory mandates, specifically the Fundamental Review of the Trading Book (FRTB), by providing a consistent bridge between physical stress-testing and risk-neutral hedging. Finally, we show that this algebraic approach significantly reduces computational complexity, enabling real-time, high-frequency risk reporting and capital optimisation for the modern financial ecosystem.", "published": "2026-03-25T10:24:11Z", "updated": "2026-03-25T10:24:11Z", "authors": ["Daniel Bloch"], "categories": ["q-fin.RM", "q-fin.PM"], "url": "https://arxiv.org/abs/2603.24154v1", "score": 6.0401} +{"id": "2603.19984v1", "topic": "portfolio_regime", "title": "If Not Now, Then When? Model Risk in the Optimal Exercise of American Options", "summary": "Model risk arises from the misspecification of probabilistic models used for pricing and hedging derivatives. While model risk for European-style claims has been widely studied, much less attention has been given to American-style derivatives and the associated optimal stopping problems. This paper analyzes model risk in the optimal exercise of an American put option using the benchmark methodology of Hull and Suo [2002]. The true data-generating process is assumed to follow a Heston stochastic volatility model. We compare the optimal exercise strategy of an investor who correctly uses the Heston model with those of investors who instead use misspecified Black--Scholes or Dupire local volatility models. Optimal exercise boundaries are computed numerically via finite difference methods. Stochastic volatility dynamics and return--volatility correlation are found to have a substantial impact on optimal exercise behavior across models, creating a source of model risk. As this behavior is not transmitted to exercise strategies determined by misspecified models, even if such models are fully calibrated to European option prices, calibration fails to mitigate model risk in this context. This issue persists under frequent recalibration of a misspecified model.", "published": "2026-03-20T14:31:34Z", "updated": "2026-03-20T14:31:34Z", "authors": ["Luna Rigby", "Rüdiger Frey", "Erik Schlögl"], "categories": ["q-fin.MF", "q-fin.RM"], "url": "https://arxiv.org/abs/2603.19984v1", "score": 6.0155} +{"id": "2603.23480v1", "topic": "crypto_market_structure", "title": "Stablecoins as Dry Powder: A Copula-Based Risk Analysis of Cryptocurrency Markets", "summary": "Stablecoins serve as the fundamental infrastructure for Decentralised Finance (DeFi), acting as the primary bridge between fiat currencies and the digital asset ecosystem. While peg stability is well-documented, the structural role stablecoins play in transmitting systemic risk to the broader market remains under-explored. This study uses copula-based approaches to quantify the transmission of volatility and activity from stablecoin to cryptocurrency markets. We demonstrate in-sample causality across daily, weekly, and monthly horizons. Furthermore, we show that incorporating stablecoin factors significantly reduces Mean Squared Error in cryptocurrency forecasting. Specifically, we link stablecoin volume and upside volatility to broader market volatility, indicating its role as dry powder. Finally, we establish economic value by demonstrating reduced risk in a cryptocurrency volatility targeting model when stablecoin factors are employed.", "published": "2026-03-24T17:44:24Z", "updated": "2026-03-24T17:44:24Z", "authors": ["Elliot Jones", "Toshiko Matsui", "William Knottenbelt"], "categories": ["cs.CE"], "url": "https://arxiv.org/abs/2603.23480v1", "score": 5.7852} +{"id": "2603.24137v1", "topic": "execution_microstructure", "title": "Bridging the Reality Gap in Limit Order Book Simulation", "summary": "We introduce a practical, interactive simulator of the limit order book for large-tick assets, designed to produce realistic execution, costs, and P&L. The book state is projected onto a tractable representation based on spread and volume imbalance, enabling robust estimation from market data. Event timing is calibrated to reproduce the fine-scale temporal structure of real markets, revealing a pronounced mode at exchange round-trip latency consistent with simultaneous reactions and latency races among participants. We further incorporate a feedback mechanism that accumulates signed trade flow through a power-law decay kernel, reproducing both concave market impact during execution and partial post-trade reversion. Across several stocks and strategy case studies, the simulator yields realistic behavior where profitability becomes highly sensitive to execution parameters. We present the approach as a practical recipe: project, estimate, validate, adapt, for building realistic limit order book simulations.", "published": "2026-03-25T10:02:03Z", "updated": "2026-03-25T10:02:03Z", "authors": ["Patrick Noble", "Mathieu Rosenbaum", "Saad Souilmi"], "categories": ["q-fin.TR"], "url": "https://arxiv.org/abs/2603.24137v1", "score": 5.5401} +{"id": "2603.24933v1", "topic": "crypto_market_structure", "title": "Decoding Market Emotions in Cryptocurrency Tweets via Predictive Statement Classification with Machine Learning and Transformers", "summary": "The growing prominence of cryptocurrencies has triggered widespread public engagement and increased speculative activity, particularly on social media platforms. This study introduces a novel classification framework for identifying predictive statements in cryptocurrency-related tweets, focusing on five popular cryptocurrencies: Cardano, Matic, Binance, Ripple, and Fantom. The classification process is divided into two stages: Task 1 involves binary classification to distinguish between Predictive and Non-Predictive statements. Tweets identified as Predictive proceed to Task 2, where they are further categorized as Incremental, Decremental, or Neutral. To build a robust dataset, we combined manual and GPT-based annotation methods and utilized SenticNet to extract emotion features corresponding to each prediction category. To address class imbalance, GPT-generated paraphrasing was employed for data augmentation. We evaluated a wide range of machine learning, deep learning, and transformer-based models across both tasks. The results show that GPT-based balancing significantly enhanced model performance, with transformer models achieving the highest F1-score in Task 1, while traditional machine learning models performed best in Task 2. Furthermore, our emotion analysis revealed distinct emotional patterns associated with each prediction category across the different cryptocurrencies.", "published": "2026-03-26T01:52:36Z", "updated": "2026-03-26T01:52:36Z", "authors": ["Moein Shahiki Tash", "Zahra Ahani", "Mohim Tash", "Mostafa Keikhay Farzaneh", "Ari Y. Barrera-Animas", "Olga Kolesnikova"], "categories": ["cs.AI", "cs.CE"], "url": "https://arxiv.org/abs/2603.24933v1", "score": 5.5401} +{"id": "2603.07600v1", "topic": "options_vol_surface", "title": "Differential Machine Learning for 0DTE Options with Stochastic Volatility and Jumps", "summary": "We present a differential machine learning method for zero-days-to-expiry (0DTE) options under a stochastic-volatility jump-diffusion model that computes prices and Greeks in a single network evaluation. To handle the ultra-short-maturity regime, we represent the price in Black--Scholes form with a maturity-gated variance correction, and combine supervision on prices and Greeks with a PIDE-residual penalty. To make the jump contribution identifiable, we introduce a separate jump-operator network and train it with a three-stage procedure. In Bates-model simulations, the method improves jump-term approximation relative to one-stage baselines, keeps price errors close to one-stage alternatives while improving Greeks accuracy, produces stable one-day delta hedges, and is substantially faster than a Fourier-based pricing benchmark.", "published": "2026-03-08T12:10:24Z", "updated": "2026-03-08T12:10:24Z", "authors": ["Takayuki Sakuma"], "categories": ["q-fin.CP"], "url": "https://arxiv.org/abs/2603.07600v1", "score": 5.4563} +{"id": "2603.20580v1", "topic": "portfolio_regime", "title": "Outperforming a Benchmark with $α$-Bregman Wasserstein divergence", "summary": "We consider the problem of active portfolio management, where an investor seeks the portfolio with maximal expected utility of the difference between the terminal wealth of their strategy and a proportion of the benchmark's, subject to a budget and a deviation constraint from the benchmark portfolio. As the investor aims at outperforming the benchmark, they choose a divergence that asymmetrically penalises gains and losses as well as penalises underperforming the benchmark more than outperforming it. This is achieved by the recently introduced $α$-Bregman-Wasserstein divergence, subsuming the Bregman-Wasserstein and the popular Wasserstein divergence. We prove existence and uniqueness, characterise the optimal portfolio strategy, and give explicit conditions when the divergence constraints and the budget constraints are binding. We conclude with a numerical illustration of the optimal quantile function in a geometric Brownian motion market model.", "published": "2026-03-21T00:28:10Z", "updated": "2026-03-21T00:28:10Z", "authors": ["Silvana M. Pesenti", "Thai Nguyen"], "categories": ["q-fin.PM", "q-fin.MF", "q-fin.RM"], "url": "https://arxiv.org/abs/2603.20580v1", "score": 4.7655} +{"id": "2602.18912v1", "topic": "trend_momentum", "title": "Overreaction as an indicator for momentum in algorithmic trading: A Case of AAPL stocks", "summary": "This paper investigates whether short-term market overreactions can be systematically predicted and monetized as momentum signals using high-frequency emotional information and modern machine learning methods. Focusing on Apple Inc. (AAPL), we construct a comprehensive intraday dataset that combines volatility normalized returns with transformer-based emotion features extracted from Twitter messages. Overreactions are defined as extreme return realizations relative to contemporaneous volatility and transaction costs and are modeled as a three-class prediction problem. We evaluate the performance of several nonlinear classifiers, including XGBoost, Random Forests, Deep Neural Networks, and Bidirectional LSTMs, across multiple intraday frequencies (1, 5, 10, and 15 minute data). Model outputs are translated into trading strategies and assessed using risk-adjusted performance measures and formal statistical tests. The results show that machine learning models significantly outperform benchmark overreaction rules at ultra short horizons, while classical behavioral momentum effects dominate at intermediate frequencies, particularly around 10 minutes. Explainability analysis based on SHAP reveals that volatility and negative emotions, especially fear and sadness, play a central role in driving predicted overreactions. Overall, the findings demonstrate that emotion-driven overreactions contain a predictable structure that can be exploited by machine learning models, offering new insights into the behavioral origins of intraday momentum and the interaction between sentiment, volatility, and algorithmic trading.", "published": "2026-02-21T17:31:02Z", "updated": "2026-02-21T17:31:02Z", "authors": ["Szymon Lis", "Robert Ślepaczuk", "Paweł Sakowski"], "categories": ["q-fin.TR", "q-fin.PM"], "url": "https://arxiv.org/abs/2602.18912v1", "score": 4.6323} +{"id": "2603.22058v1", "topic": "portfolio_regime", "title": "Mean Field Equilibrium Asset Pricing Models With Exponential Utility", "summary": "This thesis develops equilibrium asset pricing models in incomplete markets with a large number of heterogeneous agents using mean field game theory. The market equilibrium is characterized by a novel form of mean field backward stochastic differential equations (BSDEs). First, we propose a theoretical model that endogenously derives the equilibrium risk premium. Agents with exponential preferences are heterogeneous in initial wealth, risk aversion, and unspanned stochastic terminal liability. We solve the optimal investment problem using the optimal martingale principle. The equilibrium is characterized by a mean field BSDE whose driver has quadratic growth in both the stochastic integrands and their conditional expectations. We prove the existence of solutions and show that the risk premium clears the market in the large population limit. Second, we extend the model to include consumption and habit formation, relaxing the time-separability assumption of utility functions. A similar mean field BSDE is derived, and its well-posedness and asymptotic behavior are examined. We also introduce an exponential quadratic Gaussian (EQG) reformulation to obtain equilibrium solutions in semi-analytic form. Finally, the model is extended to partially observable markets where agents must infer the risk premium from stock price observations to determine trading strategies. We provide semi-analytic expressions for the equilibrium via the EQG framework, and the equilibrium risk-premium process is constructed endogenously using Kalman-Bucy filtering theory. Numerical simulations are included to visualize the resulting market dynamics.", "published": "2026-03-23T14:54:40Z", "updated": "2026-03-23T14:54:40Z", "authors": ["Masashi Sekine"], "categories": ["q-fin.MF", "q-fin.PM", "q-fin.PR"], "url": "https://arxiv.org/abs/2603.22058v1", "score": 4.2803} +{"id": "2603.21330v1", "topic": "execution_microstructure", "title": "FinRL-X: An AI-Native Modular Infrastructure for Quantitative Trading", "summary": "We present FinRL-X, a modular and deployment-consistent trading architecture that unifies data processing, strategy construction, backtesting, and broker execution under a weight-centric interface. While existing open-source platforms are often backtesting- or model-centric, they rarely provide system-level consistency between research evaluation and live deployment. FinRL-X addresses this gap through a composable strategy pipeline that integrates stock selection, portfolio allocation, timing, and portfolio-level risk overlays within a unified protocol. The framework supports both rule-based and AI-driven components, including reinforcement learning allocators and LLM-based sentiment signals, without altering downstream execution semantics. FinRL-X provides an extensible foundation for reproducible, end-to-end quantitative trading research and deployment. The official FinRL-X implementation is available at https://github.com/AI4Finance-Foundation/FinRL-Trading.", "published": "2026-03-22T17:13:10Z", "updated": "2026-03-22T17:13:10Z", "authors": ["Hongyang Yang", "Boyu Zhang", "Yang She", "Xinyu Liao", "Xiaoli Zhang"], "categories": ["q-fin.TR", "cs.LG", "q-fin.CP"], "url": "https://arxiv.org/abs/2603.21330v1", "score": 4.2753} +{"id": "2603.09006v1", "topic": "trend_momentum", "title": "Spectral Portfolio Theory: From SGD Weight Matrices to Wealth Dynamics", "summary": "We develop spectral portfolio theory by establishing a direct identification: neural network weight matrices trained on stochastic processes are portfolio allocation matrices, and their spectral structure encodes factor decompositions and wealth concentration patterns. The three forces governing stochastic gradient descent (SGD) -- gradient signal, dimensional regularisation, and eigenvalue repulsion -- translate directly into portfolio dynamics: smart money, survival constraint, and endogenous diversification. The spectral properties of SGD weight matrices transition from Marchenko-Pastur statistics (additive regime, short horizon) to inverse-Wishart via the free log-normal (multiplicative regime, long horizon), mirroring the transition from daily returns to long-run wealth compounding. We unify the cross-sectional wealth dynamics of Bouchaud and Mezard (2000), the within-portfolio dynamics of Olsen et al. (2025), and the scalar Fokker-Planck framework via a common spectral foundation. A central result is the Spectral Invariance Theorem: any isotropic perturbation to the portfolio objective preserves the singular-value distribution up to scale and shift, while anisotropic perturbations produce spectral distortion proportional to their cross-asset variance. We develop applications to portfolio design, wealth inequality measurement, tax policy, and neural network diagnostics. In the tax context, the invariance result recovers and generalises the neutrality conditions of Frøseth (2026).", "published": "2026-03-09T22:50:50Z", "updated": "2026-03-09T22:50:50Z", "authors": ["Anders G Frøseth"], "categories": ["q-fin.PM", "physics.soc-ph"], "url": "https://arxiv.org/abs/2603.09006v1", "score": 3.9612} +{"id": "2603.02898v1", "topic": "trend_momentum", "title": "Range-Based Volatility Estimators for Monitoring Market Stress: Evidence from Local Food Price Data", "summary": "Range-based volatility estimators are widely used in financial econometrics to quantify risk and market stress, yet their application to local commodity markets remains limited. This paper shows how open-high--low-close (OHLC) volatility estimators can be adapted to monitor localized market distress across diverse development contexts, including conflict-affected settings, climate-exposed regions, remote and thinly traded markets, and import- and logistics-constrained urban hubs. Using monthly food price data from the World Bank's Real-Time Prices dataset, several volatility measures -- including the Parkinson, Garman-Klass, Rogers-Satchell, and Yang-Zhang estimators -- are constructed and evaluated against independently documented disruption timelines. Across settings, elevated volatility aligns with episodes linked to insecurity and market fragmentation, extreme weather and disaster shocks, policy and fuel-cost adjustments, and global supply-chain and trade disruptions. Volatility also detects stress that standard momentum indicators such as the relative strength index (RSI) can miss, including symmetric or rapidly reversing shocks in which offsetting supply and demand disturbances dampen net directional price movements while amplifying intra-period dispersion. Overall, OHLC-based volatility indicators provide a robust and interpretable signal of market disruptions and complement price-level monitoring for applications spanning financial risk, humanitarian early warning, and trade.", "published": "2026-03-03T11:47:45Z", "updated": "2026-03-03T11:47:45Z", "authors": ["Bo Pieter Johannes Andrée"], "categories": ["q-fin.ST", "econ.EM", "stat.AP"], "url": "https://arxiv.org/abs/2603.02898v1", "score": 3.9316} +{"id": "2603.25320v1", "topic": "portfolio_regime", "title": "Semi-Static Variance-Optimal Hedging of Covariance Risk in Multi-Asset Derivatives", "summary": "We develop a semi-static framework for the variance-optimal hedging of multi-asset derivatives exposed to correlation and covariance risk. The approach combines continuous-time dynamic trading in the underlying assets with a static portfolio of auxiliary contingent claims. Using a multivariate Galtchouk--Kunita--Watanabe decomposition, we show that the resulting global mean-variance problem decouples naturally into an inner continuous-time projection onto the space spanned by the underlying assets and an outer finite-dimensional quadratic optimization over the static hedging instruments. To systematically select suitable auxiliary claims, we leverage multidimensional functional spanning theory, establishing that otherwise unhedgeable cross-gamma exposures can be structurally mitigated through static strips of vanilla, product, and spread options. As a central application, we derive explicit semi-static replication formulas for covariance swaps and geometric dispersion trades. Our framework accommodates a broad class of asset dynamics, including quadratic and stochastic Volterra covariance models, as well as affine stochastic covariance models with jumps, yielding tractable semi-closed-form solutions via Fourier transform techniques. Extensive numerical experiments demonstrate that incorporating optimally weighted static strips of cross-asset instruments substantially reduces the mean-squared hedging error relative to purely dynamic benchmark strategies across various model classes.", "published": "2026-03-26T11:09:20Z", "updated": "2026-03-26T11:09:20Z", "authors": ["Konstantinos Chatziandreou", "Sven Karbach"], "categories": ["q-fin.MF", "q-fin.RM"], "url": "https://arxiv.org/abs/2603.25320v1", "score": 3.7951} +{"id": "2603.22880v1", "topic": "portfolio_regime", "title": "Portfolio Optimization under Recursive Utility via Reinforcement Learning", "summary": "We study whether a risk-sensitive objective from asset-pricing theory -- recursive utility -- improves reinforcement learning for portfolio allocation. The Bellman equation under recursive utility involves a certainty equivalent (CE) of future value that has no closed form under observed returns; we approximate it by $K$-sample Monte Carlo and train actor-critic (PPO, A2C) on the resulting value target and an approximate advantage estimate (AAE) that generalizes the Bellman residual to multi-step with state-dependent weights. This formulation applies only to critic-based algorithms. On 10 chronological train/test splits of South Korean ETF data, the recursive-utility agent improves on the discounted (naive) baseline in Sharpe ratio, max drawdown, and cumulative return. Derivations, world model and metrics, and full result tables are in the appendices.", "published": "2026-03-24T07:25:30Z", "updated": "2026-03-24T07:25:30Z", "authors": ["Minkey Chang"], "categories": ["q-fin.GN", "cs.CE", "q-fin.PM"], "url": "https://arxiv.org/abs/2603.22880v1", "score": 3.7852} +{"id": "2603.15947v1", "topic": "trend_momentum", "title": "Hyper-Adaptive Momentum Dynamics for Native Cubic Portfolio Optimization: Avoiding Quadratization Distortion in Higher-Order Cardinality-Constrained Search", "summary": "We study cubic cardinality-constrained portfolio optimization, a higher-order extension of the standard Markowitz formulation where three-way sector co-movement terms augment the quadratic risk-return objective. Classical heuristics like simulated annealing (SA) and tabu search require Rosenberg quadratization of these cubic interactions. This inflates the variable count from n to 5n and introduces penalty terms that substantially distort the augmented search landscape. In contrast, Hyper-Adaptive Momentum Dynamics (HAMD) operates directly on the native higher-order objective using a hybrid pipeline combining continuous Hamiltonian search, exact cardinality-preserving projection, and iterated local search (ILS). On a cubic portfolio benchmark under matched 60-second CPU budgets, HAMD achieves substantially lower decoded native cubic objective values than SA and tabu search, yielding single-seed relative improvements of 87.9%, 71.2%, 59.5%, and 46.9% at n = 200, 300, 500, and 1000. In a detailed three-seed study at n = 200, HAMD attains a median native objective of 195.65 (zero variance), while SA and tabu yield 1208.07. Decoded-feasibility analysis shows SA satisfies all exact cardinality and Rosenberg auxiliary constraints, yet decodes to a native objective 80-88% worse than HAMD, demonstrating a surrogate-distortion effect rather than simple infeasibility. Exact calibration on small instances (n = 20, 25, 30) confirms HAMD finds the provably global optimum in 9/9 trials. These results demonstrate that native higher-order search offers a substantial advantage over quadratized surrogate optimization for constrained cubic portfolio problems.", "published": "2026-03-16T21:53:00Z", "updated": "2026-03-16T21:53:00Z", "authors": ["Greg Serbarinov"], "categories": ["q-fin.CP", "q-fin.MF", "q-fin.PM", "q-fin.RM"], "url": "https://arxiv.org/abs/2603.15947v1", "score": 3.7458} +{"id": "2603.21672v2", "topic": "portfolio_regime", "title": "Mislearning of Factor Risk Premia under Structural Breaks: A Misspecified Bayesian Learning Framework", "summary": "While asset-pricing models increasingly recognize that factor risk premia are subject to structural change, existing literature typically assumes that investors correctly account for such instability. This paper asks what happens when investors instead learn under a misspecified model that underestimates structural breaks. We propose a minimal Bayesian framework in which this misspecification generates persistent prediction errors and pricing distortions, and we introduce an empirically tractable measure of mislearning intensity $(Δ_t)$ based on predictive likelihood ratios. The empirical results yield three main findings. First, in benchmark factor systems, elevated mislearning does not forecast a deterministic short-run collapse in performance; instead, it is associated with stronger long-horizon returns and Sharpe ratios, consistent with an equilibrium premium for acute model uncertainty. Second, in a broader anomaly universe, this pricing relation does not generalize uniformly. There, mislearning is more strongly associated with future drawdowns, downside semivolatility, and other measures of instability, with substantial heterogeneity across anomaly families. Third, the institutional evidence does not support a robust passive absorber mechanism. Rather than systematically damping mislearning, passive capital primarily changes how mislearning is expressed in subsequent outcomes. Within both the FF6 and q5 factor systems, higher passive intensity is more consistent with a weak shift away from future Sharpe compensation and toward future risk realization and lower cumulative returns, while in the anomaly universe passive exposure operates more heterogeneously through partial family-level structure shifting. Taken together, the results suggest that mislearning is a conditional pricing force whose empirical manifestation depends on both asset structure and market structure.", "published": "2026-03-23T07:54:15Z", "updated": "2026-03-24T16:33:31Z", "authors": ["Yimeng Qiu"], "categories": ["q-fin.PM", "q-fin.ST", "q-fin.TR", "stat.OT"], "url": "https://arxiv.org/abs/2603.21672v2", "score": 3.5303} +{"id": "2603.20456v1", "topic": "execution_microstructure", "title": "Neural Hidden Markov Model with Adaptive Granularity Attention for High-Frequency Order Flow Modeling", "summary": "We propose a Neural Hidden Markov Model (HMM) with Adaptive Granularity Attention (AGA) for high-frequency order flow modeling. The model addresses the challenge of capturing multi-scale temporal dynamics in financial markets, where fine-grained microstructure signals and coarse-grained liquidity trends coexist. The proposed framework integrates parallel multi-resolution encoders, including a dilated convolutional network for tick-level patterns and a wavelet-LSTM module for low-frequency dynamics. A gating mechanism conditioned on local volatility and transaction intensity adaptively fuses multi-scale representations, while a multi-head attention layer further enhances temporal dependency modeling. Within this architecture, a Neural HMM with conditional normalizing flow emissions is employed to jointly model latent market regimes and complex observation distributions. Empirical results on high-frequency limit order book data demonstrate that the proposed model outperforms fixed-resolution baselines in predicting short-term price movements and liquidity shocks. The adaptive granularity mechanism enables the model to dynamically adjust its focus across time scales, providing improved performance particularly during volatile market conditions.", "published": "2026-03-20T19:36:00Z", "updated": "2026-03-20T19:36:00Z", "authors": ["Tianzuo Hu"], "categories": ["q-fin.ST", "q-fin.TR"], "url": "https://arxiv.org/abs/2603.20456v1", "score": 3.5155} +{"id": "2603.19716v1", "topic": "portfolio_regime", "title": "Optimal Hedge Ratio for Delta-Neutral Liquidity Provision under Liquidation Constraints", "summary": "We study the problem of optimally hedging the price exposure of liquidity positions in constant-product automated market makers (AMMs) when the hedge is funded by collateralized borrowing. A liquidity provider (LP) who borrows tokens to construct a delta-neutral position faces a trade-off: higher hedge ratios reduce price exposure but increase liquidation risk through tighter collateral utilization. We model token prices as correlated geometric Brownian motions and derive the hedge ratio h that maximizes risk-adjusted return subject to a liquidation-probability constraint expressed via a first-passage-time bound. The unconstrained optimum h* admits a closed-form expression, but at h* the liquidation probability is prohibitively high. The practical optimum h** = min(h*, h_bar(alpha)) is determined by the binding liquidation constraint h_bar(alpha), which we evaluate analytically via the first-passage-time formula and confirm with Monte Carlo simulation. Simulations calibrated to on-chain data validate the analytical results, demonstrate robustness across realistic parameter ranges, and show that the optimal hedge ratio lies between 50% and 70% for typical DeFi lending conditions. Practical guidelines for rebalancing frequency and position sizing are also provided.", "published": "2026-03-20T07:47:03Z", "updated": "2026-03-20T07:47:03Z", "authors": ["Atsushi Hane"], "categories": ["q-fin.PM"], "url": "https://arxiv.org/abs/2603.19716v1", "score": 3.5155} +{"id": "2603.19136v1", "topic": "statarb_pairs", "title": "Adaptive Regime-Aware Stock Price Prediction Using Autoencoder-Gated Dual Node Transformers with Reinforcement Learning Control", "summary": "Stock markets exhibit regime-dependent behavior where prediction models optimized for stable conditions often fail during volatile periods. Existing approaches typically treat all market states uniformly or require manual regime labeling, which is expensive and quickly becomes stale as market dynamics evolve. This paper introduces an adaptive prediction framework that adaptively identifies deviations from normal market conditions and routes data through specialized prediction pathways. The architecture consists of three components: (1) an autoencoder trained on normal market conditions that identifies anomalous regimes through reconstruction error, (2) dual node transformer networks specialized for stable and event-driven market conditions respectively, and (3) a Soft Actor-Critic reinforcement learning controller that adaptively tunes the regime detection threshold and pathway blending weights based on prediction performance feedback. The reinforcement learning component enables the system to learn adaptive regime boundaries, defining anomalies as market states where standard prediction approaches fail. Experiments on 20 S&P 500 stocks spanning 1982 to 2025 demonstrate that the proposed framework achieves 0.68% MAPE for one-day predictions without the reinforcement controller and 0.59% MAPE with the full adaptive system, compared to 0.80% for the baseline integrated node transformer. Directional accuracy reaches 72% with the complete framework. The system maintains robust performance during high-volatility periods, with MAPE below 0.85% when baseline models exceed 1.5%. Ablation studies confirm that each component contributes meaningfully: autoencoder routing accounts for 36% relative MAPE degradation upon removal, followed by the SAC controller at 15% and the dual-path architecture at 7%.", "published": "2026-03-19T16:55:33Z", "updated": "2026-03-19T16:55:33Z", "authors": ["Mohammad Al Ridhawi", "Mahtab Haj Ali", "Hussein Al Osman"], "categories": ["cs.LG", "cs.AI", "q-fin.ST"], "url": "https://arxiv.org/abs/2603.19136v1", "score": 3.5105} +{"id": "2603.07616v1", "topic": "options_vol_surface", "title": "SABR Type Libor (Forward) Market Model (SABR/LMM) with time-dependent skew and smile", "summary": "Volatility Skew and Smile of Interest Rate products (Swaption and Caplet) are represented by SABR (Stochastic Alpha Beta Rho model). So, the Interest Rate derivatives model for pricing the callable exotic swaps should be comparable to the SABR volatility surface. In the interest rate derivatives models, Libor Market Model (LMM) (in a post-Libor world, Forward Market Model (FMM)) is one of the most popular models used in the market. So, there are many attempts to develop LMMs that are comparable to the SABR surface. It is called SABR/LMM. There are many references for SABR/LMM, but most of them only treat SABR/LMM, which is not flexible enough to be used practically in global banks. The purpose of this paper is to provide a comprehensive definition of SABR/LMM and a complete description of how it is to be implemented.", "published": "2026-03-08T13:03:59Z", "updated": "2026-03-08T13:03:59Z", "authors": ["Osamu Tsuchiya"], "categories": ["q-fin.MF", "q-fin.PR"], "url": "https://arxiv.org/abs/2603.07616v1", "score": 3.4563} +{"id": "2603.14760v1", "topic": "options_vol_surface", "title": "At-the-money short-time call-price asymptotics for new classes of exponential Lévy models", "summary": "We develop at-the-money call-price and implied volatility asymptotic expansions in time to maturity for a class of asset-price models whose log returns follow a Lévy process. Under mild assumptions placing the driving Lévy process in the small-time domain of attraction of an $α$-stable law with $α\\in (1,2)$, we give first-order at-the-money call-price and implied volatility asymptotics. A key observation is that both the stable domain of attraction and the finiteness of the centering constant $\\barμ$ are preserved under the share measure transformation, so that all of the distributional input needed for the call-price expansion can be read off from the regular variation of the Lévy measure near the origin. When the Lévy process has no Brownian component, new rates of convergence of the form $t^{1/α} \\ell(t)$ where $\\ell$ is a slowly varying function are obtained. We provide an example of an exponential Lévy model exhibiting this behavior, with $\\ell$ not asymptotically constant, yielding a convergence rate of $(t / \\log(1/t))^{1/α}$. In the case of a Lévyprocess with Brownian component, we show that the jump contribution is always lower order, so that the leading $\\sqrt{t}$ behavior of the at-the-money call price is universal and driven entirely by the Gaussian part of the characteristic triplet.", "published": "2026-03-16T02:44:27Z", "updated": "2026-03-16T02:44:27Z", "authors": ["Allen Hoffmeyer", "Christian Houdré"], "categories": ["q-fin.PR", "math.PR"], "url": "https://arxiv.org/abs/2603.14760v1", "score": 3.2408} +{"id": "2603.10202v1", "topic": "trend_momentum", "title": "Hybrid Hidden Markov Model for Modeling Equity Excess Growth Rate Dynamics: A Discrete-State Approach with Jump-Diffusion", "summary": "Generating synthetic financial time series that preserve statistical properties of real market data is essential for stress testing, risk model validation, and scenario design. Existing approaches, from parametric models to deep generative networks, struggle to simultaneously reproduce heavy-tailed distributions, negligible linear autocorrelation, and persistent volatility clustering. We propose a hybrid hidden Markov framework that discretizes continuous excess growth rates into Laplace quantile-defined market states and augments regime switching with a Poisson-driven jump-duration mechanism to enforce realistic tail-state dwell times. Parameters are estimated by direct transition counting, bypassing the Baum-Welch EM algorithm. Synthetic data quality is evaluated using Kolmogorov-Smirnov and Anderson-Darling pass rates for distributional fidelity, and ACF mean absolute error for temporal structure. Applied to ten years of SPY data across 1,000 simulated paths, the framework achieves KS and AD pass rates exceeding 97% and 91% in-sample and 94% out-of-sample (calendar year 2025), partially reproducing the ARCH effect that standard regime-switching models miss. No single model dominates all quality dimensions: GARCH(1,1) reproduces volatility clustering more accurately but fails distributional tests (5.5% KS pass rate), while the standard HMM without jumps achieves higher distributional fidelity but cannot generate persistent high-volatility regimes. The proposed framework offers the best joint quality profile across distributional, temporal, and tail-coverage metrics. A Single-Index Model extension propagates the SPY factor path to a 424-asset universe, enabling scalable correlated synthetic path generation while preserving cross-sectional correlation structure.", "published": "2026-03-10T20:06:53Z", "updated": "2026-03-10T20:06:53Z", "authors": ["Abdulrahman Alswaidan", "Jeffrey D. Varner"], "categories": ["q-fin.ST", "cs.LG", "q-fin.RM"], "url": "https://arxiv.org/abs/2603.10202v1", "score": 3.2162} +{"id": "2603.25285v1", "topic": "portfolio_regime", "title": "Shifting Correlations: How Trade Policy Uncertainty Alters stock-T bill Relationships", "summary": "This paper examines how trade policy uncertainty influences the correlation between U.S. stock indices and short-term government bonds. The objective is to assess whether policy-related shocks, especially those linked to trade tensions, alter the traditional stock-T bill relationship and its implications for investors. We extend the Dynamic Conditional Correlation (DCC) framework by incorporating exogenous variables to account for external shocks. Three specifications are analyzed: one using the Trade Policy Uncertainty (TPU) index, one including a dummy variable reflecting presidential-cycle effects, and one combining both through an interaction term. The analysis is based on daily data for major U.S. stock indices and the 3-month Treasury bill. Results indicate that trade policy uncertainty exerts a significant effect on stock-T bill correlations. Moreover, its influence becomes stronger under specific political conditions, suggesting that political agendas can amplify the impact of trade-related shocks on financial markets. Crucially, augmenting the DCC framework with trade-policy-related variables improves also the economic relevance of correlation forecasts. Therefore, this study contributes to the literature by explicitly integrating policy-related uncertainty into correlation modeling through an augmented DCC framework. The findings provide new insights for portfolio allocation and risk management in environments characterized by heightened trade tensions.", "published": "2026-03-26T10:23:33Z", "updated": "2026-03-26T10:23:33Z", "authors": ["Demetrio Lacava"], "categories": ["q-fin.RM"], "url": "https://arxiv.org/abs/2603.25285v1", "score": 3.0451} +{"id": "2603.24640v1", "topic": "portfolio_regime", "title": "Ordering results for extreme claim amounts based on random number of claims", "summary": "Consider two sequences of heterogeneous and independent portfolios of risks $T_1,T_2,\\ldots$ and $T^*_{1}, T^*_{2},\\ldots$ and, let $N_1$ and $N_2$ be two positive integer-valued random variables, independent of $T_i'$ and $T^*_i$, respectively. In this article, we investigate different stochastic inequalities involving $\\min\\{T_1,\\ldots,T_{N_1}\\}$ and $\\min\\{T^*_1,\\ldots,T^*_{N_2}\\},$ and $\\max\\{T_1,\\ldots,T_{N_1}\\}$ and $\\max\\{T^*_1,\\ldots,T^*_{N_2}\\}$ in the sense of usual stochastic order and reversed hazard rate order concerning maltivariate chain majorization order. These new results strengthen and generalize some of the well known results in the literature, including \\cite{barmalzan2017ordering}, \\cite{balakrishnan2018} and \\cite{kundu2021_shock} for the case of random claim sizes. Different numerical examples are provided to highlight the applicability of this work. Finally, some interesting applications of our results in reliability theory and auction theory are presented.", "published": "2026-03-25T11:43:40Z", "updated": "2026-03-25T11:43:40Z", "authors": ["Sangita Das"], "categories": ["q-fin.RM", "math.PR", "math.ST"], "url": "https://arxiv.org/abs/2603.24640v1", "score": 3.0401} +{"id": "2603.22569v1", "topic": "portfolio_regime", "title": "Proxy-Reliance Control in Conformal Recalibration of One-Sided Value-at-Risk", "summary": "We introduce a proxy-reliance-controlled conformal recalibration framework for one-sided Value-at-Risk (VaR), and study a question that existing state-aware methods do not usually isolate: how strongly should the recalibration adjustment depend on an imperfect volatility proxy? We formalize this through a proxy-reliance parameter that continuously interpolates between an approximately constant-shift correction and a fully proxy-scaled correction. This makes proxy reliance a distinct and practically interpretable design choice in one-sided VaR recalibration. We show theoretically that larger proxy reliance increases the responsiveness of the tail adjustment to proxy scale, but also increases stressed-state fragility when the proxy underreacts. Empirically, in rolling out-of-sample tests on a six-ETF panel with VIX-linked state variables, and with supporting evidence from SPY, we find that the empirical value of proxy-reliance control lies in improved stressed-state robustness rather than uniform overall dominance. In particular, when the baseline forecast remains exposed to proxy imperfection in stressed states, lower or intermediate proxy reliance can outperform fully proxy-scaled recalibration in stressed left-tail VaR control.", "published": "2026-03-23T20:59:44Z", "updated": "2026-03-23T20:59:44Z", "authors": ["Tenghan Zhong"], "categories": ["q-fin.RM", "stat.ME"], "url": "https://arxiv.org/abs/2603.22569v1", "score": 3.0303} +{"id": "2602.23784v1", "topic": "options_vol_surface", "title": "TradeFM: A Generative Foundation Model for Trade-flow and Market Microstructure", "summary": "Foundation models have transformed domains from language to genomics by learning general-purpose representations from large-scale, heterogeneous data. We introduce TradeFM, a 524M-parameter generative Transformer that brings this paradigm to market microstructure, learning directly from billions of trade events across >9K equities. To enable cross-asset generalization, we develop scale-invariant features and a universal tokenization scheme that map the heterogeneous, multi-modal event stream of order flow into a unified discrete sequence -- eliminating asset-specific calibration. Integrated with a deterministic market simulator, TradeFM-generated rollouts reproduce key stylized facts of financial returns, including heavy tails, volatility clustering, and absence of return autocorrelation. Quantitatively, TradeFM achieves 2-3x lower distributional error than Compound Hawkes baselines and generalizes zero-shot to geographically out-of-distribution APAC markets with moderate perplexity degradation. Together, these results suggest that scale-invariant trade representations capture transferable structure in market microstructure, opening a path toward synthetic data generation, stress testing, and learning-based trading agents.", "published": "2026-02-27T08:26:53Z", "updated": "2026-02-27T08:26:53Z", "authors": ["Maxime Kawawa-Beaudan", "Srijan Sood", "Kassiani Papasotiriou", "Daniel Borrajo", "Manuela Veloso"], "categories": ["cs.LG", "cs.AI", "q-fin.CP", "q-fin.TR"], "url": "https://arxiv.org/abs/2602.23784v1", "score": 2.9119} +{"id": "2603.13252v1", "topic": "trend_momentum", "title": "When Alpha Breaks: Two-Level Uncertainty for Safe Deployment of Cross-Sectional Stock Rankers", "summary": "Cross-sectional ranking models are often deployed as if point predictions were sufficient: the model outputs scores and the portfolio follows the induced ordering. Under non-stationarity, rankers can fail during regime shifts. In the AI Stock Forecaster, a LightGBM ranker performs well overall at a 20-day horizon, yet the 2024 holdout coincides with an AI thematic rally and sector rotation that breaks the signal at longer horizons and weakens 20d. This motivates treating deployment as two decisions: (i) whether the strategy should trade at all, and (ii) how to control risk within active trades. We adapt Direct Epistemic Uncertainty Prediction (DEUP) to ranking by predicting rank displacement and defining an epistemic uncertainty signal ehat relative to a point-in-time (PIT-safe) baseline. Empirically, ehat is structurally coupled with signal strength (median correlation between ehat and absolute score is about 0.6 across 1,865 dates), so inverse-uncertainty sizing de-levers the strongest signals and degrades performance. To address this, we propose a two-level deployment policy: a strategy-level regime-trust gate G(t) that decides whether to trade (AUROC around 0.72 overall and 0.75 in FINAL) and a position-level epistemic tail-risk cap that reduces exposure only for the most uncertain predictions. The operational policy, trade only when G(t) is at least 0.2, apply volatility sizing on active dates, and cap the top epistemic tail, improves risk-adjusted performance in the 20d policy comparison and indicates DEUP adds value mainly as a tail-risk guard rather than a continuous sizing denominator.", "published": "2026-02-24T14:02:24Z", "updated": "2026-02-24T14:02:24Z", "authors": ["Ursina Sanderink"], "categories": ["cs.AI", "cs.LG", "q-fin.PM"], "url": "https://arxiv.org/abs/2603.13252v1", "score": 2.8971} +{"id": "2603.17692v1", "topic": "options_vol_surface", "title": "Can Blindfolded LLMs Still Trade? An Anonymization-First Framework for Portfolio Optimization", "summary": "For LLM trading agents to be genuinely trustworthy, they must demonstrate understanding of market dynamics rather than exploitation of memorized ticker associations. Building responsible multi-agent systems demands rigorous signal validation: proving that predictions reflect legitimate patterns, not pre-trained recall. We address two sources of spurious performance: memorization bias from ticker-specific pre-training, and survivorship bias from flawed backtesting. Our approach is to blindfold the agents--anonymizing all identifiers--and verify whether meaningful signals persist. BlindTrade anonymizes tickers and company names, and four LLM agents output scores along with reasoning. We construct a GNN graph from reasoning embeddings and trade using PPO-DSR policy. On 2025 YTD (through 2025-08-01), we achieved Sharpe 1.40 +/- 0.22 across 20 seeds and validated signal legitimacy through negative control experiments. To assess robustness beyond a single OOS window, we additionally evaluate an extended period (2024--2025), revealing market-regime dependency: the policy excels in volatile conditions but shows reduced alpha in trending bull markets.", "published": "2026-03-18T13:09:11Z", "updated": "2026-03-18T13:09:11Z", "authors": ["Joohyoung Jeon", "Hongchul Lee"], "categories": ["cs.LG", "cs.AI", "q-fin.CP", "q-fin.PM"], "url": "https://arxiv.org/abs/2603.17692v1", "score": 2.7556} +{"id": "2602.00082v1", "topic": "trend_momentum", "title": "Design and Empirical Study of a Large Language Model-Based Multi-Agent Investment System for Chinese Public REITs", "summary": "This study addresses the low-volatility Chinese Public Real Estate Investment Trusts (REITs) market, proposing a large language model (LLM)-driven trading framework based on multi-agent collaboration. The system constructs four types of analytical agents-announcement, event, price momentum, and market-each conducting analysis from different dimensions; then the prediction agent integrates these multi-source signals to output directional probability distributions across multiple time horizons, then the decision agent generates discrete position adjustment signals based on the prediction results and risk control constraints, thereby forming a closed loop of analysis-prediction-decision-execution. This study further compares two prediction model pathways: for the prediction agent, directly calling the general-purpose large model DeepSeek-R1 versus using a specialized small model Qwen3-8B fine-tuned via supervised fine-tuning and reinforcement learning alignment. In the backtest from October 2024 to October 2025, both agent-based strategies significantly outperformed the buy-and-hold benchmark in terms of cumulative return, Sharpe ratio, and maximum drawdown. The results indicate that the multi-agent framework can effectively enhance the risk-adjusted return of REITs trading, and the fine-tuned small model performs close to or even better than the general-purpose large model in some scenarios.", "published": "2026-01-22T16:35:27Z", "updated": "2026-01-22T16:35:27Z", "authors": ["Zheng Li"], "categories": ["q-fin.ST", "cs.AI", "q-fin.TR"], "url": "https://arxiv.org/abs/2602.00082v1", "score": 2.7344} +{"id": "2603.02620v1", "topic": "options_vol_surface", "title": "Same Error, Different Function: The Optimizer as an Implicit Prior in Financial Time Series", "summary": "Neural networks applied to financial time series operate in a regime of underspecification, where model predictors achieve indistinguishable out-of-sample error. Using large-scale volatility forecasting for S$\\&$P 500 stocks, we show that different model-training-pipeline pairs with identical test loss learn qualitatively different functions. Across architectures, predictive accuracy remains unchanged, yet optimizer choice reshapes non-linear response profiles and temporal dependence differently. These divergences have material consequences for decisions: volatility-ranked portfolios trace a near-vertical Sharpe-turnover frontier, with nearly $3\\times$ turnover dispersion at comparable Sharpe ratios. We conclude that in underspecified settings, optimization acts as a consequential source of inductive bias, thus model evaluation should extend beyond scalar loss to encompass functional and decision-level implications.", "published": "2026-03-03T05:47:19Z", "updated": "2026-03-03T05:47:19Z", "authors": ["Federico Vittorio Cortesi", "Giuseppe Iannone", "Giulia Crippa", "Tomaso Poggio", "Pierfrancesco Beneventano"], "categories": ["cs.LG", "q-fin.CP"], "url": "https://arxiv.org/abs/2603.02620v1", "score": 2.6816} +{"id": "2602.06198v1", "topic": "trend_momentum", "title": "Insider Purchase Signals in Microcap Equities: Gradient Boosting Detection of Abnormal Returns", "summary": "This paper examines whether SEC Form 4 insider purchase filings predict abnormal returns in U.S. microcap stocks. The analysis covers 17,237 open-market purchases across 1,343 issuers from 2018 through 2024, restricted to market capitalizations between \\$30M and \\$500M. A gradient boosting classifier trained on insider identity, transaction history, and market conditions at disclosure achieves AUC of 0.70 on out-of-sample 2024 data. At an optimized threshold of 0.20, precision is 0.38 and recall is 0.69. The distance from the 52-week high dominates feature importance, accounting for 36% of predictive signal. A momentum pattern emerges in the data: transactions disclosed after price appreciation exceeding 10% yield the highest mean cumulative abnormal return (6.3%) and the highest probability of outperformance (36.7%). This contrasts with the simple mean-reversion intuition often applied to post-run-up entries. The result is robust to winsorization and holds across subsamples. These patterns are consistent with slower information incorporation in illiquid markets, where trend confirmation may filter for higher-conviction insider signals.", "published": "2026-02-05T21:19:28Z", "updated": "2026-02-05T21:19:28Z", "authors": ["Hangyi Zhao"], "categories": ["q-fin.ST", "q-fin.TR"], "url": "https://arxiv.org/abs/2602.06198v1", "score": 2.5534} +{"id": "2602.07046v2", "topic": "trend_momentum", "title": "Same Returns, Different Risks: How Cryptocurrency Markets Process Infrastructure vs Regulatory Shocks", "summary": "We investigate whether cryptocurrency markets differentiate between infrastructure failures and regulatory enforcement at the return level, complementing a companion conditional variance analysis that finds 5.7 times larger volatility impacts from infrastructure events (p = 0.0008). Using event-level block bootstrap inference on 31 events across Bitcoin, Ethereum, Solana, and Cardano (2019-2025), we find no statistically significant difference in cumulative abnormal returns between infrastructure failures (-7.6%) and regulatory enforcement (-11.1%): the difference of +3.6 pp has p = 0.81 with 95% CI [-25.3%, +30.9%]. This null acquires substantive meaning alongside the companion's highly significant variance result: the same events that produce indistinguishable return responses generate dramatically different volatility signatures. Markets differentiate shock types through the risk channel -- the second moment -- rather than expected returns. The block bootstrap methodology, which resamples entire events to preserve cross-sectional correlation, reveals that prior parametric approaches systematically understate uncertainty by inflating degrees of freedom. Results are robust across eight specifications including permutation tests, leave-one-out analysis, and the Ibragimov-Mueller few-cluster test.", "published": "2026-02-04T09:59:24Z", "updated": "2026-02-14T06:46:52Z", "authors": ["Murad Farzulla"], "categories": ["q-fin.ST", "q-fin.CP", "stat.AP"], "url": "https://arxiv.org/abs/2602.07046v2", "score": 2.5485} +{"id": "2603.24064v1", "topic": "portfolio_regime", "title": "Utility-Invariant Support Selection and Eventwise Decoupling for Simultaneous Independent Multi-Outcome Bets", "summary": "For simultaneous independent events with finitely many outcomes, consider the expected-utility problem with nonnegative wagers and an endogenous cash position. We prove a short support theorem for a broad class of strictly increasing strictly concave utilities. On any fixed support family and at any optimal portfolio with positive cash, summing the active first-order conditions and comparing that sum with cash stationarity yields the exact identity \\[ \\fracλ{K_{\\ell}^{(U)}}=\\frac{1-P_{\\ell,A}}{1-Q_{\\ell,A}}, \\] where $P_{\\ell,A}$ and $Q_{\\ell,A}$ are the active probability and price masses of event $\\ell$, $λ$ is the budget multiplier, and $K_{\\ell}^{(U)}$ is the continuation factor seen by inactive outcomes of that event. Consequently, after sorting each event by the edge ratio $p_{\\ell i}/π_{\\ell i}$, the exact active support is the eventwise union of the single-event supports, and this support is independent of the utility function. The single-event utility-invariant support theorem is already explicit in the free-exposure pari-mutuel setting in Smoczynski and Miles; the point of the present note is that the simultaneous independent-events analogue follows from the same state-price geometry once the right continuation factor is identified.", "published": "2026-03-25T08:18:33Z", "updated": "2026-03-25T08:18:33Z", "authors": ["Christopher D. Long"], "categories": ["math.OC", "q-fin.PM"], "url": "https://arxiv.org/abs/2603.24064v1", "score": 2.5401} +{"id": "2603.22567v1", "topic": "crypto_market_structure", "title": "TrustTrade: Human-Inspired Selective Consensus Reduces Decision Uncertainty in LLM Trading Agents", "summary": "Large language models (LLMs) are increasingly deployed as autonomous agents in financial trading. However, they often exhibit a hazardous behavioral bias that we term uniform trust, whereby retrieved information is implicitly assumed to be factual and heterogeneous sources are treated as equally informative. This assumption stands in sharp contrast to human decision-making, which relies on selective filtering, cross-validation, and experience-driven weighting of information sources. As a result, LLM-based trading systems are particularly vulnerable to multi-source noise and misinformation, amplifying factual hallucinations and leading to unstable risk-return performance. To bridge this behavioral gap, we introduce TrustTrade (Trust-Rectified Unified Selective Trader), a multi-agent selective consensus framework inspired by human epistemic heuristics. TrustTrade replaces uniform trust with cross-agent consistency by aggregating information from multiple independent LLM agents and dynamically weighting signals based on their semantic and numerical agreement. Consistent signals are prioritized, while divergent, weakly grounded, or temporally inconsistent inputs are selectively discounted. To further stabilize decision-making, TrustTrade incorporates deterministic temporal signals as reproducible anchors and a reflective memory mechanism that adapts risk preferences at test time without additional training. Together, these components suppress noise amplification and hallucination-driven volatility, yielding more stable and risk-aware trading behavior. Across controlled backtesting in high-noise market environments (2024 Q1 and 2026 Q1), the proposed TrustTrade calibrates LLM trading behavior from extreme risk-return regimes toward a human-aligned, mid-risk and mid-return profile.", "published": "2026-03-23T20:54:50Z", "updated": "2026-03-23T20:54:50Z", "authors": ["Minghan Li", "Rachel Gonsalves", "Weiyue Li", "Sunghoon Yoon", "Mengyu Wang"], "categories": ["cs.CE", "cs.MA"], "url": "https://arxiv.org/abs/2603.22567v1", "score": 2.5303} +{"id": "2603.19380v1", "topic": "statarb_pairs", "title": "Survivorship Bias in Emerging Market Small-Cap Indices: Evidence from India's NIFTY Smallcap 250", "summary": "This study quantifies survivorship bias in India's NIFTY Smallcap 250 index using a dataset of 1,437 stocks over nine years (2016-2025). By reconstructing historical index composition through market capitalization ranking and comparing equal-weight portfolios of current constituents versus all historical members, I show that survivor-only backtesting overstates annual returns by 4.94 percentage points (23.3%) and Sharpe ratios by 0.097 (9.1%). The analysis reveals an 82.5% turnover rate, including delisted (16.1%), graduated (33.1%), and demoted stocks (33.2%), with all categories contributing to bias. Using bhavcopy data that includes delisted securities, the reconstruction achieves 100% accuracy for current constituents and an estimated 85-90% accuracy historically. These findings highlight that survivorship bias is materially larger in emerging market small-caps and that using only current index members can significantly overstate strategy performance. Briefly, the methodology reconstructs historical index membership using a price-volume-based ranking approach to enable survivor-free backtesting.", "published": "2026-03-19T18:14:04Z", "updated": "2026-03-19T18:14:04Z", "authors": ["Harjot Singh Ranse"], "categories": ["q-fin.ST"], "url": "https://arxiv.org/abs/2603.19380v1", "score": 2.5105} +{"id": "2603.16434v1", "topic": "execution_microstructure", "title": "From Natural Language to Executable Option Strategies via Large Language Models", "summary": "Large Language Models (LLMs) excel at general code generation, yet translating natural-language trading intents into correct option strategies remains challenging. Real-world option design requires reasoning over massive, multi-dimensional option chain data with strict constraints, which often overwhelms direct generation methods. We introduce the Option Query Language (OQL), a domain-specific intermediate representation that abstracts option markets into high-level primitives under grammatical rules, enabling LLMs to function as reliable semantic parsers rather than free-form programmers. OQL queries are then validated and executed deterministically by an engine to instantiate executable strategies. We also present a new dataset for this task and demonstrate that our neuro-symbolic pipeline significantly improves execution accuracy and logical consistency over direct baselines.", "published": "2026-03-17T12:14:47Z", "updated": "2026-03-17T12:14:47Z", "authors": ["Haochen Luo", "Zhengzhao Lai", "Junjie Xu", "Yifan Li", "Tang Pok Hin", "Yuan Zhang", "Chen Liu"], "categories": ["cs.AI", "q-fin.TR"], "url": "https://arxiv.org/abs/2603.16434v1", "score": 2.5007} +{"id": "2603.25350v1", "topic": "portfolio_regime", "title": "Optimal Dividend, Reinsurance, and Capital Injection for Collaborating Business Lines under Model Uncertainty", "summary": "This paper considers an insurer with two collaborating business lines that faces three critical decisions: (1) dividend payout, (2) reinsurance coverage, and (3) capital injection between the lines, in the presence of model uncertainty. The insurer considers the reference model to be an approximation of the true model, and each line has its own robustness preference. The reserve level of each line is modeled using a diffusion process. The objective is to obtain a robust strategy that maximizes the expected weighted sum of discounted dividends until the first ruin time, while incorporating a penalty term for the distortion between the reference and alternative models in the worst-case scenario. We completely solve this problem and obtain the value function and optimal (equilibrium) strategies in closed form. We show that the optimal dividend-capital injection strategy is a barrier strategy. The optimal proportion of risk ceded to the reinsurer and the deviation of the worst-case model from the reference model are decreasing with respect to the aggregate reserve level. Finally, numerical examples are presented to show the impact of the model parameters and ambiguity aversion on the optimal strategies.", "published": "2026-03-26T11:56:38Z", "updated": "2026-03-26T11:56:38Z", "authors": ["Tim J. Boonen", "Engel John C. Dela Vega", "Len Patrick Dominic M. Garces"], "categories": ["math.OC", "q-fin.MF", "q-fin.RM"], "url": "https://arxiv.org/abs/2603.25350v1", "score": 2.2951} +{"id": "2603.18107v1", "topic": "execution_microstructure", "title": "ARTEMIS: A Neuro Symbolic Framework for Economically Constrained Market Dynamics", "summary": "Deep learning models in quantitative finance often operate as black boxes, lacking interpretability and failing to incorporate fundamental economic principles such as no-arbitrage constraints. This paper introduces ARTEMIS (Arbitrage-free Representation Through Economic Models and Interpretable Symbolics), a novel neuro-symbolic framework combining a continuous-time Laplace Neural Operator encoder, a neural stochastic differential equation regularised by physics-informed losses, and a differentiable symbolic bottleneck that distils interpretable trading rules. The model enforces economic plausibility via two novel regularisation terms: a Feynman-Kac PDE residual penalising local no-arbitrage violations, and a market price of risk penalty bounding the instantaneous Sharpe ratio. We evaluate ARTEMIS against six strong baselines on four datasets: Jane Street, Optiver, Time-IMM, and DSLOB (a synthetic crash regime). Results demonstrate ARTEMIS achieves state-of-the-art directional accuracy, outperforming all baselines on DSLOB (64.96%) and Time-IMM (96.0%). A comprehensive ablation study confirms each component's contribution: removing the PDE loss reduces directional accuracy from 64.89% to 50.32%. Underperformance on Optiver is attributed to its long sequence length and volatility-focused target. By providing interpretable, economically grounded predictions, ARTEMIS bridges the gap between deep learning's power and the transparency demanded in quantitative finance.", "published": "2026-03-18T13:00:28Z", "updated": "2026-03-18T13:00:28Z", "authors": ["Rahul D Ray"], "categories": ["cs.LG", "cs.AI", "cs.CE", "q-fin.ST"], "url": "https://arxiv.org/abs/2603.18107v1", "score": 2.2556} +{"id": "2603.20271v1", "topic": "trend_momentum", "title": "Information Propagation Across Investor Types: Transfer Entropy Networks in the Korean Equity Market", "summary": "Whether heterogeneous investor flows transmit private information across stocks or merely reflect coordinated responses to public signals remains an open question in market microstructure. We construct Transfer Entropy (TE) networks from investor-type flows -- foreign, institutional, and individual -- for \\numNStocks{} Korean equities over \\numNDates{} trading days (January 2020 to February 2025), and evaluate their economic content through interaction information (II), conditional TE, mutual information (MI), Kelly criterion bounds, and Fama-MacBeth regressions. Three findings emerge. First, TE networks are sparse and structurally heterogeneous: foreign investors maintain few but strong links (\\numEdgesFor{} edges, mean TE = \\numMeanTEFor{}), while individual investors form many but weak links (\\numEdgesInd{} edges, mean TE = \\numMeanTEInd{}). Second, cross-investor information is redundant rather than synergistic, no investor type directionally dominates another, and MI between signals and returns is zero at the daily horizon. Third, network centrality adds negligible alpha in cross-sectional regressions, with only one of six signal-centrality interactions reaching marginal significance. These results indicate that the observed propagation structure captures shared information processing rather than private signal cascades, consistent with daily-frequency market efficiency.", "published": "2026-03-15T16:08:58Z", "updated": "2026-03-15T16:08:58Z", "authors": ["Sungwoo Kang"], "categories": ["q-fin.ST", "q-fin.TR"], "url": "https://arxiv.org/abs/2603.20271v1", "score": 2.2408} +{"id": "2603.14072v1", "topic": "options_vol_surface", "title": "Conditioning on a Volatility Proxy Compresses the Apparent Timescale of Collective Market Correlation", "summary": "We address the attribution problem for apparent slow collective dynamics: is the observed persistence intrinsic, or inherited from a persistent driver? For the leading eigenvalue fraction $ψ_1=λ_{\\max}/N$ of S\\&P 500 60-day rolling correlation matrices ($237$ stocks, 2004--2023), a VIX-coupled Ornstein--Uhlenbeck model reduces the effective relaxation time from $298$ to $61$ trading days and improves the fit over bare mean reversion by $Δ$BIC$=109$. On the decomposition sample, an informational residual of $\\log(\\mathrm{VIX})$ alone retains most of that gain ($Δ$BIC$=78.6$), whereas a mechanical VIX proxy alone does not improve the fit. Autocorrelation-matched placebo fields fail ($Δ$BIC$_{\\max}=2.7$), disjoint weekly reconstructions still favor the field-coupled model ($Δ$BIC$=140$--$151$), and six anchored chronological holdouts preserve the out-of-sample advantage. Quiet-regime and field-stripped residual autocorrelation controls show the same collapse of persistence. Stronger hidden-variable extensions remain only partially supported. Within the tested stochastic class, conditioning on the observed VIX proxy absorbs most of the apparent slow dynamics.", "published": "2026-03-14T18:37:40Z", "updated": "2026-03-14T18:37:40Z", "authors": ["Yuda Bi", "Vince D Calhoun"], "categories": ["q-fin.CP", "cond-mat.stat-mech", "cs.LG"], "url": "https://arxiv.org/abs/2603.14072v1", "score": 2.2359} +{"id": "2603.24605v1", "topic": "options_vol_surface", "title": "Bid--Ask Martingale Optimal Transport", "summary": "Martingale Optimal Transport (MOT) provides a framework for robust pricing and hedging of illiquid derivatives. Classical MOT enforces exact calibration of model marginals to the mid-prices of vanilla options. Motivated by the industry practice of fitting bid and ask marginals to vanilla prices, we introduce a relaxation of MOT in which model-implied volatilities are only required to lie within observed bid--ask spreads; equivalently, model marginals lie between the bid and ask marginals in convex order. The resulting Bid--Ask MOT (BAMOT) yields realistic price bounds for illiquid derivatives and, via strong duality, can be interpreted as the superhedging price when short and long positions in vanilla options are priced at the bid and ask, respectively. We further establish convergence of BAMOT to classical MOT as bid--ask spreads vanish, and quantify the convergence rate using a novel distance intrinsically linked to bid--ask spreads. Finally, we support our findings with several synthetic and real-data examples.", "published": "2026-03-14T14:40:58Z", "updated": "2026-03-14T14:40:58Z", "authors": ["Bryan Liang", "Marcel Nutz", "Shunan Sheng", "Valentin Tissot-Daguette"], "categories": ["q-fin.MF", "math.FA", "math.OC", "math.PR", "q-fin.PR"], "url": "https://arxiv.org/abs/2603.24605v1", "score": 2.2359} +{"id": "2603.12375v1", "topic": "options_vol_surface", "title": "Feynman-Kac Derivatives Pricing on the Full Forward Curve", "summary": "This paper introduces a no-arbitrage, Monte Carlo-free approach to pricing path-dependent interest rate derivatives. The Heath-Jarrow-Morton model gives arbitrage-free contingent claims prices but is infinite-dimensional, making traditional numerical methods computationally prohibitive. To make the problem computationally tractable, I cast the stochastic pricing problem as a deterministic partial differential equation (PDE). Finance-Informed Neural Networks (FINNs) solve this PDE directly by minimizing violations of the differential equation and boundary condition, with automatic differentiation efficiently computing the exact derivatives needed to evaluate PDE terms. FINNs achieve pricing accuracy within 0.04 to 0.07 cents per dollar of contract value compared to Monte Carlo benchmarks. Once trained, FINNs price caplets in a few microseconds regardless of dimension, delivering speedups ranging from 300,000 to 4.5 million times faster than Monte Carlo simulation as the state space discretization of the forward curve grows from 10 to 150 nodes. The major Greeks-theta and curve deltas-come for free, computed automatically during PDE evaluation at zero marginal cost, whereas Monte Carlo requires complete re-simulation for each sensitivity. The framework generalizes naturally beyond caplets to other path-dependent derivatives-caps, swaptions, callable bonds-requiring only boundary condition modifications while retaining the same core PDE structure.", "published": "2026-03-12T18:52:52Z", "updated": "2026-03-12T18:52:52Z", "authors": ["Kevin Mott"], "categories": ["q-fin.CP", "q-fin.MF", "q-fin.PR"], "url": "https://arxiv.org/abs/2603.12375v1", "score": 2.226} +{"id": "2603.10857v2", "topic": "options_vol_surface", "title": "SPX-VIX Risk Computations Via Perturbed Optimal Transport", "summary": "We propose a model independent framework for generating SPX and VIX risk scenarios based on a joint optimal transport calibration of their market smiles. Starting from the entropic martingale optimal transport formulation of Guyon, we introduce a perturbation methodology that computes sensitivities of the calibrated coupling using a Fisher information linearization. This allows risk to be generated without performing a full recalibration after market shocks. We further introduce a dimension reduction method based on perturbed optimal transport that produces fast and stable risk estimates while preserving the structural properties of the calibrated model. The approach is combined with Skew Stickiness Ratio(SSR) dynamics to translate SPX shocks into perturbations of forward variance and VIX distributions. Numerical experiments show that the proposed method produces accurate risk estimates relative to full recalibration while being computationally much faster. A backtesting study also demonstrates improved hedging performance compared with stochastic local volatility models.", "published": "2026-03-11T15:05:28Z", "updated": "2026-03-19T13:50:39Z", "authors": ["Charlie Che", "Hanxuan Lin", "Yudong Yang", "Guofan Hu", "Lei Fang"], "categories": ["q-fin.CP", "q-fin.MF"], "url": "https://arxiv.org/abs/2603.10857v2", "score": 2.2211} +{"id": "2603.10137v1", "topic": "options_vol_surface", "title": "Uncertainty-Aware Deep Hedging", "summary": "Deep hedging trains neural networks to manage derivative risk under market frictions, but produces hedge ratios with no measure of model confidence -- a significant barrier to deployment. We introduce uncertainty quantification to the deep hedging framework by training a deep ensemble of five independent LSTM networks under Heston stochastic volatility with proportional transaction costs. The ensemble's disagreement at each time step provides a per-time-step confidence measure that is strongly predictive of hedging performance: the learned strategy outperforms the Black-Scholes delta on approximately 80% of paths when model agreement is high, but on fewer than 20% when disagreement is elevated. We propose a CVaR-optimised blending strategy that combines the ensemble's hedge with the classical Black-Scholes delta, weighted by the level of model uncertainty. The blend improves on the Black-Scholes delta by 35-80 basis points in CVaR across several Heston calibrations, and on the theoretically optimal Whalley-Wilmott strategy by 100-250 basis points, with all improvements statistically significant under paired bootstrap tests. The analysis reveals that ensemble uncertainty is driven primarily by option moneyness rather than volatility, and that the uncertainty-performance relationship inverts under weak leverage -- findings with practical implications for the deployment of machine learning in hedging systems.", "published": "2026-03-10T18:17:51Z", "updated": "2026-03-10T18:17:51Z", "authors": ["Manan Poddar"], "categories": ["q-fin.CP"], "url": "https://arxiv.org/abs/2603.10137v1", "score": 2.2162} +{"id": "2602.19092v1", "topic": "options_vol_surface", "title": "Finite Element Solution of the Two-Dimensional Bates Model for Option Pricing Under Stochastic Volatility and Jumps", "summary": "We propose a fourth--order compact finite--difference (HOC--FD) scheme for the transformed Bates partial integro--differential equation (PIDE). The method employs an implicit--explicit (IMEX) Crank--Nicolson framework for local terms and Simpson quadrature for the jump integral. Benchmarks against second--order finite differences (FD) and quadratic finite elements (FEM, p=2) confirm near--fourth--order spatial accuracy for HOC--FD, near--second--order for FEM, and second--order temporal convergence for all time integrators. Efficiency tests show that HOC--FD achieves similar accuracy at up to two orders of magnitude lower runtime than FEM, establishing it as a practical baseline for option pricing under stochastic volatility jump--diffusion models.", "published": "2026-02-22T08:26:58Z", "updated": "2026-02-22T08:26:58Z", "authors": ["Neda Bagheri Renani", "Daniel Sevcovic"], "categories": ["q-fin.PR"], "url": "https://arxiv.org/abs/2602.19092v1", "score": 2.1373} +{"id": "2603.21842v1", "topic": "statarb_pairs", "title": "Flexible Information Acquisition in the Kyle Model", "summary": "We study an information acquisition problem in which an informed trader acquires costly information prior to trading in the Kyle equilibrium. The cost of information acquisition is represented by an entropy cost. Regardless of the prior distribution of the asset payoff, continuous signals are optimal. Moreover, any continuously distributed signal, together with an associated logit type posterior distribution of the payoff, yields the same ex-ante value for the informed trader, the same distribution of posterior expected payoff, and the same unconditional distribution of the informed trader's trading strategy. Consequently, a normally distributed signal can be adopted without loss of generality. We further show that when the information acquisition cost increases or the volatility of noise trades decreases, the variance of the posterior expected payoff declines, the profit potential from trading diminishes, meanwhile the posterior expected payoff increasingly resembles a normal distribution, and the information leakage cost from trading decreases.", "published": "2026-03-23T11:31:29Z", "updated": "2026-03-23T11:31:29Z", "authors": ["S. Viswanathan", "Hao Xing"], "categories": ["econ.TH", "q-fin.MF", "q-fin.TR"], "url": "https://arxiv.org/abs/2603.21842v1", "score": 2.0303} +{"id": "2603.21089v1", "topic": "statarb_pairs", "title": "Approximate Dynamic Programming for Degradation-aware Market Participation of Battery Energy Storage Systems: Bridging Market and Degradation Timescales", "summary": "We present an approximate dynamic programming framework for designing degradation-aware market participation policies for battery energy storage systems. The approach employs a tailored value function approximation that reduces the state space to state of charge and battery health, while performing dynamic programming along a pseudo-time axis encoded by state of health. This formulation enables an offline/online computation split that separates long-term degradation dynamics (months to years) from short-term market dynamics (seconds to minutes) -- a timescale mismatch that renders conventional predictive control and dynamic programming approaches computationally intractable. The main computational effort occurs offline, where the value function is approximated via coarse-grained backward induction along the health dimension. Online decisions then reduce to a real-time tractable one-step predictive control problem guided by the precomputed value function. This decoupling allows the integration of high-fidelity physics-informed degradation models without sacrificing real-time feasibility. Backtests on historical market data show that the resulting policy outperforms several benchmark strategies with optimized hyperparameters.", "published": "2026-03-22T07:04:07Z", "updated": "2026-03-22T07:04:07Z", "authors": ["Flemming Holtorf", "Sungho Shin"], "categories": ["eess.SY", "math.OC", "q-fin.TR"], "url": "https://arxiv.org/abs/2603.21089v1", "score": 2.0253} +{"id": "2601.17773v1", "topic": "trend_momentum", "title": "MarketGANs: Multivariate financial time-series data augmentation using generative adversarial networks", "summary": "This paper introduces MarketGAN, a factor-based generative framework for high-dimensional asset return generation under severe data scarcity. We embed an explicit asset-pricing factor structure as an economic inductive bias and generate returns as a single joint vector, thereby preserving cross-sectional dependence and tail co-movement alongside inter-temporal dynamics. MarketGAN employs generative adversarial learning with a temporal convolutional network (TCN) backbone, which models stochastic, time-varying factor loadings and volatilities and captures long-range temporal dependence. Using daily returns of large U.S. equities, we find that MarketGAN more closely matches empirical stylized facts of asset returns, including heavy-tailed marginal distributions, volatility clustering, leverage effects, and, most notably, high-dimensional cross-sectional correlation structures and tail co-movement across assets, than conventional factor-model-based bootstrap approaches. In portfolio applications, covariance estimates derived from MarketGAN-generated samples outperform those derived from other methods when factor information is at least weakly informative, demonstrating tangible economic value.", "published": "2026-01-25T10:19:04Z", "updated": "2026-01-25T10:19:04Z", "authors": ["Jeonggyu Huh", "Seungwon Jeong", "Hyun-Gyoon Kim", "Hyeng Keun Koo", "Byung Hwa Lim"], "categories": ["q-fin.ST", "cs.LG", "econ.EM"], "url": "https://arxiv.org/abs/2601.17773v1", "score": 1.9992} +{"id": "2603.11046v1", "topic": "options_vol_surface", "title": "On Utility Maximization under Multivariate Fake Stationary Affine Volterra Models", "summary": "This paper is concerned with Merton's portfolio optimization problem in a Volterra stochastic environment described by a multivariate fake stationary Volterra--Heston model. Due to the non-Markovianity and non-semimartingality of the underlying processes, the classical stochastic control approach cannot be directly applied in this setting. Instead, the problem is tackled using a stochastic factor solution to a Riccati backward stochastic differential equation (BSDE). Our approach is inspired by the martingale optimality principle combined with a suitable verification argument. The resulting optimal strategies for Merton's problems are derived in semi-closed form depending on the solutions to time-dependent multivariate Riccati-Volterra equations. Numerical results on a two dimensional fake stationary rough Heston model illustrate the impact of stationary rough volatilities on the optimal Merton strategies.", "published": "2026-03-11T17:59:43Z", "updated": "2026-03-11T17:59:43Z", "authors": ["Emmanuel Gnabeyeu"], "categories": ["math.OC", "math.PR", "q-fin.CP"], "url": "https://arxiv.org/abs/2603.11046v1", "score": 1.9711} +{"id": "2603.20243v1", "topic": "options_vol_surface", "title": "Two-Factor Hull-White Model Revisited: Correlation Structure for Two-Factor Interest Rate Model in CVA Calculation", "summary": "The development of credit valuation adjustment (CVA) (valuation adjustments [XVA]) [Green] has increased the importance of simple interest rate models such as the Hull-White model [Tan14] [Tsuchiya]. This is because the XVA model is an FX hybrid model, and is tractable only when the interest rate part is a simple Gaussian model. For the XVA calculation of interest rate instruments, de-correlation of the yield curve can be important even for the swap portfolio. Capturing the correlation structure in the two-factor Hull-White model is an integral element of CVA (XVA) modeling. However, the correlation structure in two-factor Hull-White model has not studied enough except for the analysis in [AndersenPiterbarg]. In this study, the correlation structure of the two-factor Hull-White model is analyzed in detail. The correlation structure of co-initial swap rates is investigated using a combination of the approximation formula and Monte-Carlo simulation. The Hull-White model captures the de-correlation of the yield curve only when the parameters (volatilities and mean reversion strength) satisfy certain relationships, making the valuation of XVA by two-factor Hull-White model effective.", "published": "2026-03-10T05:14:13Z", "updated": "2026-03-10T05:14:13Z", "authors": ["Osamu Tsuchiya"], "categories": ["q-fin.PR", "q-fin.MF", "stat.AP"], "url": "https://arxiv.org/abs/2603.20243v1", "score": 1.9662} +{"id": "2603.05917v1", "topic": "trend_momentum", "title": "Stock Market Prediction Using Node Transformer Architecture Integrated with BERT Sentiment Analysis", "summary": "Stock market prediction presents considerable challenges for investors, financial institutions, and policymakers operating in complex market environments characterized by noise, non-stationarity, and behavioral dynamics. Traditional forecasting methods often fail to capture the intricate patterns and cross-sectional dependencies inherent in financial markets. This paper presents an integrated framework combining a node transformer architecture with BERT-based sentiment analysis for stock price forecasting. The proposed model represents the stock market as a graph structure where individual stocks form nodes and edges capture relationships including sectoral affiliations, correlated price movements, and supply chain connections. A fine-tuned BERT model extracts sentiment from social media posts and combines it with quantitative market features through attention-based fusion. The node transformer processes historical market data while capturing both temporal evolution and cross-sectional dependencies among stocks. Experiments on 20 S&P 500 stocks spanning January 1982 to March 2025 demonstrate that the integrated model achieves a mean absolute percentage error (MAPE) of 0.80% for one-day-ahead predictions, compared to 1.20% for ARIMA and 1.00% for LSTM. Sentiment analysis reduces prediction error by 10% overall and 25% during earnings announcements, while graph-based modeling contributes an additional 15% improvement by capturing inter-stock dependencies. Directional accuracy reaches 65% for one-day forecasts. Statistical validation through paired t-tests confirms these improvements (p < 0.05 for all comparisons). The model maintains MAPE below 1.5% during high-volatility periods where baseline models exceed 2%.", "published": "2026-03-06T05:15:22Z", "updated": "2026-03-06T05:15:22Z", "authors": ["Mohammad Al Ridhawi", "Mahtab Haj Ali", "Hussein Al Osman"], "categories": ["cs.LG", "cs.AI", "q-fin.ST"], "url": "https://arxiv.org/abs/2603.05917v1", "score": 1.9464} +{"id": "2602.07066v1", "topic": "trend_momentum", "title": "Algorithmic Monitoring: Measuring Market Stress with Machine Learning", "summary": "I construct a Market Stress Probability Index (MSPI) that estimates the probability of high stress in the U.S. equity market one month ahead using information from the cross-section of individual stocks. Using CRSP daily data, each month is summarized by a set of interpretable cross-sectional fragility signals and mapped into a forward-looking stress probability via an L1-regularized logistic regression in a real-time expanding-window design. Out of sample, MSPI tracks major stress episodes and improves discrimination and accuracy relative to a parsimonious benchmark based on lagged market return and realized volatility, delivering calibrated stress probabilities on an economically meaningful scale. Further, I illustrate how MSPI can be used as a probability-based measurement object in financial econometrics. The resulting index provides a transparent and easily updated measure of near-term equity-market stress risk.", "published": "2026-02-05T14:54:43Z", "updated": "2026-02-05T14:54:43Z", "authors": ["Marc Schmitt"], "categories": ["q-fin.RM", "q-fin.ST"], "url": "https://arxiv.org/abs/2602.07066v1", "score": 1.8034} +{"id": "2603.25338v1", "topic": "statarb_pairs", "title": "Optimal threshold resetting in collective diffusive search", "summary": "Stochastic resetting has attracted significant attention in recent years due to its wide-ranging applications across physics, biology, and search processes. In most existing studies, however, resetting events are governed by an external timer and remain decoupled from the system's intrinsic dynamics. In a recent Letter by Biswas et al, we introduced threshold resetting (TR) as an alternative, event-driven optimization strategy for target search problems. Under TR, the entire process is reset whenever any searcher reaches a prescribed threshold, thereby coupling the resetting mechanism directly to the internal dynamics. In this work, we study TR-enabled search by $N$ non-interacting diffusive searchers in a one-dimensional box $[0,L]$, with the target at the origin and the threshold at $L$. By optimally tuning the scaled threshold distance $u = x_0/L$, the mean first-passage time can be significantly reduced for $N \\geq 2$. We identify a critical population size $N_c(u)$ below which TR outperforms reset-free dynamics. Furthermore, for fixed $u$, the mean first-passage time depends non-monotonically on $N$, attaining a minimum at $N_{\\mathrm{opt}}(u)$. We also quantify the achievable speed-up and analyze the operational cost of TR, revealing a nontrivial optimization landscape. These findings highlight threshold resetting as an efficient and realistic optimization mechanism for complex stochastic search processes.", "published": "2026-03-26T11:29:43Z", "updated": "2026-03-26T11:29:43Z", "authors": ["Arup Biswas", "Satya N Majumdar", "Arnab Pal"], "categories": ["cond-mat.stat-mech", "math.OC", "math.PR", "q-fin.ST"], "url": "https://arxiv.org/abs/2603.25338v1", "score": 1.7951} +{"id": "2603.24215v1", "topic": "statarb_pairs", "title": "Adapting Altman's bankruptcy prediction model to the compositional data methodology", "summary": "Using standard financial ratios as variables in statistical analyses has been related to several serious problems, such as extreme outliers, asymmetry, non-normality, and non-linearity. The compositional-data methodology has been successfully applied to solve these problems and has always yielded substantially different results when compared to standard financial ratios. An under-researched area is the use of financial log-ratios computed with the compositional-data methodology to predict bankruptcy or the related terms of business default, insolvency or failure. Another under-researched area is the use of machine learning methods in combination with compositional log-ratios. The present article adapts the classical Altman bankruptcy prediction model and some of its extensions to the compositional methodology with pairwise log-ratios and three common statistical and machine learning tools: logistic regression models, k-nearest neighbours, and random forests, and compares the results with standard financial ratios. Data from the sector in the Spanish economy with the largest number of bankrupt firms according to the first two digits of the NACE code (46XX \"wholesale trade, except of motor vehicles and motorcycles\") were obtained from the Iberian Balance sheet Analysis System. The sample size (31,131 firms, of which 97 were bankrupt) was divided into a training and a validation dataset. The training data set was downsampled to one healthy firm to each bankrupt firm. No outliers were removed. Focusing on predictive performance, the results show that compositional methods are better than standard ratios in terms of sensitivity, with mixed results regarding specificity, compositional random forests and compositional logistic regression behaving the best.", "published": "2026-03-25T11:44:20Z", "updated": "2026-03-25T11:44:20Z", "authors": ["Fatemeh Keivani", "Germà Coenders", "Geòrgia Escaramís"], "categories": ["q-fin.ST", "stat.AP"], "url": "https://arxiv.org/abs/2603.24215v1", "score": 1.7901} +{"id": "2603.24190v1", "topic": "statarb_pairs", "title": "Dynamical thermalization and turbulence in social stratification models", "summary": "We study the nonlinear chaotic dynamics in a system of linear oscillators coupled by social network links with an additional stratification of oscillator energies, or frequencies, and supplementary nonlinear interactions. It is argued that this system can be viewed as a model of social stratification in a society with nonlinear interacting agents with energies playing a role of wealth states of society. The Hamiltonian evolution is characterized by two integrals of motion being energy and probability norm. Above a certain chaos border the chaotic dynamics leads to dynamical thermalization with the Rayleigh-Jeans (RJ) distribution over states with given energy or wealth. At low energies, this distribution has RJ condensation of norm at low energy modes. We point out a similarity of this condensation with the wealth inequality in the world countries where about a half of population owns only a couple of percent of the total wealth. In the presence of energy pumping and absorption, the system reveals features of the Kolmogorov-Zakharov turbulence of nonlinear waves.", "published": "2026-03-25T11:14:13Z", "updated": "2026-03-25T11:14:13Z", "authors": ["Klaus M. Frahm", "Dima L. Shepelyansky"], "categories": ["cond-mat.stat-mech", "econ.GN", "nlin.CD", "physics.soc-ph", "q-fin.ST"], "url": "https://arxiv.org/abs/2603.24190v1", "score": 1.7901} +{"id": "2603.24382v1", "topic": "crypto_market_structure", "title": "MolEvolve: LLM-Guided Evolutionary Search for Interpretable Molecular Optimization", "summary": "Despite deep learning's success in chemistry, its impact is hindered by a lack of interpretability and an inability to resolve activity cliffs, where minor structural nuances trigger drastic property shifts. Current representation learning, bound by the similarity principle, often fails to capture these structural-activity discontinuities. To address this, we introduce MolEvolve, an evolutionary framework that reformulates molecular discovery as an autonomous, look-ahead planning problem. Unlike traditional methods that depend on human-engineered features or rigid prior knowledge, MolEvolve leverages a Large Language Model (LLM) to actively explore and evolve a library of executable chemical symbolic operations. By utilizing the LLM to cold start and an Monte Carlo Tree Search (MCTS) engine for test-time planning with external tools (e.g. RDKit), the system self-discovers optimal trajectories autonomously. This process evolves transparent reasoning chains that translate complex structural transformations into actionable, human-readable chemical insights. Experimental results demonstrate that MolEvolve's autonomous search not only evolves transparent, human-readable chemical insights, but also outperforms baselines in both property prediction and molecule optimization tasks.", "published": "2026-03-25T15:01:03Z", "updated": "2026-03-25T15:01:03Z", "authors": ["Xiangsen Chen", "Ruilong Wu", "Yanyan Lan", "Ting Ma", "Yang Liu"], "categories": ["cs.LG", "cs.AI", "cs.CE"], "url": "https://arxiv.org/abs/2603.24382v1", "score": 1.7901} +{"id": "2603.24236v1", "topic": "crypto_market_structure", "title": "S$^{3}$G: Stock State Space Graph for Enhanced Stock Trend Prediction", "summary": "Stock trend prediction has attracted considerable attention for its potential to generate tangible investment returns. With the advent of deep learning in quantitative finance, researchers have increasingly recognized the importance of synergies between stocks, such as sector membership or upstream-downstream relationships, in accurately capturing market dynamics. However, previous work often relies on static industry graphs or constructs graphs at each time step via similarity measures, overlooking the fluid evolution of stock relationships. We observe that as companies interact competitively and cooperatively, their interdependencies change in a fine-grained, time-varying manner that cannot be fully captured by coarse, static connections or simple similarity-based snapshots. To address these challenges, we introduce the Stock State Space Graph (S$^{3}$G) framework for enhanced stock trend prediction. First, we apply wavelet transforms to denoise the inherently low signal-to-noise financial series and extract salient patterns. After that, we construct data-dependent graphs at each time point and employ state space models to characterize the evolutionary dynamics of these graphs. Finally, we perform a graph aggregation operation to obtain the predicted return. Extensive experiments on historical CSI 500 data demonstrate the state-of-the-art performance of S$^{3}$G, with superior annualized returns and Sharpe ratios compared to other baselines.", "published": "2026-03-25T12:17:07Z", "updated": "2026-03-25T12:17:07Z", "authors": ["Yao Lu", "Kaiyi Hu", "Luyan Zhang"], "categories": ["cs.CE"], "url": "https://arxiv.org/abs/2603.24236v1", "score": 1.7901} +{"id": "2603.22886v1", "topic": "statarb_pairs", "title": "Conditionally Identifiable Latent Representation for Multivariate Time Series with Structural Dynamics", "summary": "We propose the Identifiable Variational Dynamic Factor Model (iVDFM), which learns latent factors from multivariate time series with identifiability guarantees. By applying iVAE-style conditioning to the innovation process driving the dynamics rather than to the latent states, we show that factors are identifiable up to permutation and component-wise affine (or monotone invertible) transformations. Linear diagonal dynamics preserve this identifiability and admit scalable computation via companion-matrix and Krylov methods. We demonstrate improved factor recovery on synthetic data, stable intervention accuracy on synthetic SCMs, and competitive probabilistic forecasting on real-world benchmarks.", "published": "2026-03-24T07:35:27Z", "updated": "2026-03-24T07:35:27Z", "authors": ["Minkey Chang", "Jae-Young Kim"], "categories": ["cs.LG", "q-fin.GN", "q-fin.ST"], "url": "https://arxiv.org/abs/2603.22886v1", "score": 1.7852} +{"id": "2603.22831v1", "topic": "crypto_market_structure", "title": "Option pricing model under the G-expectation framework", "summary": "G-expectation, as a sublinear expectation, provides a powerful framework for modeling uncertainty in financial markets. Motivated by the need for robust valuation under model uncertainty, this work develops a unified risk-neutral valuation approach within the G-expectation environment, yielding a nonlinear generalization of the Black-Scholes model, termed the G-Black-Scholes equation. To enhance computational efficiency and reduce numerical cost, we introduce a logarithmic transformation of the asset price, which yields an alternative nonlinear PDE. Based on this transformed formulation, we design both explicit and implicit finite difference schemes that are rigorously demonstrated to be consistent, stable, monotone, and convergent to the viscosity solution. Numerical examples confirm that the proposed schemes achieve high accuracy, while the logarithmic transformation relaxes the stability constraints of explicit schemes and improves computational efficiency.", "published": "2026-03-24T06:09:43Z", "updated": "2026-03-24T06:09:43Z", "authors": ["Ziting Pei", "Xingye Yue", "Xiaotao Zheng"], "categories": ["cs.CE", "q-fin.MF"], "url": "https://arxiv.org/abs/2603.22831v1", "score": 1.7852} +{"id": "2603.22596v1", "topic": "crypto_market_structure", "title": "ParlayMarket: Automated Market Making for Parlay-style Joint Contracts", "summary": "Prediction markets are powerful mechanisms for information aggregation, but existing designs are optimized for single-event contracts. In practice, traders frequently express beliefs about joint outcomes - through parlays in sports, conditional forecasts across related events, or scenario bets in financial markets. Current platforms either prohibit such trades or rely on ad hoc mechanisms that ignore correlation structure, resulting in inefficient prices and fragmented liquidity. We introduce ParlayMarket, the first automated market-making design that supports parlay-style joint contracts within a unified liquidity pool while maintaining coherent pricing across base markets and their combinations. Our main result is a convergence characterization of the resulting system. Under repeated trading, the AMM dynamics converge to a unique fixed point corresponding to the best approximation to the true joint distribution within the model class. We show that (i) parameter error remains bounded at stationarity due to a balance between signal and noise in trade-induced updates, and (ii) pricing error and monetary loss scale with this parameter error, implying that aggregate market-maker loss remains controlled and grows at most quadratically in the number of base markets. These results establish explicit limits on the information-retrieval error achievable through the trading interface. Importantly, parlay trades play a structural role in this convergence: by providing direct constraints on joint outcomes, they improve identifiability of dependence structure and reduce steady-state error relative to markets that rely only on marginal trades. Empirically, we show both in controlled simulations and in replay on historical Kalshi parlay data that this design achieves the intended scaling while remaining effective in realistic market settings.", "published": "2026-03-23T21:45:38Z", "updated": "2026-03-23T21:45:38Z", "authors": ["Ranvir Rana", "Viraj Nadkarni", "Niusha Moshrefi", "Pramod Viswanath"], "categories": ["cs.CE", "econ.GN"], "url": "https://arxiv.org/abs/2603.22596v1", "score": 1.7803} +{"id": "2603.20965v1", "topic": "statarb_pairs", "title": "Learning to Aggregate Zero-Shot LLM Agents for Corporate Disclosure Classification", "summary": "This paper studies whether a lightweight trained aggregator can combine diverse zero-shot large language model judgments into a stronger downstream signal for corporate disclosure classification. Zero-shot LLMs can read disclosures without task-specific fine-tuning, but their predictions often vary across prompts, reasoning styles, and model families. I address this problem with a multi-agent framework in which three zero-shot agents independently read each disclosure and output a sentiment label, a confidence score, and a short rationale. A logistic meta-classifier then aggregates these signals to predict next-day stock return direction. I use a sample of 18,420 U.S. corporate disclosures issued by Nasdaq and S&P 500 firms between 2018 and 2024, matched to next-day stock returns. Results show that the trained aggregator outperforms all single agents, majority vote, confidence-weighted voting, and a FinBERT baseline. Balanced accuracy rises from 0.561 for the best single agent to 0.612 for the trained aggregator, with the largest gains in disclosures combining strong current performance with weak guidance or elevated risk. The results suggest that zero-shot LLM agents capture complementary financial signals and that supervised aggregation can turn cross-agent disagreement into a more useful classification target.", "published": "2026-03-21T22:29:19Z", "updated": "2026-03-21T22:29:19Z", "authors": ["Kemal Kirtac"], "categories": ["q-fin.TR", "cs.AI", "cs.MA", "q-fin.CP", "q-fin.ST"], "url": "https://arxiv.org/abs/2603.20965v1", "score": 1.7704} +{"id": "2603.19944v1", "topic": "statarb_pairs", "title": "Large Language Models and Stock Investing: Is the Human Factor Required?", "summary": "This paper investigates whether large language models (LLMs) can generate reliable stock market predictions. We evaluate four state-of-the-art models - ChatGPT, Gemini, DeepSeek, and Perplexity - across three prompting strategies: a naive query, a structured approach, and chain-of-thought reasoning. Our results show that LLM-generated recommendations are hindered by recurring reasoning failures, including financial misconceptions, carryover errors, and reliance on outdated or hallucinated information. When appropriately guided and supervised, LLMs demonstrate the capacity to outperform the market, but realizing LLMs' full potential requires substantial human oversight. We also find that grounding stock recommendations in official regulatory filings increases their forecasting accuracy. Overall, our findings underscore the need for robust safeguards and validation when deploying LLMs in financial markets.", "published": "2026-03-20T13:47:13Z", "updated": "2026-03-20T13:47:13Z", "authors": ["Ricardo Crisostomo", "Diana Mykhalyuk"], "categories": ["q-fin.TR", "q-fin.ST"], "url": "https://arxiv.org/abs/2603.19944v1", "score": 1.7655} +{"id": "2603.16333v1", "topic": "execution_microstructure", "title": "Open vs. Sealed: Auction Format Choice for Maximal Extractable Value", "summary": "We study optimal auction design for Maximum Extractable Value (MEV) auction markets on Ethereum. Using a dataset of 2.2 million transactions across three major orderflow providers, we establish three empirical regularities: extracted values follow a log-normal distribution with extreme right-tail concentration, competition intensity varies substantially across MEV types, and the standard Revenue Equivalence Theorem breaks down due to affiliation among searchers' valuations. We model this affiliation through a Gaussian common factor, deriving equilibrium bidding strategies and expected revenues for five auction formats, first-price sealed-bid, second-price sealed-bid, English, Dutch, and all-pay, across a fine grid of bidder counts $n$ and affiliation parameters $ρ$. Our simulations confirm the Milgrom-Weber linkage principle: English and second-price sealed-bid auctions strictly dominate Dutch and first-price sealed-bid formats for any $ρ> 0$, with a linkage gap of 14-28\\% at moderate affiliation ($ρ=0.5$) and up to 30\\% for small bidder counts. Applied to observed bribe totals, this gap corresponds to \\$10-18 million in foregone revenue over the sample period. We also document a novel non-monotonicity: at large $n$ and high $ρ$, revenue peaks in the interior of the affiliation parameter space and declines thereafter, as near-perfect correlation collapses the order-statistic spread that drives competitive payments.", "published": "2026-03-17T10:04:14Z", "updated": "2026-03-17T10:04:14Z", "authors": ["Aleksei Adadurov", "Sergey Barseghyan", "Anton Chtepine", "Antero Eloranta", "Andrei Sebyakin", "Arsenii Valitov"], "categories": ["q-fin.TR"], "url": "https://arxiv.org/abs/2603.16333v1", "score": 1.7507} +{"id": "2602.20856v1", "topic": "trend_momentum", "title": "Stochastic Discount Factors with Cross-Asset Spillovers", "summary": "This paper develops a unified framework that links firm-level predictive signals, cross-asset spillovers, and the stochastic discount factor (SDF). Signals and spillovers are jointly estimated by maximizing the Sharpe ratio, yielding an interpretable SDF that both ranks characteristic relevance and uncovers the direction of predictive influence across assets. Out-of-sample, the SDF consistently outperforms self-predictive and expected-return benchmarks across investment universes and market states. The inferred information network highlights large, low-turnover firms as net transmitters. The framework offers a clear, economically grounded view of the informational architecture underlying cross-sectional return dynamics.", "published": "2026-02-24T12:58:01Z", "updated": "2026-02-24T12:58:01Z", "authors": ["Doron Avramov", "Xin He"], "categories": ["q-fin.CP", "econ.EM", "q-fin.PM", "stat.ML"], "url": "https://arxiv.org/abs/2602.20856v1", "score": 1.6471} +{"id": "2601.16274v1", "topic": "trend_momentum", "title": "A Nonlinear Target-Factor Model with Attention Mechanism for Mixed-Frequency Data", "summary": "We propose Mixed-Panels-Transformer Encoder (MPTE), a novel framework for estimating factor models in panel datasets with mixed frequencies and nonlinear signals. Traditional factor models rely on linear signal extraction and require homogeneous sampling frequencies, limiting their applicability to modern high-dimensional datasets where variables are observed at different temporal resolutions. Our approach leverages Transformer-style attention mechanisms to enable context-aware signal construction through flexible, data-dependent weighting schemes that replace fixed linear combinations with adaptive reweighting based on similarity and relevance. We extend classical principal component analysis (PCA) to accommodate general temporal and cross-sectional attention matrices, allowing the model to learn how to aggregate information across frequencies without manual alignment or pre-specified weights. For linear activation functions, we establish consistency and asymptotic normality of factor and loading estimators, showing that our framework nests Target PCA as a special case while providing efficiency gains through transfer learning across auxiliary datasets. The nonlinear extension uses a Transformer architecture to capture complex hierarchical interactions while preserving the theoretical foundations. In simulations, MPTE demonstrates superior performance in nonlinear environments, and in an empirical application to 13 macroeconomic forecasting targets using a selected set of 48 monthly and quarterly series from the FRED-MD and FRED-QD databases, our method achieves competitive performance against established benchmarks. We further analyze attention patterns and systematically ablate model components to assess variable importance and temporal dependence. The resulting patterns highlight which indicators and horizons are most influential for forecasting.", "published": "2026-01-22T19:11:48Z", "updated": "2026-01-22T19:11:48Z", "authors": ["Alessio Brini", "Ekaterina Seregina"], "categories": ["econ.EM", "q-fin.ST"], "url": "https://arxiv.org/abs/2601.16274v1", "score": 1.4844} diff --git a/research/scripts/update_arxiv_digest.py b/research/scripts/update_arxiv_digest.py new file mode 100755 index 0000000..cf101c2 --- /dev/null +++ b/research/scripts/update_arxiv_digest.py @@ -0,0 +1,202 @@ +#!/usr/bin/env python3 +""" +Token-efficient ArXiv digest builder. + +- Uses only metadata + abstract snippets (no LLM calls) +- Scores papers by recency + keyword density + topic relevance +- Writes jsonl + markdown digest +""" + +from __future__ import annotations + +import argparse +import datetime as dt +import json +import re +import urllib.parse +import urllib.request +import xml.etree.ElementTree as ET +from pathlib import Path + +ARXIV_API = "http://export.arxiv.org/api/query" +NS = {"atom": "http://www.w3.org/2005/Atom"} + + +def load_topics(path: Path) -> dict: + return json.loads(path.read_text(encoding="utf-8")) + + +def fetch_topic(query: str, max_results: int) -> str: + params = { + "search_query": query, + "start": 0, + "max_results": max_results, + "sortBy": "submittedDate", + "sortOrder": "descending", + } + url = ARXIV_API + "?" + urllib.parse.urlencode(params) + with urllib.request.urlopen(url, timeout=30) as r: + return r.read().decode("utf-8", errors="ignore") + + +def days_since(ts: str) -> int: + try: + t = dt.datetime.fromisoformat(ts.replace("Z", "+00:00")) + except Exception: + return 9999 + now = dt.datetime.now(dt.timezone.utc) + return max(0, (now - t).days) + + +def keyword_score(text: str, keywords: list[str]) -> int: + t = text.lower() + return sum(t.count(k.lower()) for k in keywords) + + +def normalize_space(s: str) -> str: + return re.sub(r"\s+", " ", s).strip() + + +def score_entry(entry: dict, topic_name: str) -> float: + text = f"{entry['title']} {entry['summary']}" + common_kw = [ + "alpha", + "backtest", + "execution", + "volatility", + "regime", + "options", + "order flow", + "microstructure", + "portfolio", + "crypto", + "on-chain", + ] + topic_bonus = { + "trend_momentum": ["momentum", "trend"], + "options_vol_surface": ["implied volatility", "surface", "greeks", "0dte"], + "statarb_pairs": ["pairs", "cointegration", "mean reversion"], + "execution_microstructure": ["execution", "slippage", "order book"], + "crypto_market_structure": ["crypto", "blockchain", "on-chain"], + "portfolio_regime": ["regime", "portfolio", "risk"], + } + + recency_days = days_since(entry["published"]) + recency = max(0.0, 1.0 - (recency_days / 365.0)) + kw = keyword_score(text, common_kw) + tkw = keyword_score(text, topic_bonus.get(topic_name, [])) + + # Compact deterministic score to avoid LLM token spend. + return round(1.8 * recency + 0.25 * kw + 0.5 * tkw, 4) + + +def parse_feed(xml_text: str, topic_name: str) -> list[dict]: + root = ET.fromstring(xml_text) + out = [] + + for e in root.findall("atom:entry", NS): + title = normalize_space(e.findtext("atom:title", default="", namespaces=NS)) + summary = normalize_space(e.findtext("atom:summary", default="", namespaces=NS)) + published = e.findtext("atom:published", default="", namespaces=NS) + updated = e.findtext("atom:updated", default="", namespaces=NS) + arxiv_id = (e.findtext("atom:id", default="", namespaces=NS) or "").split("/")[-1] + + authors = [] + for a in e.findall("atom:author", NS): + authors.append(a.findtext("atom:name", default="", namespaces=NS)) + + categories = [] + for c in e.findall("atom:category", NS): + term = c.attrib.get("term") + if term: + categories.append(term) + + row = { + "id": arxiv_id, + "topic": topic_name, + "title": title, + "summary": summary, + "published": published, + "updated": updated, + "authors": authors, + "categories": categories, + "url": f"https://arxiv.org/abs/{arxiv_id}" if arxiv_id else None, + } + row["score"] = score_entry(row, topic_name) + out.append(row) + + return out + + +def dedup_best(rows: list[dict]) -> list[dict]: + best = {} + for r in rows: + k = r.get("id") or (r.get("title", "")[:120]) + if not k: + continue + if k not in best or r["score"] > best[k]["score"]: + best[k] = r + return sorted(best.values(), key=lambda x: x["score"], reverse=True) + + +def write_jsonl(path: Path, rows: list[dict]) -> None: + path.parent.mkdir(parents=True, exist_ok=True) + with path.open("w", encoding="utf-8") as f: + for r in rows: + f.write(json.dumps(r, ensure_ascii=False) + "\n") + + +def write_markdown(path: Path, rows: list[dict], top_n: int) -> None: + now = dt.datetime.now(dt.timezone.utc).isoformat() + lines = [ + "# ArXiv Quant Digest", + "", + f"Generated: {now}", + "", + "Token-efficient mode: metadata scoring only (no LLM summarization).", + "", + "| Rank | Topic | Score | Published | Title | URL |", + "|---:|---|---:|---|---|---|", + ] + + for i, r in enumerate(rows[:top_n], start=1): + title = r["title"].replace("|", "\\|") + lines.append( + f"| {i} | {r['topic']} | {r['score']:.3f} | {r['published'][:10]} | {title} | {r['url']} |" + ) + + path.parent.mkdir(parents=True, exist_ok=True) + path.write_text("\n".join(lines), encoding="utf-8") + + +def main(): + ap = argparse.ArgumentParser() + ap.add_argument("--topics", default=str(Path(__file__).resolve().parents[1] / "arxiv" / "topics.json")) + ap.add_argument("--per-topic", type=int, default=20) + ap.add_argument("--top", type=int, default=80) + ap.add_argument("--jsonl", default=str(Path(__file__).resolve().parents[1] / "data" / "arxiv_digest.jsonl")) + ap.add_argument("--md", default=str(Path(__file__).resolve().parents[1] / "data" / "ARXIV_DIGEST.md")) + args = ap.parse_args() + + topics = load_topics(Path(args.topics)) + all_rows = [] + + for name, query in topics.items(): + try: + xml = fetch_topic(query, args.per_topic) + rows = parse_feed(xml, name) + all_rows.extend(rows) + except Exception as exc: + print(f"[warn] topic {name} failed: {exc}") + + merged = dedup_best(all_rows) + write_jsonl(Path(args.jsonl), merged) + write_markdown(Path(args.md), merged, args.top) + + print(f"rows={len(merged)}") + print(f"jsonl={args.jsonl}") + print(f"md={args.md}") + + +if __name__ == "__main__": + main() diff --git a/services/blockchain/README.md b/services/blockchain/README.md index 1fdf830..42d0e32 100644 --- a/services/blockchain/README.md +++ b/services/blockchain/README.md @@ -12,15 +12,41 @@ This lane handles Solidity smart contracts, token/transaction tracing, and chain - `hardhat/` — Solidity dev environment - `contracts/` — audited or research contract sources - `scripts/` — deployment/testing scripts -- `analysis/` — token flow + transaction notebooks/scripts +- `analysis/` — token flow + transaction tracing scripts + +## New tracing & contract tooling + +### Ethereum tx trace +```bash +python3 services/blockchain/analysis/trace_eth_tx.py 0x +# optional: --rpc --out trace_eth.json +``` + +### Bitcoin tx trace (UTXO flow) +```bash +python3 services/blockchain/analysis/trace_btc_tx.py --depth 1 +# optional: --out trace_btc.json +``` + +### Solidity static risk scan +```bash +python3 services/blockchain/analysis/scan_solidity_contract.py \ + services/blockchain/hardhat/contracts/Greeter.sol +``` + +### Hardhat contract introspection +```bash +cd services/blockchain/hardhat +npm run introspect -- Greeter +``` ## Suggested free/open-source tooling - Hardhat + ethers.js - Foundry (optional) -- The Graph (self-hosted where applicable) -- Open-source chain indexers / public RPC providers (free tier) +- Public JSON-RPC endpoints for exploratory tracing +- Self-hosted archival node for deep traces (`debug_traceTransaction`) in production -## Immediate next steps -1. Initialize Hardhat project in `hardhat/`. -2. Add contract template + local test. -3. Add first chain-tracing script (ERC20 transfer graph extraction). +## Security notes +- Public RPC endpoints often disable `debug_*` methods; treat that as expected. +- Never paste private keys in scripts, logs, or traces. +- Use read-only providers for analysis tasks. diff --git a/services/blockchain/analysis/scan_solidity_contract.py b/services/blockchain/analysis/scan_solidity_contract.py new file mode 100755 index 0000000..b9f21a1 --- /dev/null +++ b/services/blockchain/analysis/scan_solidity_contract.py @@ -0,0 +1,89 @@ +#!/usr/bin/env python3 +""" +Fast static risk scanner for Solidity contracts. + +Heuristic-only pre-screen to identify contracts needing deeper audit. +""" + +from __future__ import annotations + +import argparse +import json +import re +from datetime import datetime, timezone +from pathlib import Path + +RULES = [ + ("delegatecall", r"\.delegatecall\s*\("), + ("tx_origin", r"tx\.origin"), + ("selfdestruct", r"selfdestruct\s*\("), + ("inline_assembly", r"\bassembly\b"), + ("low_level_call", r"\.call\s*\("), + ("unchecked_block", r"\bunchecked\s*\{"), + ("block_timestamp", r"block\.timestamp"), +] + + +def scan(path: Path): + text = path.read_text(encoding="utf-8", errors="ignore") + findings = [] + lines = text.splitlines() + + for name, pat in RULES: + rx = re.compile(pat) + for idx, line in enumerate(lines, start=1): + if rx.search(line): + findings.append({ + "rule": name, + "line": idx, + "snippet": line.strip()[:220], + }) + + severity_map = { + "delegatecall": "high", + "tx_origin": "high", + "selfdestruct": "high", + "low_level_call": "medium", + "inline_assembly": "medium", + "unchecked_block": "medium", + "block_timestamp": "low", + } + + for f in findings: + f["severity"] = severity_map.get(f["rule"], "info") + + score = 0 + for f in findings: + if f["severity"] == "high": + score += 3 + elif f["severity"] == "medium": + score += 2 + elif f["severity"] == "low": + score += 1 + + return { + "generated_at": datetime.now(timezone.utc).isoformat(), + "contract": str(path), + "findings_count": len(findings), + "risk_score": score, + "findings": findings, + } + + +def main(): + ap = argparse.ArgumentParser() + ap.add_argument("contract", help="path to .sol") + ap.add_argument("--out", default="") + args = ap.parse_args() + + res = scan(Path(args.contract)) + + if args.out: + Path(args.out).write_text(json.dumps(res, indent=2), encoding="utf-8") + print(args.out) + else: + print(json.dumps(res, indent=2)) + + +if __name__ == "__main__": + main() diff --git a/services/blockchain/analysis/trace_btc_tx.py b/services/blockchain/analysis/trace_btc_tx.py new file mode 100755 index 0000000..b608064 --- /dev/null +++ b/services/blockchain/analysis/trace_btc_tx.py @@ -0,0 +1,80 @@ +#!/usr/bin/env python3 +""" +Bitcoin transaction tracer via Blockstream public API. + +- Fetches tx details +- Traces spend path for each output up to configurable depth +""" + +from __future__ import annotations + +import argparse +import json +import urllib.request +from datetime import datetime, timezone + + +API = "https://blockstream.info/api" + + +def get_json(url: str): + req = urllib.request.Request(url, headers={"User-Agent": "quant-tracer/1.0"}) + with urllib.request.urlopen(req, timeout=30) as r: + return json.loads(r.read().decode("utf-8")) + + +def trace_outspend(txid: str, vout: int, depth: int): + out = { + "txid": txid, + "vout": vout, + "depth": depth, + "spent": None, + "spending_txid": None, + "children": [], + } + if depth <= 0: + return out + + sp = get_json(f"{API}/tx/{txid}/outspend/{vout}") + out["spent"] = sp.get("spent") + out["spending_txid"] = sp.get("txid") + + if sp.get("spent") and sp.get("txid"): + next_tx = get_json(f"{API}/tx/{sp['txid']}") + for idx, _ in enumerate(next_tx.get("vout", [])): + out["children"].append(trace_outspend(sp["txid"], idx, depth - 1)) + + return out + + +def main(): + ap = argparse.ArgumentParser() + ap.add_argument("txid") + ap.add_argument("--depth", type=int, default=1) + ap.add_argument("--out", default="") + args = ap.parse_args() + + tx = get_json(f"{API}/tx/{args.txid}") + + summary = { + "generated_at": datetime.now(timezone.utc).isoformat(), + "txid": args.txid, + "status": tx.get("status"), + "vin_count": len(tx.get("vin", [])), + "vout_count": len(tx.get("vout", [])), + "vout_trace": [], + } + + for i, _ in enumerate(tx.get("vout", [])): + summary["vout_trace"].append(trace_outspend(args.txid, i, args.depth)) + + if args.out: + with open(args.out, "w", encoding="utf-8") as f: + json.dump(summary, f, indent=2) + print(args.out) + else: + print(json.dumps(summary, indent=2)) + + +if __name__ == "__main__": + main() diff --git a/services/blockchain/analysis/trace_eth_tx.py b/services/blockchain/analysis/trace_eth_tx.py new file mode 100755 index 0000000..ce40f93 --- /dev/null +++ b/services/blockchain/analysis/trace_eth_tx.py @@ -0,0 +1,103 @@ +#!/usr/bin/env python3 +""" +Ethereum transaction tracer (RPC-first, public-node compatible). + +- Retrieves tx + receipt +- Attempts debug_traceTransaction when available +- Emits normalized JSON summary +""" + +from __future__ import annotations + +import argparse +import json +import urllib.request +from datetime import datetime, timezone + + +def rpc_call(url: str, method: str, params: list): + payload = { + "jsonrpc": "2.0", + "id": 1, + "method": method, + "params": params, + } + req = urllib.request.Request( + url, + data=json.dumps(payload).encode("utf-8"), + headers={"Content-Type": "application/json"}, + method="POST", + ) + with urllib.request.urlopen(req, timeout=30) as r: + resp = json.loads(r.read().decode("utf-8")) + if "error" in resp: + raise RuntimeError(resp["error"]) + return resp.get("result") + + +def h2i(x): + if x is None: + return None + try: + return int(x, 16) + except Exception: + return None + + +def summarize(tx: dict, receipt: dict, trace: dict | None): + logs = receipt.get("logs", []) if receipt else [] + + out = { + "generated_at": datetime.now(timezone.utc).isoformat(), + "tx_hash": tx.get("hash") if tx else None, + "from": tx.get("from") if tx else None, + "to": tx.get("to") if tx else None, + "nonce": h2i(tx.get("nonce")) if tx else None, + "block_number": h2i(tx.get("blockNumber")) if tx else None, + "gas": h2i(tx.get("gas")) if tx else None, + "gas_price_wei": h2i(tx.get("gasPrice")) if tx else None, + "value_wei": h2i(tx.get("value")) if tx else None, + "status": h2i(receipt.get("status")) if receipt else None, + "gas_used": h2i(receipt.get("gasUsed")) if receipt else None, + "effective_gas_price_wei": h2i(receipt.get("effectiveGasPrice")) if receipt else None, + "contract_address": receipt.get("contractAddress") if receipt else None, + "logs_count": len(logs), + "logs_topics": [l.get("topics", []) for l in logs[:20]], + "trace_available": trace is not None, + "trace": trace, + } + return out + + +def main(): + ap = argparse.ArgumentParser() + ap.add_argument("tx_hash", help="0x... transaction hash") + ap.add_argument("--rpc", default="https://cloudflare-eth.com", help="Ethereum JSON-RPC URL") + ap.add_argument("--out", default="", help="optional output json path") + args = ap.parse_args() + + tx = rpc_call(args.rpc, "eth_getTransactionByHash", [args.tx_hash]) + if tx is None: + raise SystemExit("Transaction not found") + + receipt = rpc_call(args.rpc, "eth_getTransactionReceipt", [args.tx_hash]) + + trace = None + try: + trace = rpc_call(args.rpc, "debug_traceTransaction", [args.tx_hash, {"tracer": "callTracer"}]) + except Exception: + # Public RPCs often disable debug methods; this is expected. + trace = None + + out = summarize(tx, receipt, trace) + + if args.out: + with open(args.out, "w", encoding="utf-8") as f: + json.dump(out, f, indent=2) + print(args.out) + else: + print(json.dumps(out, indent=2)) + + +if __name__ == "__main__": + main() diff --git a/services/blockchain/hardhat/package.json b/services/blockchain/hardhat/package.json index 422194d..eca7fe3 100644 --- a/services/blockchain/hardhat/package.json +++ b/services/blockchain/hardhat/package.json @@ -5,7 +5,8 @@ "scripts": { "build": "hardhat compile", "test": "hardhat test", - "node": "hardhat node" + "node": "hardhat node", + "introspect": "node scripts/introspect.js" }, "license": "MIT", "devDependencies": { diff --git a/services/blockchain/hardhat/scripts/introspect.js b/services/blockchain/hardhat/scripts/introspect.js new file mode 100644 index 0000000..6b3e737 --- /dev/null +++ b/services/blockchain/hardhat/scripts/introspect.js @@ -0,0 +1,29 @@ +const hre = require("hardhat"); + +async function main() { + const contractName = process.argv[2] || "Greeter"; + await hre.run("compile"); + + const artifact = await hre.artifacts.readArtifact(contractName); + + const fns = artifact.abi.filter((x) => x.type === "function").map((f) => ({ + name: f.name, + stateMutability: f.stateMutability, + inputs: (f.inputs || []).map((i) => `${i.type} ${i.name}`), + outputs: (f.outputs || []).map((o) => `${o.type} ${o.name}`), + })); + + const report = { + contract: contractName, + bytecodeLength: artifact.bytecode ? artifact.bytecode.length : 0, + deployedBytecodeLength: artifact.deployedBytecode ? artifact.deployedBytecode.length : 0, + functions: fns, + }; + + console.log(JSON.stringify(report, null, 2)); +} + +main().catch((error) => { + console.error(error); + process.exitCode = 1; +}); diff --git a/services/ingestion/preflight_phase4.py b/services/ingestion/preflight_phase4.py new file mode 100755 index 0000000..0cfd50d --- /dev/null +++ b/services/ingestion/preflight_phase4.py @@ -0,0 +1,75 @@ +#!/usr/bin/env python3 +""" +Phase 4 preflight checks for ingestion stack readiness. +""" + +from __future__ import annotations + +import os +import socket +from dataclasses import dataclass + + +@dataclass +class Check: + name: str + ok: bool + detail: str + + +def check_tcp(host: str, port: int, timeout: float = 1.5) -> bool: + s = socket.socket() + s.settimeout(timeout) + try: + s.connect((host, port)) + return True + except Exception: + return False + finally: + s.close() + + +def main(): + checks = [] + + db_url = os.getenv("DATABASE_URL", "") + checks.append(Check("DATABASE_URL_set", bool(db_url), "set" if db_url else "missing")) + + postgres_up = check_tcp("127.0.0.1", 5432) + checks.append(Check("postgres_tcp_5432", postgres_up, "reachable" if postgres_up else "not reachable")) + + db_auth_ok = False + db_auth_detail = "skipped" + if db_url: + try: + import psycopg # type: ignore + + with psycopg.connect(db_url, connect_timeout=3) as conn: + with conn.cursor() as cur: + cur.execute("select 1") + cur.fetchone() + db_auth_ok = True + db_auth_detail = "auth+query ok" + except Exception as exc: + db_auth_ok = False + db_auth_detail = str(exc).splitlines()[-1][:220] + checks.append(Check("postgres_auth_query", db_auth_ok, db_auth_detail)) + + tradier = any(os.getenv(k) for k in ["TRADIER_API_TOKEN", "TRADIER_SANDBOX_TOKEN", "TRADIER_LIVE_TOKEN"]) + checks.append(Check("tradier_token", tradier, "present" if tradier else "missing")) + + alpaca_key = any(os.getenv(k) for k in ["ALPACA_API_KEY", "ALPACA_PAPER_KEY", "ALPACA_LIVE_KEY"]) + alpaca_secret = any(os.getenv(k) for k in ["ALPACA_API_SECRET", "ALPACA_PAPER_SECRET", "ALPACA_LIVE_SECRET"]) + checks.append(Check("alpaca_creds", alpaca_key and alpaca_secret, "present" if (alpaca_key and alpaca_secret) else "missing")) + + print("Phase4 preflight") + for c in checks: + mark = "OK" if c.ok else "WARN" + print(f"- [{mark}] {c.name}: {c.detail}") + + if not all(c.ok for c in checks if c.name in {"DATABASE_URL_set", "postgres_tcp_5432", "postgres_auth_query"}): + print("Preflight: DB prerequisites not met. Ingestors may fail writes.") + + +if __name__ == "__main__": + main() diff --git a/services/ingestion/run_all_ingestors.sh b/services/ingestion/run_all_ingestors.sh index e8d00bb..f3ba6c6 100755 --- a/services/ingestion/run_all_ingestors.sh +++ b/services/ingestion/run_all_ingestors.sh @@ -1,9 +1,25 @@ #!/usr/bin/env bash set -euo pipefail -ROOT="/home/aimls-dtd/.openclaw/workspace/projects/quantconnect" +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" cd "$ROOT/infra" -set -a; source .env; set +a +set -a +source .env +if [[ -f .secrets ]]; then source .secrets; fi +set +a + +# scrub placeholder redacted values so scripts don't try invalid auth +for var in \ + ALPACA_API_KEY ALPACA_PAPER_KEY ALPACA_LIVE_KEY \ + ALPACA_API_SECRET ALPACA_PAPER_SECRET ALPACA_LIVE_SECRET \ + TRADIER_API_TOKEN TRADIER_SANDBOX_TOKEN TRADIER_LIVE_TOKEN + do + if [[ "${!var:-}" == REDACTED_USE_OPENCLAW_CONFIG* ]]; then + unset "$var" + fi +done + export DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@127.0.0.1:5432/${POSTGRES_DB}" cd "$ROOT/services/ingestion" diff --git a/services/ingestion/run_phase2_cycle.sh b/services/ingestion/run_phase2_cycle.sh index 505ba84..8e67c05 100755 --- a/services/ingestion/run_phase2_cycle.sh +++ b/services/ingestion/run_phase2_cycle.sh @@ -1,9 +1,24 @@ #!/usr/bin/env bash set -euo pipefail -ROOT="/home/aimls-dtd/.openclaw/workspace/projects/quantconnect" +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" cd "$ROOT/infra" -set -a; source .env; set +a +set -a +source .env +if [[ -f .secrets ]]; then source .secrets; fi +set +a + +for var in \ + ALPACA_API_KEY ALPACA_PAPER_KEY ALPACA_LIVE_KEY \ + ALPACA_API_SECRET ALPACA_PAPER_SECRET ALPACA_LIVE_SECRET \ + TRADIER_API_TOKEN TRADIER_SANDBOX_TOKEN TRADIER_LIVE_TOKEN + do + if [[ "${!var:-}" == REDACTED_USE_OPENCLAW_CONFIG* ]]; then + unset "$var" + fi +done + export DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@127.0.0.1:5432/${POSTGRES_DB}" cd "$ROOT/services/ingestion" diff --git a/services/ingestion/run_phase3_1_data_lanes.sh b/services/ingestion/run_phase3_1_data_lanes.sh index f4be7bd..836a835 100755 --- a/services/ingestion/run_phase3_1_data_lanes.sh +++ b/services/ingestion/run_phase3_1_data_lanes.sh @@ -1,8 +1,23 @@ #!/usr/bin/env bash set -euo pipefail -ROOT="/home/aimls-dtd/.openclaw/workspace/projects/quantconnect" +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" cd "$ROOT/infra" -set -a; source .env; set +a +set -a +source .env +if [[ -f .secrets ]]; then source .secrets; fi +set +a + +for var in \ + ALPACA_API_KEY ALPACA_PAPER_KEY ALPACA_LIVE_KEY \ + ALPACA_API_SECRET ALPACA_PAPER_SECRET ALPACA_LIVE_SECRET \ + TRADIER_API_TOKEN TRADIER_SANDBOX_TOKEN TRADIER_LIVE_TOKEN + do + if [[ "${!var:-}" == REDACTED_USE_OPENCLAW_CONFIG* ]]; then + unset "$var" + fi +done + export DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@127.0.0.1:5432/${POSTGRES_DB}" cd "$ROOT/services/ingestion" diff --git a/services/ingestion/run_phase4_cycle.sh b/services/ingestion/run_phase4_cycle.sh new file mode 100755 index 0000000..e2e550f --- /dev/null +++ b/services/ingestion/run_phase4_cycle.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" + +cd "$ROOT/infra" +set -a +source .env +if [[ -f .secrets ]]; then source .secrets; fi +set +a + +export DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@127.0.0.1:5432/${POSTGRES_DB}" + +echo "[phase4] preflight" +python3 "$ROOT/services/ingestion/preflight_phase4.py" + +echo "[phase4] running ingestion lanes" +bash "$ROOT/services/ingestion/run_phase3_1_data_lanes.sh" + +echo "[phase4] building run ledger" +python3 "$ROOT/lean-cli/scripts/backtests/build_run_ledger.py" + +echo "[phase4] refreshing token-efficient research digest" +python3 "$ROOT/research/scripts/update_arxiv_digest.py" --per-topic 15 --top 80 + +echo "[phase4] syncing dashboard data" +bash "$ROOT/frontend/github-pages/scripts/sync_data.sh" + +echo "[phase4] done" From 656180efea70fcbead280f790112beb70e41caf4 Mon Sep 17 00:00:00 2001 From: AIML Assistant Date: Fri, 3 Apr 2026 02:14:00 +0000 Subject: [PATCH 2/3] Revamp repo front page and add Q1 Claw focus brief --- README.md | 75 ++++++++++++++++--------------- docs/RECENT_CLAW_FOCUS_Q1_2026.md | 20 +++++++++ 2 files changed, 59 insertions(+), 36 deletions(-) create mode 100644 docs/RECENT_CLAW_FOCUS_Q1_2026.md diff --git a/README.md b/README.md index cbbbb98..f665641 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,39 @@ -# MultiClaw-Quant-Tools 📈🦞 +# MultiClaw Quant Tools [![Quant Quality Gate](https://github.com/AIML-Solutions/MultiClaw-quant-tools/actions/workflows/ci.yml/badge.svg)](https://github.com/AIML-Solutions/MultiClaw-quant-tools/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/badge/license-MIT-22c55e.svg)](LICENSE) -**MultiClaw-Quant-Tools** is AIML Solutions’ quantitative engineering lane for market data, derivatives analytics, and strategy infrastructure. +Quant engineering stack for paper-trading strategy research, execution-model realism, and Claw-native automation workflows. -## What this repo does +## Current focus (last 3 months) -- Executes LEAN backtests and strategy research workflows -- Ingests structured market/derivatives outputs into PostgreSQL -- Exposes query surfaces through GraphQL and JSON-RPC -- Provides hooks for MCP-enabled agent tooling -- Supports options/greeks analytics and scenario research +- Regime-specialist execution rollouts across strategy sleeves +- Nonlinear market-impact and liquidity-aware sizing controls +- Validation discipline upgrades (walk-forward and stress-first workflow) +- Claw-integrated repo operations and automation cadence -## Current implementation highlights +## What this repository does -- LEAN authenticated with baseline backtest validated -- Postgres + Hasura + Qdrant stack operational -- Backtest summary ingestion to Postgres verified -- GraphQL query path verified -- Market-hours and data-source mapping documented +- Runs LEAN strategy research and backtest workflows +- Maintains options/greeks and statarb strategy implementations +- Provides ingestion + query surfaces (GraphQL/JSON-RPC scaffolds) +- Supports operational docs and runbooks for repeatable quant workflows -## Key documents +## Strategy lanes -- [docs/architecture.md](docs/architecture.md) -- [docs/runbook.md](docs/runbook.md) -- [docs/data-sources-and-market-hours.md](docs/data-sources-and-market-hours.md) -- [docs/DATA_PIPELINE_SPEC.md](docs/DATA_PIPELINE_SPEC.md) -- [docs/OPTIONS_GREEKS_PLAYBOOK.md](docs/OPTIONS_GREEKS_PLAYBOOK.md) -- [docs/graphql-examples.md](docs/graphql-examples.md) -- [docs/ROADMAP.md](docs/ROADMAP.md) +- `lean-cli/baseline-strategy/` — trend sleeve foundation +- `lean-cli/regime-ensemble-alpha/` — allocator with regime controls +- `lean-cli/statarb-spread-engine/` — spread mean-reversion engine +- `lean-cli/options-greeks-vix/` — options/volatility execution lane +- `lean-cli/anchored-vwap-sleeve/` — cross-asset AVWAP sleeve + +## Core docs + +- `lean-cli/ALGO_SYSTEM_ROADMAP.md` +- `docs/architecture.md` +- `docs/runbook.md` +- `docs/graphql-examples.md` +- `docs/ROADMAP.md` ## Quick start @@ -38,31 +42,30 @@ lean login lean whoami -# bring up infra +# infra bootstrap cd infra cp .env.example .env docker compose up -d -# run baseline local backtest +# run a local smoke backtest cd ../lean-cli lean backtest "baseline-strategy" --no-update ``` -## Directory map +## Standards -- `lean-cli/` — LEAN projects + generated backtests -- `lean/` — setup + ingestion scripts -- `infra/` — compose + schema bootstrap -- `services/validation/` — Pydantic models -- `services/rpc/` — JSON-RPC scaffold -- `services/mcp/` — MCP integration notes -- `services/options-greeks/` — pricing framework notes -- `services/blockchain/` — cross-lane chain analytics bridge +Every strategy change should pass this gate: +1. design rationale +2. code implementation +3. structural validation +4. stress-aware performance checks -## Contributing +## Security & usage -See [CONTRIBUTING.md](CONTRIBUTING.md). +- Paper-trading/research use only +- Never commit secrets +- Review external integrations before enabling write permissions ## License -MIT — see [LICENSE](LICENSE). +MIT — see `LICENSE`. diff --git a/docs/RECENT_CLAW_FOCUS_Q1_2026.md b/docs/RECENT_CLAW_FOCUS_Q1_2026.md new file mode 100644 index 0000000..249dd2d --- /dev/null +++ b/docs/RECENT_CLAW_FOCUS_Q1_2026.md @@ -0,0 +1,20 @@ +# Recent Claw Focus — Q1 2026 + +## Summary +This document tracks the most recent quarter's Claw-related engineering priorities and execution outcomes for quant systems. + +## Priority themes +- Execution realism before alpha expansion +- Regime-specialist policy behavior +- Sequential, gated implementation workflow +- Operational recency and documentation hygiene + +## Delivered outcomes +- Strategy sleeves upgraded with improved execution controls +- Validation workflow shifted toward stress-aware methodology +- Repo presentation and structure refreshed for clarity and auditability + +## Next quarter focus +- Reality-gap simulator hardening +- Overfit diagnostics and walk-forward rigor +- Portfolio intelligence surface (GraphQL + dashboard) From 64a6de5f9040ba7aa0ce065278d5c0cf6fb7cdb5 Mon Sep 17 00:00:00 2001 From: Dennis Donaghy Date: Fri, 3 Apr 2026 06:40:40 +0000 Subject: [PATCH 3/3] chore(gitignore): ignore nested sleeve backtest artifact folders --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index aa86a8c..ba2498b 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ infra/.env # LEAN heavy data/artifacts lean-cli/data/ lean-cli/backtests/ +lean-cli/**/backtests/ lean-cli/.cache/ lean/data/ lean/logs/