% ============================================================================ % UQO Working Paper — Economics / Finance % VQuant: An Agentic LLM Architecture for Quantitative Financial Analysis % ============================================================================ \documentclass[12pt,letterpaper]{article} % --- Encoding & Language --- \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[english]{babel} % --- Page Layout --- \usepackage[ letterpaper, top=1in, bottom=1in, left=1in, right=1in ]{geometry} % --- Typography --- \usepackage{mathptmx} % Times-like font (text + math) \usepackage{microtype} % Improved typographic refinements \usepackage{setspace} \onehalfspacing % 1.5 line spacing % --- Math --- \usepackage{amsmath,amssymb,amsthm} % --- Algorithms --- \usepackage{algorithm} \usepackage{algpseudocode} % --- Code Listings --- \usepackage{listings} \lstset{ basicstyle=\ttfamily\footnotesize, breaklines=true, columns=fullflexible, keepspaces=true, frame=single, rulecolor=\color{black!30}, backgroundcolor=\color{black!3}, showstringspaces=false, captionpos=b } % --- Tables --- \usepackage{booktabs} \usepackage{tabularx} \usepackage{multirow} \usepackage{threeparttable} \usepackage{siunitx} \sisetup{ input-symbols = {()}, table-format = -1.3, parse-numbers = false } % --- Figures & Diagrams --- \usepackage{graphicx} \usepackage{subcaption} \usepackage{float} \usepackage{tikz} \usetikzlibrary{arrows.meta,positioning,shapes.geometric,shapes.misc,fit,backgrounds,calc,shadows,decorations.pathreplacing} % --- Colors & Links --- \usepackage[dvipsnames]{xcolor} \usepackage[ colorlinks = true, linkcolor = NavyBlue, citecolor = NavyBlue, urlcolor = NavyBlue, breaklinks = true, pdftitle = {VQuant: An Agentic Large Language Model Architecture for Automated Quantitative Financial Analysis and Document Generation}, pdfauthor = {Simon-Pierre Boucher} ]{hyperref} % --- Bibliography --- \usepackage[authoryear,round,semicolon]{natbib} \bibliographystyle{aer} % --- Captions --- \usepackage[ font = small, labelfont = bf, labelsep = period, justification = justified, singlelinecheck = false ]{caption} % --- Headers & Footers --- \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \renewcommand{\headrulewidth}{0pt} \fancyfoot[C]{\thepage} % --- Section Formatting --- \usepackage{titlesec} \titleformat{\section}{\large\bfseries}{\thesection.}{0.5em}{} \titleformat{\subsection}{\normalsize\bfseries}{\thesubsection.}{0.5em}{} \titleformat{\subsubsection}{\normalsize\itshape}{\thesubsubsection.}{0.5em}{} % --- Appendix Support --- \usepackage[toc,page]{appendix} % --- Misc --- \usepackage{enumitem} \setlist{nosep,leftmargin=*} % --- Custom colors (VQuant palette) --- \definecolor{VQTeal}{HTML}{119993} \definecolor{VQBlue}{HTML}{2072B2} \definecolor{VQPurple}{HTML}{652E89} \definecolor{VQOrange}{HTML}{F49422} \definecolor{VQGreen}{HTML}{4Fa64B} \definecolor{VQRed}{HTML}{EF632B} \definecolor{VQDark}{HTML}{2B2D42} \definecolor{VQInk}{HTML}{32353F} % --- Font macros used inside diagram node text --- \newcommand{\vqsmall}{\scriptsize} \newcommand{\vqtiny}{\fontsize{6.4}{7.5}\selectfont} % --- Shared TikZ styles for all diagrams --- \tikzset{ vqfont/.style = {font=\footnotesize}, vqsmall/.style = {font=\scriptsize}, vqtiny/.style = {font=\fontsize{6.4}{7.5}\selectfont}, vqbox/.style = {rectangle, rounded corners=3pt, draw=black!45, line width=0.5pt, align=center, inner sep=4.5pt, minimum height=0.78cm, fill=white, drop shadow={shadow xshift=0.6pt, shadow yshift=-0.6pt, opacity=0.18}}, vqteal/.style = {vqbox, draw=VQTeal!75!black, fill=VQTeal!12, text=VQDark}, vqblue/.style = {vqbox, draw=VQBlue!75!black, fill=VQBlue!12, text=VQDark}, vqpurple/.style = {vqbox, draw=VQPurple!75!black, fill=VQPurple!10, text=VQDark}, vqorange/.style = {vqbox, draw=VQOrange!80!black, fill=VQOrange!14, text=VQDark}, vqgreen/.style = {vqbox, draw=VQGreen!75!black, fill=VQGreen!14, text=VQDark}, vqred/.style = {vqbox, draw=VQRed!80!black, fill=VQRed!12, text=VQDark}, vqdecision/.style= {diamond, aspect=1.7, draw=VQOrange!80!black, fill=VQOrange!14, align=center, inner sep=1pt, line width=0.5pt, text=VQDark}, vqarr/.style = {-{Latex[length=2mm,width=1.6mm]}, line width=0.6pt, draw=VQInk!75}, vqdarr/.style = {{Latex[length=2mm,width=1.6mm]}-{Latex[length=2mm,width=1.6mm]}, line width=0.6pt, draw=VQInk!75}, vqflow/.style = {-{Latex[length=2.2mm,width=1.8mm]}, line width=1.1pt, draw=VQTeal!80!black}, vqdash/.style = {-{Latex[length=2mm,width=1.6mm]}, line width=0.55pt, draw=VQInk!60, dashed}, vqband/.style = {rounded corners=5pt, draw=none, line width=0pt}, vqtag/.style = {rectangle, rounded corners=2pt, inner sep=2pt, font=\vqtiny, fill=white, draw=black!25} } % ============================================================================ % METADATA % ============================================================================ \newcommand{\WPnumber}{13} \newcommand{\WPtitle}{VQuant: An Agentic Large Language Model Architecture for Automated Quantitative Financial Analysis and Document Generation} \newcommand{\WPsubtitle}{Reasoning-Augmented Tool Orchestration, In-Loop Numerical Computation, and Multi-Format Reporting} \newcommand{\WPdate}{June 2026} \newcommand{\WPversion}{1.0} \newcommand{\WPabstract}{% Large language models (LLMs) have shown remarkable fluency in financial discourse, yet conversational fluency alone does not guarantee numerically rigorous, reproducible, or citable analysis. This paper presents \textbf{VQuant}, a production-grade web platform that couples a reasoning-augmented LLM with a deterministic execution substrate to transform a natural-language request into a complete quantitative financial report. We document the system's methodology and its principal innovations: (i)~an \emph{agentic orchestration loop} that exposes more than two hundred financial and analytical tools---spanning over 265 market-data endpoints, four web-research services, and an arbitrary-code Python sandbox of seventeen scientific libraries---to the model through a constrained function-calling protocol; (ii)~a \emph{context-management algorithm} that preserves conversational coherence over effectively unbounded histories via adaptive summarization under a token budget; (iii)~a \emph{single-call computation paradigm} that consolidates data acquisition, numerical estimation, and figure rendering into one sandboxed Python execution, collapsing what would otherwise be several model round trips into one; and (iv)~a \emph{unified document pipeline} that emits publication-ready PDF, DOCX, \LaTeX{}~Beamer slide decks, and spreadsheet workbooks with live formulas from a single Markdown artifact. We describe each mechanism as it is implemented---the streaming Server-Sent-Event protocol and its eight-way event dispatch, the recursive tool-calling loop and its tool-use/tool-result invariant, the batched-execution throttle, the two-stage context-management machinery, the token-accounting correction, and the inter-process sandbox that exec's model-authored code and captures its figures---so that the design can be reproduced. The classical quantitative methods the platform automates are conventional and relegated to an appendix; our contribution is the \emph{architecture} that makes them accessible through natural language while preserving reproducibility. We argue that VQuant illustrates a reusable design pattern in which the language model is positioned as a planner and synthesizer rather than as a calculator, with all numerical work delegated to auditable, deterministic code. } \newcommand{\WPkeywords}{Large language models, agentic systems, tool use, quantitative finance, automated reporting, retrieval-augmented generation, financial NLP} \newcommand{\WPjel}{C45, C63, C88, G17} % --- Author --- \newcommand{\WPauthor}{Simon-Pierre Boucher} \newcommand{\WPaffiliation}{% Département des sciences administratives\\ Université du Québec en Outaouais% } \newcommand{\WPemail}{simon-pierre.boucher@uqo.ca} \newcommand{\WPaddress}{% Gatineau -- Pavillon Alexandre-Taché\\ 283, boulevard Alexandre-Taché\\ Gatineau, Québec, Canada J9A 1L8% } % ============================================================================ % DOCUMENT % ============================================================================ \begin{document} % --- Title Page --- \input{sections/titlepage} % --- Main Body --- \input{sections/introduction} \input{sections/literature} \input{sections/data} \input{sections/methodology} \input{sections/results} \input{sections/robustness} \input{sections/conclusion} % --- References --- \newpage \bibliography{references} % --- Appendix --- \input{appendix/appendix} \end{document}