TeX 93.9%
Python 6%
1% ============================================================================2% UQO Working Paper — Economics / Finance3% VQuant: An Agentic LLM Architecture for Quantitative Financial Analysis4% ============================================================================5\documentclass[12pt,letterpaper]{article}67% --- Encoding & Language ---8\usepackage[utf8]{inputenc}9\usepackage[T1]{fontenc}10\usepackage[english]{babel}1112% --- Page Layout ---13\usepackage[14 letterpaper,15 top=1in,16 bottom=1in,17 left=1in,18 right=1in19]{geometry}2021% --- Typography ---22\usepackage{mathptmx} % Times-like font (text + math)23\usepackage{microtype} % Improved typographic refinements24\usepackage{setspace}25\onehalfspacing % 1.5 line spacing2627% --- Math ---28\usepackage{amsmath,amssymb,amsthm}2930% --- Algorithms ---31\usepackage{algorithm}32\usepackage{algpseudocode}3334% --- Code Listings ---35\usepackage{listings}36\lstset{37 basicstyle=\ttfamily\footnotesize,38 breaklines=true,39 columns=fullflexible,40 keepspaces=true,41 frame=single,42 rulecolor=\color{black!30},43 backgroundcolor=\color{black!3},44 showstringspaces=false,45 captionpos=b46}4748% --- Tables ---49\usepackage{booktabs}50\usepackage{tabularx}51\usepackage{multirow}52\usepackage{threeparttable}53\usepackage{siunitx}54\sisetup{55 input-symbols = {()},56 table-format = -1.3,57 parse-numbers = false58}5960% --- Figures & Diagrams ---61\usepackage{graphicx}62\usepackage{subcaption}63\usepackage{float}64\usepackage{tikz}65\usetikzlibrary{arrows.meta,positioning,shapes.geometric,shapes.misc,fit,backgrounds,calc,shadows,decorations.pathreplacing}6667% --- Colors & Links ---68\usepackage[dvipsnames]{xcolor}69\usepackage[70 colorlinks = true,71 linkcolor = NavyBlue,72 citecolor = NavyBlue,73 urlcolor = NavyBlue,74 breaklinks = true,75 pdftitle = {VQuant: An Agentic Large Language Model Architecture for Automated Quantitative Financial Analysis and Document Generation},76 pdfauthor = {Simon-Pierre Boucher}77]{hyperref}7879% --- Bibliography ---80\usepackage[authoryear,round,semicolon]{natbib}81\bibliographystyle{aer}8283% --- Captions ---84\usepackage[85 font = small,86 labelfont = bf,87 labelsep = period,88 justification = justified,89 singlelinecheck = false90]{caption}9192% --- Headers & Footers ---93\usepackage{fancyhdr}94\pagestyle{fancy}95\fancyhf{}96\renewcommand{\headrulewidth}{0pt}97\fancyfoot[C]{\thepage}9899% --- Section Formatting ---100\usepackage{titlesec}101\titleformat{\section}{\large\bfseries}{\thesection.}{0.5em}{}102\titleformat{\subsection}{\normalsize\bfseries}{\thesubsection.}{0.5em}{}103\titleformat{\subsubsection}{\normalsize\itshape}{\thesubsubsection.}{0.5em}{}104105% --- Appendix Support ---106\usepackage[toc,page]{appendix}107108% --- Misc ---109\usepackage{enumitem}110\setlist{nosep,leftmargin=*}111112% --- Custom colors (VQuant palette) ---113\definecolor{VQTeal}{HTML}{119993}114\definecolor{VQBlue}{HTML}{2072B2}115\definecolor{VQPurple}{HTML}{652E89}116\definecolor{VQOrange}{HTML}{F49422}117\definecolor{VQGreen}{HTML}{4Fa64B}118\definecolor{VQRed}{HTML}{EF632B}119\definecolor{VQDark}{HTML}{2B2D42}120\definecolor{VQInk}{HTML}{32353F}121122% --- Font macros used inside diagram node text ---123\newcommand{\vqsmall}{\scriptsize}124\newcommand{\vqtiny}{\fontsize{6.4}{7.5}\selectfont}125126% --- Shared TikZ styles for all diagrams ---127\tikzset{128 vqfont/.style = {font=\footnotesize},129 vqsmall/.style = {font=\scriptsize},130 vqtiny/.style = {font=\fontsize{6.4}{7.5}\selectfont},131 vqbox/.style = {rectangle, rounded corners=3pt, draw=black!45, line width=0.5pt,132 align=center, inner sep=4.5pt, minimum height=0.78cm, fill=white,133 drop shadow={shadow xshift=0.6pt, shadow yshift=-0.6pt, opacity=0.18}},134 vqteal/.style = {vqbox, draw=VQTeal!75!black, fill=VQTeal!12, text=VQDark},135 vqblue/.style = {vqbox, draw=VQBlue!75!black, fill=VQBlue!12, text=VQDark},136 vqpurple/.style = {vqbox, draw=VQPurple!75!black, fill=VQPurple!10, text=VQDark},137 vqorange/.style = {vqbox, draw=VQOrange!80!black, fill=VQOrange!14, text=VQDark},138 vqgreen/.style = {vqbox, draw=VQGreen!75!black, fill=VQGreen!14, text=VQDark},139 vqred/.style = {vqbox, draw=VQRed!80!black, fill=VQRed!12, text=VQDark},140 vqdecision/.style= {diamond, aspect=1.7, draw=VQOrange!80!black, fill=VQOrange!14,141 align=center, inner sep=1pt, line width=0.5pt, text=VQDark},142 vqarr/.style = {-{Latex[length=2mm,width=1.6mm]}, line width=0.6pt, draw=VQInk!75},143 vqdarr/.style = {{Latex[length=2mm,width=1.6mm]}-{Latex[length=2mm,width=1.6mm]},144 line width=0.6pt, draw=VQInk!75},145 vqflow/.style = {-{Latex[length=2.2mm,width=1.8mm]}, line width=1.1pt, draw=VQTeal!80!black},146 vqdash/.style = {-{Latex[length=2mm,width=1.6mm]}, line width=0.55pt, draw=VQInk!60, dashed},147 vqband/.style = {rounded corners=5pt, draw=none, line width=0pt},148 vqtag/.style = {rectangle, rounded corners=2pt, inner sep=2pt, font=\vqtiny,149 fill=white, draw=black!25}150}151152% ============================================================================153% METADATA154% ============================================================================155\newcommand{\WPnumber}{13}156\newcommand{\WPtitle}{VQuant: An Agentic Large Language Model Architecture for Automated Quantitative Financial Analysis and Document Generation}157\newcommand{\WPsubtitle}{Reasoning-Augmented Tool Orchestration, In-Loop Numerical Computation, and Multi-Format Reporting}158\newcommand{\WPdate}{June 2026}159\newcommand{\WPversion}{1.0}160\newcommand{\WPabstract}{%161 Large language models (LLMs) have shown remarkable fluency in financial discourse, yet162 conversational fluency alone does not guarantee numerically rigorous, reproducible, or163 citable analysis. This paper presents \textbf{VQuant}, a production-grade web platform that164 couples a reasoning-augmented LLM with a deterministic execution substrate to transform a165 natural-language request into a complete quantitative financial report. We document the166 system's methodology and its principal innovations: (i)~an \emph{agentic orchestration loop}167 that exposes more than two hundred financial and analytical tools---spanning over 265168 market-data endpoints, four web-research services, and an arbitrary-code Python sandbox of169 seventeen scientific libraries---to the model through a constrained function-calling protocol;170 (ii)~a \emph{context-management algorithm} that preserves conversational coherence over171 effectively unbounded histories via adaptive summarization under a token budget;172 (iii)~a \emph{single-call computation paradigm} that consolidates data acquisition, numerical173 estimation, and figure rendering into one sandboxed Python execution, collapsing what would174 otherwise be several model round trips into one; and (iv)~a \emph{unified document pipeline}175 that emits publication-ready PDF, DOCX, \LaTeX{}~Beamer slide decks, and spreadsheet workbooks176 with live formulas from a single Markdown artifact. We describe each mechanism as it is177 implemented---the streaming Server-Sent-Event protocol and its eight-way event dispatch, the178 recursive tool-calling loop and its tool-use/tool-result invariant, the batched-execution179 throttle, the two-stage context-management machinery, the token-accounting correction, and the180 inter-process sandbox that exec's model-authored code and captures its figures---so that the181 design can be reproduced. The classical quantitative methods the platform automates are182 conventional and relegated to an appendix; our contribution is the \emph{architecture} that183 makes them accessible through natural language while preserving reproducibility. We argue that184 VQuant illustrates a reusable design pattern in which the language model is positioned as a185 planner and synthesizer rather than as a calculator, with all numerical work delegated to186 auditable, deterministic code.187}188\newcommand{\WPkeywords}{Large language models, agentic systems, tool use, quantitative finance, automated reporting, retrieval-augmented generation, financial NLP}189\newcommand{\WPjel}{C45, C63, C88, G17}190191% --- Author ---192\newcommand{\WPauthor}{Simon-Pierre Boucher}193\newcommand{\WPaffiliation}{%194 Département des sciences administratives\\195 Université du Québec en Outaouais%196}197\newcommand{\WPemail}{simon-pierre.boucher@uqo.ca}198\newcommand{\WPaddress}{%199 Gatineau -- Pavillon Alexandre-Taché\\200 283, boulevard Alexandre-Taché\\201 Gatineau, Québec, Canada J9A 1L8%202}203204% ============================================================================205% DOCUMENT206% ============================================================================207\begin{document}208209% --- Title Page ---210\input{sections/titlepage}211212% --- Main Body ---213\input{sections/introduction}214\input{sections/literature}215\input{sections/data}216\input{sections/methodology}217\input{sections/results}218\input{sections/robustness}219\input{sections/conclusion}220221% --- References ---222\newpage223\bibliography{references}224225% --- Appendix ---226\input{appendix/appendix}227228\end{document}229