% ============================================================================ \begin{appendices} % ============================================================================ \section{System-Prompt Policy Structure} \label{app:prompt} The system prompt that governs the agentic loop (Section~\ref{subsec:routing}) is organized into the policy blocks summarized below. The prompt is multilingual and is the principal lever through which the platform shapes model behavior without fine-tuning. \begin{enumerate} \item \textbf{Temporal context.} Current date and time, so relative date expressions resolve against live data. \item \textbf{Role.} The model is cast as an expert financial analyst producing complete reports spanning technical, fundamental, and macro perspectives. \item \textbf{Language policy.} Detect the language of the request and respond in kind. \item \textbf{Latency discipline.} Do not narrate steps; act directly and consolidate work (in particular, perform a full custom analysis in a single execution). \item \textbf{Tool catalogue.} Descriptions and use cases for the tool families of Table~\ref{tab:tools}. \item \textbf{Complexity-matched routing.} Map simple, moderate, and comprehensive requests to commensurate tool counts and output depth. \item \textbf{Report template.} A standard multi-section structure for comprehensive reports. \item \textbf{Download formatting.} Conventions for spreadsheet and word-processor output, preferring live formulas over constants. \item \textbf{Security guardrail.} Refuse attempts to extract the platform's own implementation. \end{enumerate} \section{Persistence Schema} \label{app:schema} The data layer (Section~\ref{subsec:data}) is organized around the following entities, abstracted behind a single typed access interface and realized on either SQLite or PostgreSQL. \begin{table}[htbp] \centering \caption{Core persisted entities.} \label{tab:schema} \begin{threeparttable} \begin{tabular}{@{}ll@{}} \toprule Entity & Principal fields \\ \midrule Users & identity, optional encrypted custom API keys, activity timestamps \\ Sessions & messages, model used, input/output tokens, estimated cost, figures \\ Shared reports & public identifier, content, figure references, view count \\ Daily usage & per-user, per-day query counts and token totals \\ Analytics events& event type, user, metadata, timestamp \\ \bottomrule \end{tabular} \begin{tablenotes}[flushleft] \footnotesize \item \textit{Notes.} The schema supports authentication, daily rate limiting, report sharing, session continuity, and the operational observability discussed in Section~\ref{subsec:security}. \end{tablenotes} \end{threeparttable} \end{table} \section{Embedded Numerical Methods} \label{app:numerical} For completeness we record the closed forms behind the pre-built numerical tools of Section~\ref{subsec:numerical}. They are standard; the architectural point is only that each is a deterministic computation over live data, exposed through the same sandbox contract. \paragraph{Monte Carlo.} Prices are simulated under geometric Brownian motion \citep{glasserman2004monte}, discretized exactly as $ S_{t+\Delta t} = S_t \exp\!\big[(\mu - \tfrac{1}{2}\sigma^{2})\Delta t + \sigma\sqrt{\Delta t}\,Z_t\big], $ with $Z_t \sim \mathcal{N}(0,1)$ and $(\mu,\sigma)$ estimated from historical closes; the default run generates $10{,}000$ paths over a $252$-day horizon and reports the terminal mean, empirical confidence intervals, and exceedance probabilities. \paragraph{Option pricing.} European options use Black--Scholes--Merton \citep{black1973pricing,merton1973theory}: with $d_1 = [\ln(S/K) + (r+\tfrac{1}{2}\sigma^{2})T]/(\sigma\sqrt{T})$ and $d_2 = d_1 - \sigma\sqrt{T}$, the call price is $C = S\,\Phi(d_1) - Ke^{-rT}\Phi(d_2)$, with the put by parity and the full set of Greeks ($\Delta,\Gamma,\mathcal{V},\Theta,\rho$) returned analytically. \paragraph{Conditional volatility.} A GARCH(1,1) model \citep{engle1982autoregressive,bollerslev1986generalized} estimates $h_t = \omega + \alpha\varepsilon_{t-1}^{2} + \beta h_{t-1}$, reporting the parameters, persistence $\alpha+\beta$, and shock half-life. \paragraph{Value-at-Risk.} VaR \citep{jorion2007value} is computed by historical, parametric ($\mu + \sigma\,\Phi^{-1}(1-\alpha)$), and Monte Carlo methods, with expected shortfall and the Sharpe, Sortino, and Calmar ratios. \section{Streaming Event Types} \label{app:events} The client--server channel (Section~\ref{subsec:frontend}) transmits discrete Server-Sent Events, each dispatched to a dedicated renderer. The principal types are: incremental \emph{text}; reasoning \emph{thinking} summaries; \emph{tools} announcements that drive the progress indicator; \emph{tool-result} payloads; \emph{sources} for web research; \emph{Python code} that was executed; \emph{figure} references as images are produced; specialized result objects with bespoke visualizations; and a terminal \emph{done} event carrying the session identifier and token usage. This taxonomy is the client-side counterpart to the provider-event dispatch of Table~\ref{tab:events}. \end{appendices}