ALFFLLM·FINANCE

The List / Agents and Multi-Agent Systems / paper

To Trade or Not to Trade: An Agentic Approach to Estimating Market Risk Improves Trading Decisions

D. Emmanoulopoulos; Ollie Olby; Justin Lyon; Namid R Stillman

Abstract

Large language models (LLMs) are increasingly deployed in agentic frameworks, in which prompts trigger complex tool-based analysis in pursuit of a goal. While these frameworks have shown promise across multiple domains including in finance, they typically lack a principled model-building step, relying instead on sentiment- or trend-based analysis. We address this gap by developing an agentic system that uses LLMs to iteratively discover stochastic differential equations for financial time series. These models generate risk metrics which inform daily trading decisions. We evaluate our system in both traditional backtests and using a market simulator, which introduces synthetic but causally plausible price paths and news events. We find that model-informed trading strategies outperform standard LLM-based agents, improving Sharpe ratios across multiple equities. Our results show that combining LLMs with agentic model discovery enhances market risk estimation and enables more profitable trading decisions.

In one sentence

The paper develops an agentic framework where LLMs iteratively discover stochastic differential equations to estimate market risk, demonstrating that model-informed trading decisions significantly outperform standard sentiment-based LLM agents in both historical backtests and synthetic market simulations.

Summary

The research addresses the gap in agentic finance frameworks that typically rely on sentiment or trend analysis by introducing a principled model-building step. The authors propose an agentic system where Large Language Models (LLMs) act as 'risk analysts' to iteratively discover Stochastic Differential Equations (SDEs) that best fit historical financial time series. This process uses a builder-critic loop, where builder agents implement and calibrate SDEs using gradient descent, and critic agents evaluate them based on statistical moments, tail metrics, and symbolic similarity. The discovered SDEs generate risk metrics such as Value-at-Risk (VaR), Conditional VaR (CVaR), and Maximum Drawdown (MDD), which are then passed to a 'trader agent' alongside news sentiment to make daily buy, sell, or hold decisions. This approach aims to enhance market risk estimation by combining LLM reasoning with rigorous mathematical modeling, moving beyond simple pattern recognition to explicit stochastic process discovery. The experimental evaluation covers multiple equities, using historical price data to train and calibrate the SDE models. The system employs a monthly model discovery cycle, recalibrating the best-performing SDE daily using the most recent 100 trading days of data. Risk metrics are calculated via Monte Carlo simulations from the calibrated SDEs, supplemented by Extreme Value Theory (EVT) for tail risk estimation. The trading strategy is tested using traditional backtesting on historical data and an intelligent backtesting environment called Simudyne Horizon, which generates causally plausible synthetic price paths and news events to test robustness against out-of-distribution scenarios. The study compares the performance of the model-informed agent against baseline LLM agents that rely solely on news sentiment and technical indicators like the Relative Strength Index (RSI). The evaluation metrics include Sharpe ratios, trading returns, and the accuracy of risk metric estimation. Results indicate that the model-informed trading strategies significantly outperform standard LLM-based agents, achieving higher Sharpe ratios across multiple equities. The integration of SDE-derived risk metrics provides a more robust foundation for trading decisions, particularly in identifying tail risks that sentiment analysis might miss. The use of synthetic data from Simudyne Horizon confirms that the improvements are not merely artifacts of training data bias but reflect genuine improvements in risk-aware decision-making. However, the study notes limitations, including the computational cost of the agentic loop and the potential for LLMs to struggle with out-of-distribution events that contradict their training data. The authors suggest that while the framework is promising, it currently requires human supervision for model validation and may benefit from more advanced memory structures to handle long-term dependencies in market dynamics.

Research problem

Current LLM-based agentic frameworks in finance often lack a principled model-building step, relying instead on sentiment or trend-based analysis. This paper addresses the problem of how to integrate rigorous mathematical modeling of financial time series into agentic workflows to improve risk estimation and trading decisions. Specifically, it investigates whether LLMs can effectively discover and calibrate Stochastic Differential Equations (SDEs) to model market dynamics and how these model-informed risk metrics can enhance trading agent performance compared to standard sentiment-based approaches.

Core contributions

  • Development of an agentic framework for automated discovery of Stochastic Differential Equations (SDEs) using a builder-critic loop.
  • Integration of LLM-discovered SDEs into a trading pipeline to generate model-informed risk metrics (VaR, CVaR, MDD).
  • Introduction of a symbolic similarity score to quantify the structural accuracy of discovered SDEs against known financial models.
  • Evaluation of the framework using both traditional backtesting and a novel synthetic market simulator (Simudyne Horizon) for robustness testing.
  • Demonstration that model-informed risk analysis significantly improves trading performance (Sharpe ratios) over sentiment-only LLM agents.

Method

  • Agentic builder-critic loop for SDE discovery: Builder implements/calibrates SDEs; Critic evaluates using statistical moments and symbolic similarity.
  • SDE calibration using gradient descent with diffrax and optax packages.
  • Risk metric calculation (VaR, CVaR, MDD) via Monte Carlo simulations from calibrated SDEs.
  • Extreme Value Theory (EVT) applied to residuals and price paths for tail risk estimation.
  • Trader agent combines risk metrics, trend indicators (RSI, Drift Polarity), and news sentiment for trading decisions.
  • Symbolic similarity score using Weisfeiler-Lehman graph hash to compare discovered SDEs with known models.

Results & findings

  • Model-informed trading strategies outperform standard LLM-based agents in terms of Sharpe ratios across multiple equities.
  • LLMs are capable of discovering SDEs that accurately reproduce statistical features of historical price paths.
  • The builder-critic agentic loop effectively refines SDE models through iterative calibration and evaluation.
  • Synthetic data testing confirms that performance gains are robust and not solely due to training data bias.
  • Risk metrics derived from SDEs provide more nuanced risk assessment than sentiment-based approaches.
  • The framework demonstrates the potential for semi-automated financial model discovery using LLMs.

Data & experiments

  • Historical equity price data used for calibrating SDEs and backtesting trading strategies.
  • Simudyne Horizon synthetic market simulator providing causally plausible price paths and news events for out-of-distribution testing.
  • Comparison of model-informed agents against baseline LLM agents using only news sentiment and technical indicators (RSI).
  • Evaluation metrics include Sharpe ratios, trading returns, and risk metric accuracy (VaR, CVaR, MDD).
  • Monthly model discovery cycles with daily recalibration of the best-performing SDE.

Limitations & caveats

  • Computational cost of the agentic loop is significant, requiring ~1,100 GPU hours for calibration and simulation.
  • Model discovery is performed monthly, which may not capture rapid changes in market dynamics.
  • LLMs may struggle with out-of-distribution events that contradict their training data, despite synthetic testing.
  • The framework assumes independence of excess losses in EVT, which may not hold in real financial time series.
  • Current implementation requires human supervision for model validation and may not be fully autonomous.
  • Evaluation is limited to equities; applicability to other asset classes is not fully explored.

Curator notes

Discovery status: trading_agent_focus_promoted. Source links: FinMem: A Performance-Enhanced Large Language Model Trading Agent with Layered Memory and Character Design