SPB Git

Repository Public Research preview

6 entries at the root
History

Latest commit docs(readme): keep live counters in badges only, so the generated block is stable 90d5605

NameLast commitUpdated
docs chore: standardize SP Boucher source headers and attribution
paper chore: standardize SP Boucher source headers and attribution
.gitignore harmonisation standard UQO WP (2026-10-17)
.spb-source-governance.toml chore: standardize SP Boucher source headers and attribution
CLAUDE.md chore: standardize SP Boucher source headers and attribution
README.md docs(readme): keep live counters in badges only, so the generated block is stable
README.md View source

UQO Working Paper No. 13 — VQuant: An Agentic Large Language Model Architecture for Automated Quantitative Financial Analysis and Document Generation

peer review: completed ✓ review score: 38.1 → 54.9 / 100 gain: +16.8 pts integrity: PASS reproducibility: R1 · reproduced from analysis data maturity: grade C referee reports: 6 review items addressed: 79

version: 1.2 · November 2026 pages: 74 figures: 9 tables: 13 numbered equations: 3 references: 65 words: 29 500

revised branch: review-20261103 @ 76e196e review commits: 14 ahead of main commits on main: 3 files: 33 LaTeX: 20 files Python: 1 files SSRN: 7650999 UQO: Sciences administratives

📄: Revised manuscript (PDF) 📖: Interactive reader 🔍: Review branch 🧾: Revision commits 🌐: Paper page

📈 In one sentence (revised, peer-reviewed version 1.2) — A design-science specification of VQuant, a deployed platform in which a reasoning-capable model orchestrates 245 schema-defined tools and a Python sandbox, audited against one commit of the source code (50 extracted facts) and against read-only exports of 301 sessions and 1,062 completed requests; persisted reports show an unsupported-number rate of 0.89% [0.79, 1.01], an observational, single-arm quantity, and the pre-registered paired evaluation has not been run, so no comparative claim is made.

# 🔬 Peer review at a glance

This paper went through the full multi-referee review of the UQO working-paper series: 6 independent referee reports, 79 review items, an editorial decision (claims not supported as written → reframed and revised), re-execution of the analysis, a complete revision of text, figures and tables, and an independent verification before sign-off. The revised manuscript and every change live on the branch review-20261103 of this repository (14 commits ahead of main, head 76e196e, 2026-11-04).

Review scores before and after revision

Dimension Submitted Revised Δ
Originality 37.5 42.0 +4.5
Rigor 49.2 68.0 +18.8
Identification 30.0 45.0 +15.0
Data & reproducibility 32.5 70.0 +37.5
Robustness 10.0 22.0 +12.0
Writing 70.8 74.0 +3.2
Figures & tables 58.3 78.0 +19.7
Literature 48.3 72.0 +23.7
Weighted total 38.1 54.9 +16.8

Scientific integrity: PASS · Reproducibility: R1 · reproduced from analysis data · Maturity: grade C

# What the review changed

Peer review judged that the earlier version asserted behaviour it had not measured. The revised paper replaces those assertions with facts extracted from the code and with read-only records of the deployed instance, reports the defects this exposed, and adds an observational grounding rate. It still contains no paired evaluation and makes no comparative claim.

  • System constants: described from documentation → 50 facts extracted by script from one commit with file and line anchors (for example 27 sandbox packages under 89 names).
  • Cost accounting: presented as reliable → reported as a defect; the ledger records 33.6% of the output tokens the provider bills.
  • Context management: three stages described as operating → the third stage never fired in 3,414 model calls.
  • Behaviour: asserted → measured on 301 sessions and 1,062 completed requests (median depth 3, median latency 53 seconds, sandbox success 74%).
  • Worked example: a hypothetical walk-through → one persisted session traced from the record.
  • Grounding: no measurement → an observational, single-arm unsupported-number rate of 0.89% [0.79, 1.01]; the paired tools-on/off evaluation is stated as not run.

# Limitations stated in the revised paper

  • No paired evaluation: what the tools add relative to a model without them is not measured, and nothing in the paper supports a comparative claim.
  • The observational rate is automated and single-arm, with no human annotation; several scoring conventions bias it downward and one biases it upward.
  • Executed code and tool inputs are not persisted, per-call model identity is not logged, and requests before 2026-10-02 may have run earlier code.
  • The usage figures describe one deployment with almost entirely anonymous, unprompted traffic, and the platform's repository is private.

# Where to find the reviewed material

What Where
Revised manuscript (PDF, 74 pages) paper/main.pdf on review-20261103
Revised sources, code, figures and tables branch review-20261103
Commit-by-commit revision history review-20261103 commits
All branches (submitted main vs revised) branches
Interactive reader (figures, tables, citations) wp.spboucher.ai/papers/wp13/read
Paper page, abstract and citation formats wp.spboucher.ai/papers/wp13

# 🏆 Headline results (revised version)

Result What it is
0.89% [0.79, 1.01] Unsupported-number rate over 26,568 numeric tokens in 395 persisted reports scored against their own stored tool outputs (237 unsupported). Observational, single-arm and scored by a program without human annotation; it does not say what the tools add.
245 tools Schema-defined tools in the catalogue at the audited commit, rather than the 237 of a source comment or the 213 of the repository's README; 3 catalogue tools have no handler and 2 tools named in the system prompt are absent from the catalogue.
50 / 33 / 0 Facts extracted by script from one fixed commit with file and line anchors, facts derived from them, and facts typed by hand.
33.6% Share of provider-reported output tokens that the platform's cost ledger recorded in 265 logged calls, because it reads a field the provider does not populate; at the default model's list rate the window's cost is 3.54 times the ledger's.
0 of 3,414 Model calls on which the third context-management stage (adaptive summarisation) fired; its estimator ignores the 26,104-token tool catalogue that dominates every request.
3 calls, 53 s Median recursion depth and median end-to-end latency over 1,062 completed requests (latency interquartile range 25–97 s); the Python sandbox succeeded in 205 of 277 executions (74%).
187 of 213 Continuation calls with non-zero thinking tokens in the provider's usage events, which refutes a referee's conjecture that adaptive reasoning is silently disabled on continuation calls.
📄 Abstract

Large language models write fluent financial prose, but a fluent number is neither retrieved nor computed. This paper specifies VQuant, a deployed web platform in which a reasoning-capable model orchestrates 245 schema-defined tools—market-data wrappers, web research, and a Python sandbox—through a recursive, batched, streaming loop, and audits that specification against one commit of the source code: 50 facts extracted with file and line anchors, none typed. Read-only exports from the instance (301 persisted sessions, 1,062 completed requests) replace earlier assertions with measurements: median recursion depth 3, median latency 53 seconds, and a cost ledger that captures 33.6% of the output tokens the provider bills. Scoring every persisted report against its stored tool outputs gives an unsupported-number rate of 0.89% [0.79, 1.01], an observational, single-arm quantity. The pre-registered paired evaluation has not been run; the paper reports its analysis plan and the contrast it could detect.

🧩 Contributions
  • A constants-level specification of a production loop — The streaming transport, the recursive tool-calling procedure, the batching policy, prompt-level routing over 245 tools, the three-stage context procedure and the single-call computation convention are stated as algorithms with their extracted constants, including where the implementation departs from its own intent.
  • A re-runnable audit — Every quoted fact is produced by a script that refuses to run unless the code tree and file hashes match a committed manifest; the generated tables and the verbatim prompts are part of the package.
  • Measured behaviour of the deployed instance — Recursion depth, tools per round, batching, sandbox success, latency, ledger and provider token counts, one fully traced persisted session and the observational unsupported-number rate replace earlier behavioural assertions.
  • Defects reported as findings — The audit exposed a re-send cap that overrides the execution-time limit, a summarisation stage that has never fired, a cost ledger that under-records output tokens, and a sandbox that inherits the server's credentials under anonymous use; the paper lists the engineering changes that follow.
  • A pre-registered evaluation protocol with a statistical analysis plan — Primary endpoint, paired design, ground truths, inference and minimum detectable differences are defined; the protocol has not been executed and the reasons (cost at list price, no staging deployment, no task-level ground truth) are stated.
🗄️ Data
  • Source code at one audited commit — The platform's TypeScript and Python code at commit e2a148a (2026-10-02), the deployed state on 2026-11-04: a React front end, an Express back end and an isolated Python layer with 27 third-party packages bound under 89 names. The market-data provider is wrapped by 249 typed functions over 233 endpoint paths.
  • Read-only exports from the deployed instance — Application logs (183 daily files, 2025-10-21 to 2026-11-03), a copy of the session store (301 sessions, 300 of them anonymous; 445 turns; 443 shared reports, 397 with stored tool results) and 265 provider-side usage events. No paid call was made.
  • Persisted reports scored for grounding — 395 scorable reports with their full stored tool outputs: 82.8% of numeric tokens match a stored number verbatim and 16.4% are derivable from stored numbers; 314 reports contain no unsupported number.
⚙️ Methodology
  • Design-science framing — The paper presents an artifact, states the problem it addresses and specifies its construction; it is explicitly not an evaluation and makes no comparative claim about accuracy, latency or cost.
  • Script-extracted code audit — Constants and counts are extracted by script from a fixed commit, each with the supporting file and line, and an appendix lists every statement of the paper against its source.
  • Usage descriptives — Recursion depth, tool counts, failures, latency and token accounting are computed from logs, the session store and provider usage events, for the full window and for the window in which the audited commit is certain to have been deployed.
  • Observational grounding measure — Each numeric token of a persisted report is labelled verbatim, derived or unsupported against the stored tool outputs, with Wilson and report-clustered bootstrap intervals.
  • Proposed paired protocol (not executed) — Retrieval, computation and report task families with independent ground truth, ablations led by a tools-disabled arm, baselines, controls and a statistical analysis plan; at 50 tasks per arm the minimum detectable difference is 23 percentage points.
♻️ Reproducibility
  • The audit is re-runnable: the extraction script checks the code tree and the hashes of the 42 files it reads against a committed manifest before producing the tables and facts quoted in the text.
  • The manifest, the generated tables and the verbatim prompts are part of the paper's package; the platform's own repository is private, so the audit is re-runnable only by someone with access to it.
  • The design is reproducible from the paper (algorithms, constants, prompts, inter-process contract); the outputs are not, because sampling is not seedable, the Python code is authored by the model, and the Monte Carlo routine has no fixed seed.
  • Executed Python source is not persisted, so figures in any report cannot be regenerated and numbers the sandbox computed from self-fetched data cannot be checked from the record.

Keywords large language models · LLM agents · tool use · design science · quantitative finance · automated report generation · reproducibility
JEL C45, C63, C88, O33

# 📚 How to cite

bibtex
@techreport{boucher2026wp13,
  author      = {Simon-Pierre Boucher},
  title       = {VQuant: An Agentic Large Language Model Architecture for Automated Quantitative Financial Analysis and Document Generation: A Specification Audited Against the Code, with Usage Evidence and an Observational Grounding Measure from the Deployed Instance},
  institution = {Université du Québec en Outaouais},
  type        = {UQO Working Paper No. 13},
  year        = {2026},
  note        = {Version 1.2, November 2026, revised after peer review},
  url         = {https://wp.spboucher.ai/papers/wp13}
}

ℹ️ Below: documentation of the main branch (the version submitted to review). Numbers and claims that the review corrected are superseded by the block above and by the branch review-20261103.


# 🤖 VQuant: An Agentic Large Language Model Architecture for Automated Quantitative Financial Analysis and Document Generation

platform author

LaTeX

commits last-commit activity language languages size branches tags license clones

Tracked files lines of code languages docs

UQO Working Paper No. 13 — Reasoning-Augmented Tool Orchestration, In-Loop Numerical Computation, and Multi-Format Reporting

Paper Type Platform Institution Author

TL;DR — VQuant is a deployed web platform that turns a natural-language request into a quantitative financial report in which every number comes from live data retrieval or auditable code rather than from the model. This is a design-science system description, audited line by line against the platform's source code (spbgit vquant.git, commit e2a148a, 2026-10-02): a recursive, batched, streaming tool-calling loop over 245 schema-defined tools (two market-data providers, 249 typed wrappers over 233 endpoint paths; three web-research services; a Python sandbox pre-loading 29 packages), a three-stage context-management procedure (3,000/15,000-char truncation at execution, 5,000-char re-send cap, adaptive summarisation at 10^5 tokens keeping the last 5 messages), a single-call computation convention, and a document pipeline (PDF via Puppeteer+KaTeX, DOCX via Pandoc, Beamer via a second model call + two pdflatex passes, live-formula XLSX). No empirical evaluation is reported (no accuracy, hallucination, latency or cost measurements); a pre-registered evaluation protocol is specified as future work.


# 📌 Status

Item Value
Version 1.1 (October 2026) — revised 2026-10-17 (editorial-board review; docs/REVIEW-REPORT.md, docs/CHANGELOG-REVISION.md). v1.0 = June 2026 (docs/main_pre-revision-20261017.pdf, 28 p.)
SSRN not yet submitted
Journal not yet submitted; candidate venues Journal of Financial Data Science, Decision Support Systems, Expert Systems with Applications — only after the evaluation protocol of §6.6 has been executed
Code & data design/system paper — no empirical pipeline. The platform's source code lives in the spbgit repository vquant.git; the paper describes commit e2a148a (2026-10-02). The audit script and its outputs are in docs/verify/

# 🎯 What this paper does

Large language models are fluent in financial discourse, but fluency does not guarantee numerically rigorous, reproducible or citable analysis. This paper describes the architecture of VQuant, a platform that couples a reasoning-capable LLM with a deterministic execution substrate, under the principle the model plans and synthesises, auditable code computes. It is written as a design-science contribution (Hevner et al. 2004; Gregor & Hevner 2013): a situated implementation plus a demonstration, with the evaluation step specified but not performed.

Four mechanisms are documented at implementation level, with their actual constants, and audited against the code (Appendix E maps every claim to a source file):

  1. an agentic orchestration loop over 245 tools (recursive tool-calling, batches of 5 with 500 ms spacing, tool-use/tool-result pairing, prompt-level routing by request complexity);
  2. a three-stage context-management procedure (per-result truncation at execution, re-send cap, adaptive summarisation under a 10^5-token budget) and a token-accounting correction (max of provider count and a local BPE count — an approximation, not an exact count);
  3. a single-call computation convention (data → estimation → figures in one sandboxed Python execution; process-isolated child, 90 s timeout, figure sweep at 150 dpi);
  4. a document pipeline (PDF, DOCX, Beamer, live-formula XLSX from one Markdown artifact).

The revision corrected several statements of v1.0 that the code audit contradicted: tool count, tokenizer, reachability of the pre-built numerical routines (only the option pricer is in the catalogue), the model layer (now multi-provider), and three features (SSO, daily caps, bring-your-own-keys) that do not exist in any committed version.

# 🏆 Headline results

There are no empirical results. The table lists verified design facts (commit e2a148a).

Object Value (audited)
Tools exposed to the model 245 schema-defined tools (17 families, Table 3)
Market-data wrappers 249 typed functions over 233 endpoint paths (FMP) + 8 EODHD tools
Web-research tools 14 (Firecrawl 7, Tavily 5, Exa 2)
Sandbox packages attempted at start-up 29 (platform docs say 17)
Loop constants batches of 5, 500 ms; truncation 3,000/15,000 chars; re-send cap 5,000; τ = 10^5 tokens, k = 5
Model layer Anthropic reference path (default claude-fable-5, adaptive thinking on 5 models, 64,000-token cap, temperature 1); OpenAI-compatible adapter limited to the first 128 tools
Output formats from one artifact PDF, DOCX, Beamer, XLSX (live formulas)
Measurements of accuracy, hallucination, latency, cost none (protocol in §6.6, not executed)

# 🗂 Repository layout

text
vquant-llm-quant-platform/
├── paper/                    # main.tex + sections/ + figures/ (TikZ diagrams) + tables/ + appendix/ → main.pdf
│   ├── figures/              # architecture, loop, context, sandbox, streaming, docpipeline (TikZ)
│   └── tables/               # tools (generated by docs/verify/audit_vquant_code.py), models, events, robustness (= design rationale)
└── docs/                     # REVIEW-REPORT.md, CHANGELOG-REVISION.md, main_pre-revision-20261017.pdf, verify/ (audit script + JSON)

No src/, scripts/ or data/: the paper has no empirical pipeline. docs/verify/audit_vquant_code.py <clone of vquant.git> regenerates paper/tables/tools.tex and the code facts used in the text.

# 🚀 Quick start

bash
cd paper && make      # latexmk → main.pdf (pdflatex + bibtex, TikZ diagrams compiled inline)

# 🗃 Data

Not applicable. The paper describes a software system; the platform itself (TypeScript/Python) is maintained in the spbgit repository vquant.git and deployed on the MacLustr cluster.

# 🔬 Methodology

  1. Architecture description — components, data layer, model layer, as implemented at commit e2a148a (§3).
  2. Mechanism specification — transport, recursive loop (Algorithm 1), batching, routing, three-stage context management (Algorithm 2), token correction, single-call convention (§4).
  3. Execution substrate, document pipeline, illustrative walk-through — no numbers reported (§5).
  4. Design rationale, threats to validity, reproducibility, proposed evaluation protocol (not executed) — task suite, metrics (incl. unsupported-number rate), ablations, baselines, controls (§6).
  5. Appendix — prompt structure, persistence schema, numerical closed forms, event types, and the claim-by-claim audit table against the code.

# 🖼 Figures & tables inventory

Figure (TikZ) Content
figures/architecture.tex end-to-end platform architecture
figures/loop.tex recursive tool-calling loop
figures/context.tex two-stage context management
figures/sandbox.tex inter-process Python sandbox
figures/streaming.tex SSE event dispatch
figures/docpipeline.tex unified document pipeline

Tables (paper/tables/*.tex): tool catalogue (generated), model layer, streaming events, design rationale; appendix tables: persisted entities, code audit (longtable).

# ⚠️ Limitations

  • Design-science description only: no evaluation (accuracy, hallucination rate, latency, cost, ablations, baselines). The protocol of §6.6 is pre-registered in the text but has not been run.
  • Describes one commit (e2a148a, 2026-10-02) of a system that keeps changing; counts and constants are facts about that commit.
  • Outputs are not strictly reproducible (temperature 1, no seeds, model-authored code); the design is.
  • Known defects surfaced by the audit and not yet fixed in the code: no recursion-depth bound; single $3/$15 price schedule for all models; six numerical handlers unreachable (not in the catalogue) while the prompt still advertises two of them; the sandbox is process isolation, not a security boundary.
  • Reproducing the platform requires the private vquant.git code base and API keys.

# 📝 Citation

bibtex
@techreport{boucher2026vquant,
  author      = {Boucher, Simon-Pierre},
  title       = {VQuant: An Agentic Large Language Model Architecture for Automated Quantitative Financial Analysis and Document Generation},
  institution = {Universit\'e du Qu\'ebec en Outaouais, D\'epartement des sciences administratives},
  type        = {Working Paper},
  number      = {13},
  year        = {2026},
  month       = {October},
  note        = {Version 1.1}
}

# 👤 Author & contact

Simon-Pierre Boucher — Département des sciences administratives, Université du Québec en Outaouais (UQO), Gatineau, QC. 📧 simon-pierre.boucher@uqo.ca

# 🗒 Notes

  • Revision 2026-10-17 (v1.1): full editorial-board review — docs/REVIEW-REPORT.md (diagnosis, methodology verdicts, literature, maturity) and docs/CHANGELOG-REVISION.md (every corrected statement with its evidence in the code, references added, items not executed). Pre-revision state: git tag pre-revision-20261017, docs/main_pre-revision-20261017.pdf. Bibliography 20 → 46 entries, all verified (Crossref, arXiv, conference proceedings; one entry flagged as withdrawn by its authors). Sections 5 and 6 were renamed from "Results"/"Performance, Reliability, and Security" to "Execution Substrate … and an Illustrative Walk-Through" and "Design Rationale, Threats to Validity, and a Proposed Evaluation".
  • Numbering: first circulated as “Working Paper No. 10” (June 2026); renumbered 13 on 2026-10-17 because No. 10 is The Assessment Gap in Quebec (see Recherche-UQO/HARMONISATION.md).
  • Cover date normalised from “June 13, 2026” to “June 2026” (harmonisation), then “October 2026” (revision).
  • The VQuant platform code is not in this repository (spbgit vquant.git); docs/verify/ contains the audit script and its JSON outputs, not the code.

# Languages

Language Files Lines Share
LaTeX 20 2 049 ███████████████████ 92.9 %
Python 1 157 █ 7.1 %

Counted on git-tracked files, excluding dependencies and generated files.

# Documentation

Document Title
CLAUDE.md Source header policy (SP Boucher)
docs/CHANGELOG-REVISION.md CHANGELOG — Révision scientifique complète (editorial board, 2026-10-17)
docs/REVIEW-REPORT.md REVIEW REPORT — Editorial board, révision scientifique complète (2026-10-17)

# Repository facts

First commit 2026-10-17
Contributors 1
Default branch main
Latest tag pre-revision-20261017
Tracked files 65
Clone git clone https://git.spboucher.ai/wp13_uqo.git

# Author

Simon-Pierre Boucher · spboucher.ai · contact@spboucher.ai

Clone wp13_uqo

Anonymous clone and fetch. Pushing requires the owner's personal access token.

Snapshot of main

Files main
Menu

Theme