Paper deep dive
From Natural Language to Executable Option Strategies via Large Language Models
Haochen Luo, Zhengzhao Lai, Junjie Xu, Yifan Li, Tang Pok Hin, Yuan Zhang, Chen Liu
Intelligence
Status: succeeded | Model: google/gemini-3.1-flash-lite-preview | Prompt: intel-v1 | Confidence: 94%
Last extracted: 3/22/2026, 5:42:01 AM
Summary
The paper introduces the Option Query Language (OQL), a domain-specific intermediate representation designed to bridge the gap between natural language trading intents and executable option strategies. By treating LLMs as semantic parsers that generate structured OQL queries, the framework avoids the pitfalls of direct code generation, such as hallucinations and context limits. The system uses a neuro-symbolic pipeline where OQL queries are validated and executed by a deterministic engine, significantly improving execution accuracy and logical consistency in financial derivative trading.
Entities (4)
Relation Signals (3)
OQL → executedby → OQL Engine
confidence 95% · OQL queries are then validated and executed deterministically by an engine to instantiate executable strategies.
LLMs → translatesto → OQL
confidence 95% · our framework treats the LLM as a semantic parser that converts natural language queries into concise, syntactically constrained OQL instructions.
OQL Engine → processes → Option Chain
confidence 90% · These instructions are then deterministically executed by a dedicated compiler over the option chain.
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Large Language Models (LLMs) excel at general code generation, yet translating natural-language trading intents into correct option strategies remains challenging. Real-world option design requires reasoning over massive, multi-dimensional option chain data with strict constraints, which often overwhelms direct generation methods. We introduce the Option Query Language (OQL), a domain-specific intermediate representation that abstracts option markets into high-level primitives under grammatical rules, enabling LLMs to function as reliable semantic parsers rather than free-form programmers. OQL queries are then validated and executed deterministically by an engine to instantiate executable strategies. We also present a new dataset for this task and demonstrate that our neuro-symbolic pipeline significantly improves execution accuracy and logical consistency over direct baselines.
Tags
Links
- Source: https://arxiv.org/abs/2603.16434v1
- Canonical: https://arxiv.org/abs/2603.16434v1
Trouble viewing inline? Open PDF directly →
Full Text
89,455 characters extracted from source content.
Expand or collapse full text
FROM NATURAL LANGUAGE TO EXECUTABLE OPTION STRATEGIES VIA LARGE LANGUAGE MODELS Haochen Luo 1 , Zhengzhao Lai 2 , Junjie Xu 4 , Yifan Li 1 , Tang Pok Hin 1 , Yuan Zhang 3 , Chen Liu 1∗ 1 City University of Hong Kong 2 The Chinese University of Hong Kong (Shenzhen) 3 Shanghai University of Finance and Economics 4 University of Science and Technology of China ABSTRACT Large Language Models (LLMs) excel at general code generation, yet translating natural-language trading intents into correct option strategies remains challenging. Real-world option design requires reasoning over massive, multi-dimensional option chain data with strict constraints, which often overwhelms direct generation methods. We introduce the Option Query Language (OQL), a domain-specific intermediate representation that abstracts option markets into high-level primitives under grammatical rules, enabling LLMs to function as reliable semantic parsers rather than free-form programmers. OQL queries are then validated and executed deterministically by an engine to instantiate executable strategies. We also present a new dataset for this task and demonstrate that our neuro-symbolic pipeline significantly improves execution accuracy and logical consistency over direct baselines. 1INTRODUCTION In recent years, Large Language Models (LLMs) have demonstrated remarkable capabilities in the financial domain. While extensive research has focused on equity markets, including stock price prediction (Chen & Kawashima, 2024; Koa et al., 2024), alpha mining (Tang et al., 2025; Wang et al., 2025; Shi et al., 2025b; Luo et al., 2026), financial news sentiment analysis and trading (Araci, 2019; Liu et al., 2025; Xiao et al., 2025), the application of LLMs to financial derivatives, particularly options, remains largely unexplored. Options are fundamental financial instruments, essential for both speculative leverage and sophisticated risk management (Vine, 2011). Existing studies on machine learning in this field mainly focus on option pricing (Culkin & Das, 2017; De Spiegeleer et al., 2018; Ivas , cu, 2021; Zalani, 2025) and hedging (Ba ́ nka & Chudziak, 2025). By contrast, designing and executing option trading strategies has been considered the exclusive domain of quantitative analysts using rigid, programmatic trading systems. In this context, the customers provide the investment goals in Natural Language (NL) (e.g., "Find a delta-neutral Iron Condor on SPY with low implied volatility rank") and the quantitative analysts use their expertise to come up with trading strategies. The rapid development of intelligent trading systems, especially with the adoption of LLMs, enables the translation of vague natural language intents into rigorous and structured trading logic, which is a key step toward automated option trading. However, this translation remains challenging. First, traditional Natural Language Understanding models are too limited to interpret complex financial concepts such as “Delta-neutral” or “Volatility Skew.” Second, although modern LLMs possess strong domain knowledge, directly applying them to raw option chain data is impractical. Option chains contain thousands of contracts across strikes and expiries, resulting in high-dimensional inputs that exceed LLM context limits or incur high computational costs. Moreover, direct text-to-code generation often leads to hallucinations (Agarwal et al., 2024), such as producing invalid tickers or violating strict constraints, which is unacceptable in high-stakes financial settings. To bridge this gap, we propose the Option Query Language (OQL), a domain-specific intermediate representation for reliable interaction between LLMs and option markets. Instead of requiring LLMs to process massive raw data or generate error-prone Python or SQL code, our framework treats ∗ Corresponding author: chen.liu@cityu.edu.hk 1 arXiv:2603.16434v1 [cs.AI] 17 Mar 2026 the LLM as a semantic parser that converts natural language queries into concise, syntactically constrained OQL instructions. These instructions are then deterministically executed by a dedicated compiler over the option chain. This neuro-symbolic design reduces context explosion by abstracting market data into high-level primitives and ensures logical validity through grammatical constraints. To the best of our knowledge, this work is the first systematic effort to enable Natural Language→ Option Strategy translation using LLMs. Our main contributions are as follows: (1) We introduce OQL, a domain-specific query language that encodes complex derivatives logic (e.g., Greeks, multi-leg structures, and expiry/strike relations) into a token-efficient yet execution-rigorous format, allowing LLMs to generate reliable option strategies. (2) We present the first benchmark for this task, including a dataset of 200 diverse option trading instructions and an evaluation suite that enables fair comparison across LLMs and baseline methods. (3) We extend the Text-to-SQL paradigm to a financial setting by designing a customized, SQL-like language for option strategy search, demonstrating that structured querying substantially improves reliability and end-to-end performance. 2RELATED WORK 2.1LLMS IN FINANCE The application of Large Language Models (LLMs) in finance has evolved rapidly from textual analysis to more agentic decision-making. Early works primarily relied on Pre-trained Language Models, such as FinBERT, for sentiment analysis on financial texts (Liu et al., 2021). With the advent of generative models, research attention shifted toward finance-specific foundation models, including BloombergGPT (Wu et al., 2023) and FinGPT (Liu et al., 2023), enabling more complicated reasoning over financial data. Building on these models, a growing number of work explores LLMs for market prediction and various trading tasks. One major application is price and return prediction by incorporating textual information such as financial news (Chen & Kawashima, 2024; Guo & Hauptmann, 2024; Wang et al., 2024; Koa et al., 2024). Related studies further investigate the capability of LLMs in searching and discovering trading signals, particularly alpha factors (Li et al., 2024; Shi et al., 2025b; Luo et al., 2025). More recently, several works have proposed autonomous trading agents that use LLMs as “traders” to rebalance portfolios based on market sentiment and reasoning (Yu et al., 2024; YANG et al., 2025; Yu et al., 2025; Li et al., 2025b). To evaluate these capabilities, a number of benchmarks and datasets have been introduced, covering general financial knowledge (Xie et al., 2023; 2024; Nie et al., 2025), numerical reasoning (Chen et al., 2021), trading ability (Li et al., 2025b), signal mining (Anonymous, 2025), and more complex financial tasks (Zhang et al., 2025). However, most existing methods and benchmarks focus on equities. In contrast, the LLM’s capability in both strategy design and evaluation to deal with trading financial derivatives, particularly options, remains largely underexplored. 2.2LLMS FOR TEXT-TO-QUERY GENERATION Translating natural-language user intent into executable query logic is commonly formulated as a semantic parsing problem, with Text-to-SQL as a representative task. Benefiting from strong code- generation capabilities, LLMs have achieved strong performance in this setting, as shown by recent benchmarks across diverse domains (Hong et al., 2025; Lee et al., 2022; Gao et al., 2023; Zhang et al., 2024). Beyond standard SQL, recent studies further extend LLM-based query generation to specialized tasks, including query optimization (Tan et al., 2025) and edited or augmented SQL-like grammars for domain-specific logic such as multi-model query (Shi et al., 2025a), motivating our OQL framework for option strategy querying. 3PRELIMINARIES 3.1PROPERTIES OF OPTION PRODUCT An option 1 is a derivative contract that grants the holder the right, but not the obligation, to buy or sell an underlying asset at a predetermined price (the strike price) on or before a specific date 1 We consider American options in this work. The European options may only be exercised on expiry, our proposed method can deal with them in a similar way. 2 (the expiration date). These contracts are categorized as calls (the right to buy) or puts (the right to sell)The market price of an option reflects the market’s expectation of future volatility, the risk and the reward profile associated with the underlying asset. Trading Action Space. In option trading, the fundamental action space includes buy or sell decisions for both call and put options with different strikes and maturities. A single trading strategy can be expressed as a combination of such elementary actions: a t =(d i ,s i ,K i ,T i ,q i ,p i ) N i=1 ,(1) whered i ∈+1,−1denotes the trade direction (+1for buying and−1for selling),s i ∈call, put the option type,K i the strike price,T i the expiry time,q i the trading quantity andp i the option premium (i.e., the price paid or received when open position). The reward or payoff at maturity depends on the realized price S T of the underlying asset. Option Pricing Model. The theoretical value of an option is commonly derived from stochastic models of the underlying asset price. The classical Black–Scholes–Merton (BSM) Black & Scholes (1973) model assumes that the priceS t of a non-dividend paying underlying asset at timetfollows a geometric Brownian motiondS t = μS t dt + σS t dW t ,whereμis the drift,σis the volatility, and W t denotes a Wiener process. Under risk-neutral valuation, the price of European call (C) and put (P) options areC = S t N (d + )− Ke −r(T−t) N (d − )andP = Ke −r(T−t) N (−d − )− S t N (−d + ) respectively, where V ∈C,P denotes a generic option price and: d + = ln S t K + (r + 1 2 σ 2 )(T − t) σ √ T − t , d − = d + − σ √ T − t.(2) Table 1: Key option Greeks and their definitions GreekDefinition DeltaSensitivity of option price to changes in the un- derlying price, ∆ = ∂V ∂S . GammaRate of change of Delta, Γ = ∂ 2 V ∂S 2 . VegaSensitivity to volatility, ν = ∂V ∂σ . ThetaSensitivity to time decay, Θ = ∂V ∂t . Rho Sensitivity to the risk-free interest rate,ρ = ∂V ∂r . HereKis the strike,Tis the expiry date,ris the risk-free rate andN (·)is the standard Gaussian cumulative dis- tribution function (CDF). The sensitivi- ties ofVto these underlying factors are captured by the Greeks in Table 1. Be- cause future realized volatility is unob- servable, true Vega cannot be measured directly. In practice, option pricing re- lies on implied volatility (IV), inferred from market prices using pricing mod- els Hull & Basu (2016). This creates a gap between theory and real-world execution, complicating robust option strategy design. 3.2OPTION STRATEGY AND PAYOFF The terminal payoff of a single option(d i ,s i ,K i ,T i ,q i ,p i )as defined in (1) is calculated by the equations below where S T is the underlying price at maturity T . P i (S T ) = ( max(S T − K i , 0), s i = call, max(K i − S T , 0), s i = put. Therefore, the total return of the strategy as defined in (1) is the sum over legs subtracting the option premium:Π(S T ) = P N i=1 q i d i P i (S T )− p i . An option strategy is a multi-leg position formed by combining several call/put contracts on the same (or closely related) underlying assets, to achieve a target trading intent such as hedging, directional exposure, volatility trading, or income generation. Figure 1 summarizes our strategy universe as a hierarchical taxonomy grouped by three high-level intents: Directional, Volatility, and Income & Hedging Hull & Basu (2016). It also reflects structural complexity via the number of legs, ranging from single-leg positions to common spreads and multi-leg structures (e.g., butterflies and condors). The full list is provided in Appendix A. 3.3REPRESENTATION OF OPTION CHAIN In practical trading and modeling, option information is represented in a tabular option chain containing discrete contract-level attributes. At timet, the option chainC t represents the collection of 3 all tradable option contracts for a given underlying asset and is defined over strikes, maturities, and contract types:C t = c t (K,T,s) K ∈ K, T ∈ T , s ∈ call, put .Here,Kdenotes the strike price,Tthe time to expiry, andsthe option type. Each option contractc t (K,T,s)is associated with a set of market-observed and model-derived attributes: c t (K,T,s) = p t (K,T,s), v t (K,T,s), ∆ t (K,T,s), Γ t (K,T,s), ν t (K,T,s), Θ t (K,T,s) , (3) Option Strategy Universe Directional Strategies Bullish Long Call Bull Spread Bearish Long Put Bear Spread Volatility Strategies Long Volatility (Breakout) Straddle Strangle Short Volatility (Range-bound) Iron Condor Butterfly Income & Hedging Yield Gen Covered Call Cash-Secured Put Protection Collar Protective Put Figure 1: Taxonomy of option strategies in trading. wherep t andv t denote the option premium and trading volume, respectively, and (∆ t , Γ t ,ν t , Θ t )are the option Greeks de- fined in Table 1, computed using the Black– Scholes–Merton (BSM) model. This rep- resentation provides a structured snapshot of the market state across strike, maturity, and contract-type. Due to the combinato- rial expansion of the triplet(K,T,s), the option chain at each time step is inherently high-dimensional. This scale posing a significant challenge for direct processing by LLMs. 4METHODOLOGY We propose the Option Query Language (OQL) to bridge the gap between the complex, flexible natural language intent and the financial execution which requires precision. As illustrated in Figure 2, our system operates via a two-stage process: (1) Semantic Parsing, where an LLM translates a user’s natural language intentxinto a structured OQL queryz; and (2) Deterministic Execution, where a specialized engine validates and executeszagainst massive market data to produce the final trading strategyy. This explicit separation allows linguistic reasoning and financial constraints to be handled independently, improving robustness, interpretability, and execution reliability for complex option strategies. 4.1PROBLEM FORMULATION LetDrepresent the state space of the option market, containing real-time data for underlying assets, option chains, and derived risk metrics (the "Greeks"). The goal of option strategy search is to map a natural language instructionx(e.g., "Find a delta-neutral iron condor on NVDA...") to an executable subset of contractsy ⊂Dsatisfying specific logical constraints. Directly modeling the probabilityP(y|x,D)using a monolithic LLM is intractable due to the high dimensionality ofD and the necessity for logical precision. Consequently, we introduce OQL as a latent intermediate representation z and decompose the problem into: P(y|x,D) = X z P θ (z|x)· P φ (y|z,D)(4) Here,P θ (z|x)represents the semantic parser based on an LLM parameterized byθ, andP φ (y|z,D) is the deterministic compiler parameterized byφ. This decoupling confines the LLM’s probabilistic nature to intent parsing, while ensuring the financial execution remains verifiable and logical. 4.2OPTION QUERY LANGUAGE (OQL) OQL is a declarative domain-specific language designed to represent option strategies as structured symbolic queries. Rather than enumerating procedural steps, OQL specifies structural and quantitative constraints over strategy components. 4.2.1PRINCIPLE 1: ROLE-BASED ABSTRACTION Each feasible option strategy satisfying the user’s intents∈Sis associated with a fixed role schema R(s) =r 1 ,r 2 ,...,r k ,where each roler i corresponds to a semantically distinct leg in the strategy 4 (e.g., Short Call, Long Put for Risk Reversal). A valid strategy instanceymust satisfy a one-to-one assignment between roles and option contracts:y = (r i ,c i ) | r i ∈ R(s), c i ∈ D.This design enforces structural validity by construction and prevents semantically invalid combinations, such as assigning two calls to a straddle strategy. Moreover, role-level abstraction enables fine-grained constraint specification on individual legs. The details are shown in Table 5. 4.2.2PRINCIPLE 2: SCOPED FILTERING OQL distinguishes between constraints applied at different semantic scopes. Leg-level constraints are expressed in theWHEREclause and operate on individual option contracts prior to strategy assembly. Formally, for each roler, a candidate set is defined as:C r = c ∈ D | ψ r (c) = true, where ψ r denotes role-specific predicates (e.g., moneyness, delta, time-to-expiry). Strategy constraints are expressed in theHAVINGclause and are applied after assembling candidate strategies. These constraints operate on aggregated properties:Ψ(y) = true, whereΨmay involve net Greeks, maximum loss, or reward-to-risk ratios. 4.2.3PRINCIPLE 3: SEMANTIC SOFT-MATCHING Natural language intents often specify approximate numerical conditions. To bridge linguistic ambiguity and strict database filtering, OQL introduces an approximate matching operator∼. Given a numerical attributea(c)and a target valueτ, the conditiona(c)∼ τis interpreted as:|a(c)−τ|≤ ε·τ, whereεis a predefined tolerance. This operator relaxes hard constraints and improves robustness by reducing empty-result failures during searching. OQL Pipeline Generated OQL: SELECT IRON_CONDOR FROM SPY WHERE SC.delta ~ 0.15 -- Sell Call Wing at ~15 Delta AND SP.delta ~ -0.15 -- Sell Put Wing at ~-15 Delta AND SC.dte ~ 45 -- Target ~45 Days to Expiry AND SP.dte ~ 45 AND LC.Moneyness = OTM -- Buy Protection (Call side) AND LP.Moneyness = OTM -- Buy Protection (Put side) AND abs(NET_DELTA) < 0.1 -- Risk: Delta Neutral ORDER BY return_on_risk DESC -- Goal: Optimize Efficiency LIMIT 1 Intent: Construct a delta-neutral income strategy on SPY for the next monthly cycle (~45 days). I believe the current high volatility (IV Rank > 50) is overstated and price will stay range-bound. I want to collect premium by selling the 15 Delta wings on both sides, while buying further OTM legs to define my maximum risk. Optimize the structure for Return on Risk. Human Trader Intelligent Agent a. Trading intent from user directly b. Intent from another intelligent agent Market information Thinking Steps: # Step 1: Identify "SPY" as the target asset and apply a high-volatility filter based on the "IV Rank > 50" condition. # Step 2: Infer the "Iron Condor" strategy type by combining the user's intent to "collect premium" with the requirement for "defined risk". # Step 3: Map the "next monthly cycle" temporal constraint to a 45-day expiry target and "selling 15 Delta wings" to the short leg selection criteria. # Step 4: Translate the "delta-neutral" requirement into a strict NetDelta validation rule and set the optimization objective to "Return on Risk". Agent proposed trading agent Stage 1: Prepare intent for option strategy Stage 2: Generate OQL OQL Agent Knowledge of OQL Defination Design Grammar OQL Engine Stage 3: Execute OQL OQL QueryStrategies ... OQL Engine Option Chain Data Input Query (z) Call Leg 1 Delta = 0.52 Call Leg 2 Delta = 0.35 Put Leg 1 Delta = -0.25 Put Leg 2 Delta = -0.55 ...... ...... Leg AssemblyStrategy Filter Straddle 1 r_ratio=0.5 Straddle 2 r_ratio=1.5 Straddle 3 r_ratio=2.5 Straddle 3 r_ratio=2.5 ....... Strategy Candidates Figure 2: This figure illustrates the complete workflow of the Options Query Language (OQL) system, from intent to executable option strategies. Top: the OQL pipeline collects trading intent from human users or intelligent agents, translates high-level intent into formal OQL queries, and executes them to retrieve candidate strategies. Bottom: the deterministic OQL compilerP φ processes each query through parsing and semantic validation, vectorized filtering over option-chain data, and combinatorial leg assembly with aggregate constraints, producing a ranked set of valid option strategies. The full OQL grammar, formal definitions and backend are provided in Appendix B. 5 4.3NEURO-SYMBOLIC EXECUTION FLOW As shown in Figure 2, given an OQL queryz, the execution engine evaluates and executesP φ (y | z,D) through a fully deterministic pipeline. Conceptually, this process can be viewed as constraint parsing and resolution, followed by backend-executable query construction, where the high-level OQL specification is translated into concrete operations over option-chain data. Specifically, (1) the query is first parsed into an abstract syntax tree (AST), and structural constraints induced by the role schema R(s)are verified to ensure semantic consistency; (2) leg-level predicates are applied toDto obtain role-specific candidate setsC r , implemented via vectorized filtering over the option chain; (3) candidate strategies are constructed through Cartesian products overC r , followed by strategy-level constraint evaluation, where only strategies satisfying allHAVINGpredicates are retained; and (4) the parsed constraints are translated into executable backend queries and executed to produce the final strategy set. Implementation details are provided in Appendix B. 5EXPERIMENTS In this section, we conduct extensive experiments to address the following three research questions. RQ1: Can LLMs, under the OQL-based interaction paradigm, successfully search for executable option strategies (i.e., generate valid OQL queries that return non-empty and correct strategies)? RQ2: How capable are different Large Language Models (LLMs) at generating OQL queries, and how do they compare in terms of validity, accuracy, and generation quality? RQ3: Do option strategies derived from OQL queries provide practical value, including outperforming baselines that give LLMs raw option data directly, and how do these searched strategies perform in backtests? 5.1DATASET CONSTRUCTION. To the best of our knowledge, natural-language-to-option-strategy retrieval is a relatively new task and lacks a standardized benchmark. We therefore introduce a new dataset to support this problem setting. To mitigate look-ahead bias (i.e., the “time-travel” effect where an LLM may exploit latent knowledge from pre-training) (Golchin & Surdeanu, 2024; Li et al., 2025a), we strictly restrict all market observations to 2025. We select a diverse set of underlying assets: SPY, NVDA, AAPL, GOOG, and TSLA, which exhibit distinct trend patterns and volatility regimes over the year, enabling coverage of heterogeneous market conditions. We further partition each underlying’s 2025 price trajectory into labeled regions characterized by different movement styles (e.g., trending, reversing, range-bound, high-volatility). Both region labeling and strategy-type annotation are curated by human domain experts, who assign the most suitable strategy family for each region to ensure domain correctness. At the start of each labeled region, we write a natural-language trading intent that describes the market context and trading objective, while simulating different trader proficiency levels to reflect realistic query styles. We introduce the details and provide examples in Appendix C. 5.2EVALUATION METRICS We evaluate OQL from two complementary perspectives: query-level performance and strategy- level performance. Query-level metrics measure an LLM’s ability to generate valid, accurate, and semantically faithful OQL queries from natural language intent, while strategy-level metrics assess the quality of the retrieved option strategies and whether their backtesting outcomes align with the intended trading objectives. Detailed definitions and computation protocols are provided in Appendix D.1. Query Quality: To address RQ1 and RQ2, we adopt a hierarchical evaluation of query quality that captures progressively stronger notions of correctness. At the most basic level, Validity Rate (VR) measures whether generated OQL queries are syntactically well-formed and executable, i.e., they can be successfully parsed and return at least one candidate strategy. Beyond syntactic validity, Strategy Match (SM) evaluates whether the query selects the correct option strategy family (e.g., spreads, condors) consistent with the user’s stated intent. Finally, Semantic Accuracy (SA) assesses whether the query constraints faithfully encode the key conditions expressed in the intent—such as 6 strikes, days-to-expiration, or Greek exposure—without omitting critical requirements or introducing unintended ones. Strategy Quality: For strategy-level evaluation, we backtest the option strategies returned by each executable query and assess their performance from profitability and risk perspectives. Strategy effectiveness is measured by the Win Rate (WR), defined as the proportion of strategies that achieve positive end-of-period profit and loss (PnL). Risk exposure is captured by whether a strategy triggers a margin call during the backtest, reflecting its vulnerability to extreme downside scenarios. Profitability is further quantified using both the Average Profit, defined as the mean terminal PnL across strategies, and the Return on Cost (ROC), computed asROC = PnL end /|cost 0 |, which normalizes returns by initial capital commitment. 5.3EXPERIMENTS SETTINGS. Baseline settings: We design three baselines: Free-Form Leg Generation (FFLG), Partial-Chain Grounded (PCG), and Text-to-SQL. FFLG directly prompts the LLM to generate option legs (e.g., expiry, strike, call/put, long/short, and position size) purely from natural-language intent, without access to option-chain evidence. PCG instead provides a partial option chain as structured context, grounding the generated legs in observed market data. The Text-to-SQL baseline translates user intent into SQL queries over predefined option-chain tables or views, relying on fixed schemas and handcrafted aggregations rather than compositional strategy reasoning. Detailed designs and implementation details of all baselines are provided in Appendix D.2. Model settings: We evaluate a range of large language models, including commercial models such as Gemini-2.5-Flash, DeepSeek-V3 (DeepSeek-AI et al., 2025), GPT-4.1, and GPT-4.1-Mini (OpenAI et al., 2024). We also include smaller open-weight models, such as LLaMA-3.1-8B and Qwen-3 (8B and 4B) (Yang et al., 2025), as well as coder-focused variants from DeepSeek and Qwen. All models use default temperature settings, and we additionally test our method under Chain-of-Thought prompting (Wei et al., 2022). 5.4RESULTS AND ANALYSIS For OQL capability and model specialization, Tables 2 and 3 demonstrate that OQL effectively bridges natural language intent with executable financial logic. All large models achieved Validity Rates (VR) exceeding 0.870, confirming the framework’s robustness. A key finding is the efficiency of specialized coding models: notably, the smaller DeepSeek-Coder-6.7B outperforms the larger GPT-4.1-Mini in both profitability and win rate, suggesting that domain-specific syntax reasoning is more critical than pure parameter size for this task. Furthermore, we observe a trade-off between aggression and stability: while Gemini-2.5-Flash maximizes total Profit and ROC, DeepSeek-Chat offers the most risk-averse profile with the highest Win Rate and lowest tail risk. Table 2: Comparison of models on query qual- ity. Arrows indicate optimization direction. SizeModelVR↑ SM↑ SA↑ Large DeepSeek-V30.870 0.822 0.664 Gemini-2.5 Flash0.875 0.743 0.606 GPT-4.10.935 0.770 0.698 GPT-4.1-Mini0.950 0.721 0.605 Small LLaMA-3.1-8B0.920 0.582 0.432 Qwen2.5-Coder-7B0.760 0.763 0.553 DeepSeek-Coder-6.7B 0.660 0.659 0.545 Qwen3-4B0.715 0.671 0.476 Qwen3-8B0.780 0.808 0.593 Table 4 highlights that OQL consistently outperforms unstructured baselines (FFLG, PCG) and standard Text-to-SQL approaches. The primary advantage of OQL lies in risk management and reliability. By en- forcing a structured intermediate representation, OQL significantly reduces dangerous hallucinations com- mon in raw SQL generation. For instance, DeepSeek- Chat using OQL reduces the buyer-side Risk@90 to 18.6% (compared to 46.1% with SQL) while achiev- ing the highest overall Win Rate (60.9%). This con- firms that OQL’s constrained search space allows models to reason more effectively about financial constraints, producing consistent alpha rather than the high-variance, high-risk outliers observed in PCG methods. Efficiency analysis in Table 9 reveals that OQL strikes an optimal balance between token consumption and retrieval validity. Unlike the PCG approach, which incurs prohibitive token costs for low retrieval yields, OQL maintains moderate token usage while achieving a dominant cache hit rate of 88.5%. This makes it the most cost-effective framework for high-fidelity strategy retrieval. The asset- 7 level analysis in Appendix E reveals that OQL enables models to adapt their behavior to different market conditions rather than producing uniform or rigid strategies. Some models exhibit stronger performance on volatile, trend-driven assets, while others show greater stability on index-like or mature underlyings. Importantly, OQL exposes these differences without amplifying failure modes, indicating that the framework effectively translates each model’s latent financial reasoning into executable strategies instead of constraining them to superficial syntactic patterns. Case studies in Appendix F illustrate OQL’s proficiency in mapping high-level user intent to struc- turally appropriate option strategies. In hedging scenarios, OQL consistently generates accurate inverse exposures, providing robust protection during market stress. For income-oriented objectives, the generated spread strategies exhibit stable tracking and enhanced yields. OQL effectively aligns semantic intent with market structure and option-chain constraints. Table 3: Downstream strategy performance rearranged by metrics. We compare the average over all executed strategies (All) and the best strategy per case (Top) for each metric. WR↑RE@50↓RE@90↓Profit↑ROC↑ SizeModelAllTopAllTopAllTopAllTopAllTop Large DeepSeek-V30.580 0.609 0.314 0.316 0.180 0.195 368.143 359.776 0.358 0.418 Gemini-2.5-Flash0.558 0.552 0.361 0.374 0.191 0.224 418.192 331.914 0.270 0.729 GPT-4.10.486 0.475 0.469 0.475 0.303 0.339 272.727 261.203 0.051 0.124 GPT-4.1-Mini0.476 0.489 0.457 0.452 0.306 0.306 211.039 172.547 0.264 0.554 Small LLaMA-3.1-8B0.420 0.416 0.359 0.371 0.190 0.208 12.4302.734-0.018 0.118 Qwen2.5-Coder-7B0.476 0.464 0.361 0.371 0.208 0.219 136.469 151.447 0.178 0.122 DeepSeek-Coder-6.7B 0.503 0.504 0.401 0.405 0.239 0.275 305.907 301.386 0.217 0.257 Qwen3-4B0.410 0.406 0.400 0.420 0.179 0.217 118.627 140.538 -0.004 -0.000 Qwen3-8B0.483 0.546 0.468 0.421 0.284 0.270 146.626 174.551 0.197 0.403 Table 4: Performance comparison of different strategy generation methods across base LLMs. Metrics are reported in percentage (%) where applicable. Best results per base model are bolded. Base ModelMethod Win Rate (%)Risk@90 (%)Profitability Overall Buyer Seller Buyer Seller Wgt.RoCProfit DeepSeek-V3 FFLG54.445.077.624.224.524.30.27976.9 PCG44.442.352.526.825.026.50.06492.2 PCG-Full48.943.567.424.523.324.20.258117.8 SQL52.843.461.246.15.924.81.364195.2 OQL (Ours)60.958.566.118.621.419.50.418359.8 OQL-CoT (Ours)60.251.376.226.520.624.40.282343.5 Gemini-2.5-Flash FFLG57.845.583.125.622.024.40.308109.5 PCG61.549.679.728.125.327.00.474189.5 PCG-Full59.843.888.724.223.924.11.752161.9 SQL52.043.667.736.83.225.1-0.024 276.2 OQL (Ours)55.251.381.825.70.022.40.729331.9 OQL-CoT (Ours)62.657.678.621.29.518.40.822449.2 6CONCLUSION In conclusion, this work introduces a neuro-symbolic pipeline for option strategy search that translates natural-language trading intents into executable and verifiable strategies through an intermediate language, OQL. By decoupling semantic parsing (LLM→OQL) from deterministic execution (OQL engine→strategy set), our approach improves reliability when handling complex derivatives logic and enables large-scale evaluation across both query quality and strategy quality. We further present, to our knowledge, the first study adapting the Text-to-SQL paradigm to a customized financial domain, where the “database” corresponds to a massive option-chain space and the “query result” is a structured strategy set. Our empirical results show that semantic accuracy is more predictive of downstream strategy performance than generation success alone, highlighting the importance of faithful constraint grounding for practical option strategy search. Future work will extend OQL beyond predefined strategy templates toward free-form leg design, enabling more flexible and expressive option constructions. We also plan to support strategy queries conditioned on existing portfolio holdings, allowing the system to adaptively generate strategies based on a user’s current positions. In addition, we will expand the strategy taxonomy and OQL operators, and incorporate more realistic trading frictions and risk controls to further improve practical applicability. 8 REFERENCES Vibhor Agarwal, Yulong Pei, Salwa Alamir, and Xiaomo Liu. Codemirage: Hallucinations in code generated by large language models. arXiv preprint arXiv:2408.08333, 2024. Anonymous. Alphabench: Benchmarking large language models in formulaic alpha factor mining. In Submitted to The Fourteenth International Conference on Learning Representations, 2025. URL https://openreview.net/forum?id=d97Q8r7ZKZ. under review. Dogu Araci. Finbert: Financial sentiment analysis with pre-trained language models. arXiv preprint arXiv:1908.10063, 2019. Feliks Ba ́ nka and Jarosław A Chudziak. Deltahedge: A multi-agent framework for portfolio options optimization. arXiv preprint arXiv:2509.12753, 2025. Fischer Black and Myron Scholes. The pricing of options and corporate liabilities. Journal of political economy, 81(3):637–654, 1973. Qizhao Chen and Hiroaki Kawashima. Stock price prediction using llm-based sentiment analysis. In 2024 IEEE International Conference on Big Data (BigData), p. 4846–4853. IEEE, 2024. Zhiyu Chen, Wenhu Chen, Charese Smiley, Sameena Shah, Iana Borova, Dylan Langdon, Reema Moussa, Matt Beane, Ting-Hao Huang, Bryan R Routledge, et al. Finqa: A dataset of numerical reasoning over financial data. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, p. 3697–3711, 2021. Robert Culkin and Sanjiv R Das. Machine learning in finance: the case of deep learning for option pricing. Journal of Investment Management, 15(4):92–100, 2017. Jan De Spiegeleer, Dilip B Madan, Sofie Reyners, and Wim Schoutens. Machine learning for quantitative finance: fast derivative pricing, hedging and fitting. Quantitative Finance, 18(10): 1635–1643, 2018. DeepSeek-AI, Aixin Liu, Bei Feng, Bing Xue, Bingxuan Wang, Bochao Wu, Chengda Lu, Chenggang Zhao, Chengqi Deng, Chenyu Zhang, Chong Ruan, Damai Dai, Daya Guo, Dejian Yang, Deli Chen, Dongjie Ji, Erhang Li, Fangyun Lin, Fucong Dai, Fuli Luo, Guangbo Hao, Guanting Chen, Guowei Li, H. Zhang, Han Bao, Hanwei Xu, Haocheng Wang, Haowei Zhang, Honghui Ding, Huajian Xin, Huazuo Gao, Hui Li, Hui Qu, J. L. Cai, Jian Liang, Jianzhong Guo, Jiaqi Ni, Jiashi Li, Jiawei Wang, Jin Chen, Jingchang Chen, Jingyang Yuan, Junjie Qiu, Junlong Li, Junxiao Song, Kai Dong, Kai Hu, Kaige Gao, Kang Guan, Kexin Huang, Kuai Yu, Lean Wang, Lecong Zhang, Lei Xu, Leyi Xia, Liang Zhao, Litong Wang, Liyue Zhang, Meng Li, Miaojun Wang, Mingchuan Zhang, Minghua Zhang, Minghui Tang, Mingming Li, Ning Tian, Panpan Huang, Peiyi Wang, Peng Zhang, Qiancheng Wang, Qihao Zhu, Qinyu Chen, Qiushi Du, R. J. Chen, R. L. Jin, Ruiqi Ge, Ruisong Zhang, Ruizhe Pan, Runji Wang, Runxin Xu, Ruoyu Zhang, Ruyi Chen, S. S. Li, Shanghao Lu, Shangyan Zhou, Shanhuang Chen, Shaoqing Wu, Shengfeng Ye, Shengfeng Ye, Shirong Ma, Shiyu Wang, Shuang Zhou, Shuiping Yu, Shunfeng Zhou, Shuting Pan, T. Wang, Tao Yun, Tian Pei, Tianyu Sun, W. L. Xiao, Wangding Zeng, Wanjia Zhao, Wei An, Wen Liu, Wenfeng Liang, Wenjun Gao, Wenqin Yu, Wentao Zhang, X. Q. Li, Xiangyue Jin, Xianzu Wang, Xiao Bi, Xiaodong Liu, Xiaohan Wang, Xiaojin Shen, Xiaokang Chen, Xiaokang Zhang, Xiaosha Chen, Xiaotao Nie, Xiaowen Sun, Xiaoxiang Wang, Xin Cheng, Xin Liu, Xin Xie, Xingchao Liu, Xingkai Yu, Xinnan Song, Xinxia Shan, Xinyi Zhou, Xinyu Yang, Xinyuan Li, Xuecheng Su, Xuheng Lin, Y. K. Li, Y. Q. Wang, Y. X. Wei, Y. X. Zhu, Yang Zhang, Yanhong Xu, Yanhong Xu, Yanping Huang, Yao Li, Yao Zhao, Yaofeng Sun, Yaohui Li, Yaohui Wang, Yi Yu, Yi Zheng, Yichao Zhang, Yifan Shi, Yiliang Xiong, Ying He, Ying Tang, Yishi Piao, Yisong Wang, Yixuan Tan, Yiyang Ma, Yiyuan Liu, Yongqiang Guo, Yu Wu, Yuan Ou, Yuchen Zhu, Yuduan Wang, Yue Gong, Yuheng Zou, Yujia He, Yukun Zha, Yunfan Xiong, Yunxian Ma, Yuting Yan, Yuxiang Luo, Yuxiang You, Yuxuan Liu, Yuyang Zhou, Z. F. Wu, Z. Z. Ren, Zehui Ren, Zhangli Sha, Zhe Fu, Zhean Xu, Zhen Huang, Zhen Zhang, Zhenda Xie, Zhengyan Zhang, Zhewen Hao, Zhibin Gou, Zhicheng Ma, Zhigang Yan, Zhihong Shao, Zhipeng Xu, Zhiyu Wu, Zhongyu Zhang, Zhuoshu Li, Zihui Gu, Zijia Zhu, Zijun Liu, Zilin Li, Ziwei Xie, Ziyang Song, Ziyi Gao, and Zizheng Pan. Deepseek-v3 technical report, 2025. URL https://arxiv.org/abs/2412.19437. 9 Dawei Gao, Haibin Wang, Yaliang Li, Xiuyu Sun, Yichen Qian, Bolin Ding, and Jingren Zhou. Text-to-sql empowered by large language models: A benchmark evaluation. arXiv preprint arXiv:2308.15363, 2023. Shahriar Golchin and Mihai Surdeanu. Time travel in LLMs: Tracing data contamination in large language models. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=2Rwq6c3tvr. Tian Guo and Emmanuel Hauptmann. Fine-tuning large language models for stock return pre- diction using newsflow. In Franck Dernoncourt, Daniel Preo ̧tiuc-Pietro, and Anastasia Shi- morina (eds.), Proceedings of the 2024 Conference on Empirical Methods in Natural Lan- guage Processing: Industry Track, p. 1028–1045, Miami, Florida, US, November 2024. As- sociation for Computational Linguistics. doi: 10.18653/v1/2024.emnlp-industry.77. URL https://aclanthology.org/2024.emnlp-industry.77/. Zijin Hong, Zheng Yuan, Qinggang Zhang, Hao Chen, Junnan Dong, Feiran Huang, and Xiao Huang. Next-generation database interfaces: A survey of llm-based text-to-sql. IEEE Transactions on Knowledge and Data Engineering, 2025. John C Hull and Sankarshan Basu. Options, futures, and other derivatives. Pearson Education India, 2016. Codrut , -Florin Ivas , cu. Option pricing using machine learning. Expert Systems with Applications, 163: 113799, 2021. Kelvin JL Koa, Yunshan Ma, Ritchie Ng, and Tat-Seng Chua. Learning to generate explainable stock predictions using self-reflective large language models. In Proceedings of the ACM Web Conference 2024, p. 4304–4315, 2024. Gyubok Lee, Hyeonji Hwang, Seongsu Bae, Yeonsu Kwon, Woncheol Shin, Seongjun Yang, Minjoon Seo, Jong-Yeup Kim, and Edward Choi. Ehrsql: A practical text-to-sql benchmark for electronic health records. Advances in Neural Information Processing Systems, 35:15589–15601, 2022. Changlun Li, Yao SHI, Chen Wang, Qiqi Duan, Runke RUAN, Weijie Huang, Haonan Long, Lijun Huang, Nan Tang, and Yuyu Luo. Time travel is cheating: Going live with deepfund for real-time fund investment benchmarking. In The Thirty-ninth Annual Conference on Neural Information Processing Systems Datasets and Benchmarks Track, 2025a. URLhttps://openreview.net/ forum?id=SXADEhZ0sl. Haohang Li, Yupeng Cao, Yangyang Yu, Shashidhar Reddy Javaji, Zhiyang Deng, Yueru He, Yuechen Jiang, Zining Zhu, Kp Subbalakshmi, Jimin Huang, et al. Investorbench: A benchmark for financial decision-making tasks with llm-based agent. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), p. 2509–2525, 2025b. Zhiwei Li, Ran Song, Caihong Sun, Wei Xu, Zhengtao Yu, and Ji-Rong Wen. Can large language models mine interpretable financial factors more effectively? a neural-symbolic factor mining agent model. In Lun-Wei Ku, Andre Martins, and Vivek Srikumar (eds.), Findings of the Association for Computational Linguistics: ACL 2024, p. 3891–3902, Bangkok, Thailand, August 2024. Association for Computational Linguistics. doi: 10.18653/v1/2024.findings-acl.233. URLhttps: //aclanthology.org/2024.findings-acl.233/. Xiao-Yang Liu, Guoxuan Wang, Hongyang Yang, and Daochen Zha. Fingpt: Democratizing internet- scale data for financial large language models. arXiv preprint arXiv:2307.10485, 2023. Yiwei Liu, Junbo Wang, Lei Long, Xin Li, Ruiting Ma, Yuankai Wu, and Xuebin Chen. A multi-level sentiment analysis framework for financial texts. arXiv preprint arXiv:2504.02429, 2025. Zhuang Liu, Degen Huang, Kaiyu Huang, Zhuang Li, and Jun Zhao. Finbert: A pre-trained financial language representation model for financial text mining. In Proceedings of the twenty-ninth international conference on international joint conferences on artificial intelligence, p. 4513– 4519, 2021. Haochen Luo, Yuan Zhang, and Chen Liu. Efs: Evolutionary factor searching for sparse portfolio optimization using large language models. arXiv preprint arXiv:2507.17211, 2025. 10 Haochen Luo, Ho Tin Ko, David Sun, Yuan Zhang, and Chen Liu. Evoalpha: Evolutionary alpha factor discovery with large language models. In NeurIPS 2025 Workshop: Generative AI in Finance, 2026. URL https://openreview.net/forum?id=ALpLmURYWy. Ying Nie, Binwei Yan, Tianyu Guo, Hao Liu, Haoyu Wang, Wei He, Binfan Zheng, Weihao Wang, Qiang Li, Weijian Sun, et al. Cfinbench: A comprehensive chinese financial benchmark for large language models. In Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), p. 876–891, 2025. OpenAI, Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Altman, Shyamal Anadkat, Red Avila, Igor Babuschkin, Suchir Balaji, Valerie Balcom, Paul Baltescu, Haiming Bao, Mohammad Bavarian, Jeff Belgum, Irwan Bello, Jake Berdine, Gabriel Bernadett-Shapiro, Christopher Berner, Lenny Bogdonoff, Oleg Boiko, Madelaine Boyd, Anna-Luisa Brakman, Greg Brockman, Tim Brooks, Miles Brundage, Kevin Button, Trevor Cai, Rosie Campbell, Andrew Cann, Brittany Carey, Chelsea Carlson, Rory Carmichael, Brooke Chan, Che Chang, Fotis Chantzis, Derek Chen, Sully Chen, Ruby Chen, Jason Chen, Mark Chen, Ben Chess, Chester Cho, Casey Chu, Hyung Won Chung, Dave Cummings, Jeremiah Currier, Yunxing Dai, Cory Decareaux, Thomas Degry, Noah Deutsch, Damien Deville, Arka Dhar, David Dohan, Steve Dowling, Sheila Dunning, Adrien Ecoffet, Atty Eleti, Tyna Eloundou, David Farhi, Liam Fedus, Niko Felix, Simón Posada Fishman, Juston Forte, Isabella Fulford, Leo Gao, Elie Georges, Christian Gibson, Vik Goel, Tarun Gogineni, Gabriel Goh, Rapha Gontijo-Lopes, Jonathan Gordon, Morgan Grafstein, Scott Gray, Ryan Greene, Joshua Gross, Shixiang Shane Gu, Yufei Guo, Chris Hallacy, Jesse Han, Jeff Harris, Yuchen He, Mike Heaton, Johannes Heidecke, Chris Hesse, Alan Hickey, Wade Hickey, Peter Hoeschele, Brandon Houghton, Kenny Hsu, Shengli Hu, Xin Hu, Joost Huizinga, Shantanu Jain, Shawn Jain, Joanne Jang, Angela Jiang, Roger Jiang, Haozhun Jin, Denny Jin, Shino Jomoto, Billie Jonn, Heewoo Jun, Tomer Kaftan, Łukasz Kaiser, Ali Kamali, Ingmar Kanitscheider, Nitish Shirish Keskar, Tabarak Khan, Logan Kilpatrick, Jong Wook Kim, Christina Kim, Yongjik Kim, Jan Hendrik Kirchner, Jamie Kiros, Matt Knight, Daniel Kokotajlo, Łukasz Kondraciuk, Andrew Kondrich, Aris Konstantinidis, Kyle Kosic, Gretchen Krueger, Vishal Kuo, Michael Lampe, Ikai Lan, Teddy Lee, Jan Leike, Jade Leung, Daniel Levy, Chak Ming Li, Rachel Lim, Molly Lin, Stephanie Lin, Mateusz Litwin, Theresa Lopez, Ryan Lowe, Patricia Lue, Anna Makanju, Kim Malfacini, Sam Manning, Todor Markov, Yaniv Markovski, Bianca Martin, Katie Mayer, Andrew Mayne, Bob McGrew, Scott Mayer McKinney, Christine McLeavey, Paul McMillan, Jake McNeil, David Medina, Aalok Mehta, Jacob Menick, Luke Metz, Andrey Mishchenko, Pamela Mishkin, Vinnie Monaco, Evan Morikawa, Daniel Mossing, Tong Mu, Mira Murati, Oleg Murk, David Mély, Ashvin Nair, Reiichiro Nakano, Rajeev Nayak, Arvind Neelakantan, Richard Ngo, Hyeonwoo Noh, Long Ouyang, Cullen O’Keefe, Jakub Pachocki, Alex Paino, Joe Palermo, Ashley Pantuliano, Giambattista Parascandolo, Joel Parish, Emy Parparita, Alex Passos, Mikhail Pavlov, Andrew Peng, Adam Perelman, Filipe de Avila Belbute Peres, Michael Petrov, Henrique Ponde de Oliveira Pinto, Michael, Pokorny, Michelle Pokrass, Vitchyr H. Pong, Tolly Powell, Alethea Power, Boris Power, Elizabeth Proehl, Raul Puri, Alec Radford, Jack Rae, Aditya Ramesh, Cameron Raymond, Francis Real, Kendra Rimbach, Carl Ross, Bob Rotsted, Henri Roussez, Nick Ryder, Mario Saltarelli, Ted Sanders, Shibani Santurkar, Girish Sastry, Heather Schmidt, David Schnurr, John Schulman, Daniel Selsam, Kyla Sheppard, Toki Sherbakov, Jessica Shieh, Sarah Shoker, Pranav Shyam, Szymon Sidor, Eric Sigler, Maddie Simens, Jordan Sitkin, Katarina Slama, Ian Sohl, Benjamin Sokolowsky, Yang Song, Natalie Staudacher, Felipe Petroski Such, Natalie Summers, Ilya Sutskever, Jie Tang, Nikolas Tezak, Madeleine B. Thompson, Phil Tillet, Amin Tootoonchian, Elizabeth Tseng, Preston Tuggle, Nick Turley, Jerry Tworek, Juan Felipe Cerón Uribe, Andrea Vallone, Arun Vijayvergiya, Chelsea Voss, Carroll Wainwright, Justin Jay Wang, Alvin Wang, Ben Wang, Jonathan Ward, Jason Wei, CJ Weinmann, Akila Welihinda, Peter Welinder, Jiayi Weng, Lilian Weng, Matt Wiethoff, Dave Willner, Clemens Winter, Samuel Wolrich, Hannah Wong, Lauren Workman, Sherwin Wu, Jeff Wu, Michael Wu, Kai Xiao, Tao Xu, Sarah Yoo, Kevin Yu, Qiming Yuan, Wojciech Zaremba, Rowan Zellers, Chong Zhang, Marvin Zhang, Shengjia Zhao, Tianhao Zheng, Juntang Zhuang, William Zhuk, and Barret Zoph. Gpt-4 technical report, 2024. URL https://arxiv.org/abs/2303.08774. Gengyuan Shi, Chaokun Wang, Liu Yabin, and Jiawei Ren. Adaptive and robust translation from natural language to multi-model query languages. In Wanxiang Che, Joyce Nabende, Ekaterina 11 Shutova, and Mohammad Taher Pilehvar (eds.), Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), p. 15950–15965, Vienna, Austria, July 2025a. Association for Computational Linguistics. ISBN 979-8-89176-251-0. doi: 10.18653/v1/2025.acl-long.776. URL https://aclanthology.org/2025.acl-long.776/. Yu Shi, Yitong Duan, and Jian Li. Navigating the alpha jungle: An llm-powered mcts framework for formulaic factor mining. arXiv preprint arXiv:2505.11122, 2025b. Jie Tan, Kangfei Zhao, Rui Li, Jeffrey Xu Yu, Chengzhi Piao, Hong Cheng, Helen Meng, Deli Zhao, and Yu Rong. Can large language models be query optimizer for relational databases? Proceedings of the ACM on Management of Data, 3(6):1–28, 2025. Ziyi Tang, Zechuan Chen, Jiarui Yang, Jiayao Mai, Yongsen Zheng, Keze Wang, Jinrui Chen, and Liang Lin. Alphaagent: Llm-driven alpha mining with regularized exploration to counteract alpha decay. In Proceedings of the 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining V. 2, p. 2813–2822, 2025. Simon Vine. Options: trading strategy and risk management, volume 288. John Wiley & Sons, 2011. Meiyun Wang, Kiyoshi Izumi, and Hiroki Sakaji. LLMFactor: Extracting profitable factors through prompts for explainable stock movement prediction. In Lun-Wei Ku, Andre Martins, and Vivek Srikumar (eds.), Findings of the Association for Computational Linguistics: ACL 2024, p. 3120– 3131, Bangkok, Thailand, August 2024. Association for Computational Linguistics. doi: 10.18653/ v1/2024.findings-acl.185. URL https://aclanthology.org/2024.findings-acl.185/. Saizhuo Wang, Hang Yuan, Leon Zhou, Lionel Ni, Heung Yeung Shum, and Jian Guo. Alpha- gpt: Human-ai interactive alpha mining for quantitative investment. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, p. 196–206, 2025. Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, et al. Chain-of-thought prompting elicits reasoning in large language models. Advances in neural information processing systems, 35:24824–24837, 2022. Shijie Wu, Ozan Irsoy, Steven Lu, Vadim Dabravolski, Mark Dredze, Sebastian Gehrmann, Prabhan- jan Kambadur, David Rosenberg, and Gideon Mann. Bloomberggpt: A large language model for finance. arXiv preprint arXiv:2303.17564, 2023. Yijia Xiao, Edward Sun, Di Luo, and Wei Wang. Tradingagents: Multi-agents LLM financial trading framework. In The First MARW: Multi-Agent AI in the Real World Workshop at AAAI 2025, 2025. URL https://openreview.net/forum?id=4QPrXwMQt1. Qianqian Xie, Weiguang Han, Xiao Zhang, Yanzhao Lai, Min Peng, Alejandro Lopez-Lira, and Jimin Huang. Pixiu: A comprehensive benchmark, instruction dataset and large language model for finance. Advances in Neural Information Processing Systems, 36:33469–33484, 2023. Qianqian Xie, Weiguang Han, Zhengyu Chen, Ruoyu Xiang, Xiao Zhang, Yueru He, Mengxi Xiao, Dong Li, Yongfu Dai, Duanyu Feng, et al. Finben: A holistic financial benchmark for large language models. Advances in Neural Information Processing Systems, 37:95716–95743, 2024. An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chengen Huang, Chenxu Lv, Chujie Zheng, Dayiheng Liu, Fan Zhou, Fei Huang, Feng Hu, Hao Ge, Haoran Wei, Huan Lin, Jialong Tang, Jian Yang, Jianhong Tu, Jianwei Zhang, Jianxin Yang, Jiaxi Yang, Jing Zhou, Jingren Zhou, Junyang Lin, Kai Dang, Keqin Bao, Kexin Yang, Le Yu, Lianghao Deng, Mei Li, Mingfeng Xue, Mingze Li, Pei Zhang, Peng Wang, Qin Zhu, Rui Men, Ruize Gao, Shixuan Liu, Shuang Luo, Tianhao Li, Tianyi Tang, Wenbiao Yin, Xingzhang Ren, Xinyu Wang, Xinyu Zhang, Xuancheng Ren, Yang Fan, Yang Su, Yichang Zhang, Yinger Zhang, Yu Wan, Yuqiong Liu, Zekun Wang, Zeyu Cui, Zhenru Zhang, Zhipeng Zhou, and Zihan Qiu. Qwen3 technical report, 2025. URL https://arxiv.org/abs/2505.09388. Yuzhe YANG, Yifei Zhang, Minghao Wu, Kaidi Zhang, Yunmiao Zhang, Honghai Yu, Yan Hu, and Benyou Wang. Twinmarket: A scalable behavioral and social simulation for financial markets. In The Thirty-ninth Annual Conference on Neural Information Processing Systems, 2025. URL https://openreview.net/forum?id=h60y6zlPyl. 12 Yangyang Yu, Zhiyuan Yao, Haohang Li, Zhiyang Deng, Yuechen Jiang, Yupeng Cao, Zhi Chen, Jor- dan W. Suchow, Zhenyu Cui, Rong Liu, Zhaozhuo Xu, Denghui Zhang, Koduvayur Subbalakshmi, GUOJUN XIONG, Yueru He, Jimin Huang, Dong Li, and Qianqian Xie. Fincon: A synthesized LLM multi-agent system with conceptual verbal reinforcement for enhanced financial decision making. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. URL https://openreview.net/forum?id=dG1HwKMYbC. Yangyang Yu, Haohang Li, Zhi Chen, Yuechen Jiang, Yang Li, Jordan W Suchow, Denghui Zhang, and Khaldoun Khashanah. Finmem: A performance-enhanced llm trading agent with layered memory and character design. IEEE Transactions on Big Data, 2025. Aniruddha Zalani. Low-latency machine learning for options pricing: High-speed models and trading performance. Journal of Computer Science and Technology Studies, 7(5):65–72, 2025. Bin Zhang, Yuxiao Ye, Guoqing Du, Xiaoru Hu, Zhishuai Li, Sun Yang, Chi Harold Liu, Rui Zhao, Ziyue Li, and Hangyu Mao. Benchmarking the text-to-sql capability of large language models: A comprehensive evaluation. arXiv preprint arXiv:2403.02951, 2024. Zhihan Zhang, Yixin Cao, and Lizi Liao. XFinBench: Benchmarking LLMs in complex financial problem solving and reasoning. In Wanxiang Che, Joyce Nabende, Ekaterina Shutova, and Mohammad Taher Pilehvar (eds.), Findings of the Association for Computational Linguistics: ACL 2025, p. 8715–8758, Vienna, Austria, July 2025. Association for Computational Linguistics. ISBN 979-8-89176-256-5. doi: 10.18653/v1/2025.findings-acl.457. URLhttps://aclanthology. org/2025.findings-acl.457/. ABACKGROUND OF OPTION STRATEGY We summarize the option strategies considered in this work under two common trading scenarios: directional views (bullish/bearish exposure) and volatility views (breakout or range-bound). Through- out this appendix, we only consider pure option multi-leg combinations (calls/puts) on the same underlying, and we do not include stock-option mixed positions (e.g., covered calls, protective puts, collars). All payoffs are defined at expiration as functions ofS T , omitting transaction costs and premium shifts. A.1DIRECTIONAL STRATEGIES Long Call (Bullish). Buy one call with strike K: Π LC (S T ) = (S T − K) + .(5) Long Put (Bearish). Buy one put with strike K: Π LP (S T ) = (K− S T ) + .(6) Bull Call Spread (Bull Spread). Buy a call at K 1 and sell a call at K 2 with K 1 < K 2 : Π BCS (S T ) = (S T − K 1 ) + − (S T − K 2 ) + .(7) Bear Put Spread (Bear Spread). Buy a put at K 2 and sell a put at K 1 with K 1 < K 2 : Π BPS (S T ) = (K 2 − S T ) + − (K 1 − S T ) + .(8) A.2VOLATILITY STRATEGIES Long Straddle (Long Volatility). Buy a call and a put at the same strike K: Π Straddle (S T ) = (S T − K) + + (K− S T ) + =|S T − K|.(9) Long Strangle (Long Volatility). Buy a put at K 1 and a call at K 2 with K 1 < K 2 : Π Strangle (S T ) = (K 1 − S T ) + + (S T − K 2 ) + .(10) 13 Butterfly (Short Volatility / Range-Bound). A standard call butterfly uses three strikesK 1 < K 2 < K 3 : Π Butterfly (S T ) = (S T − K 1 ) + − 2(S T − K 2 ) + + (S T − K 3 ) + . (11) Iron Condor (Short Volatility / Range-Bound).Constructed by combining a put spread and a call spread with K 1 < K 2 < K 3 < K 4 : Π IC (S T ) = (K 2 − S T ) + − (K 1 − S T ) + | z put spread + (S T − K 3 ) + − (S T − K 4 ) + | z call spread . (12) BOQL SPECIFICATION AND EXAMPLES This appendix provides the formal definition of the Option Query Language (OQL), including its grammatical structure, role-based schema, and practical usage examples. B.1FORMAL SYNTAX (EBNF) To facilitate Schema-Augmented Generation, OQL is defined by a strict Extended Backus-Naur Form (EBNF) grammar. This grammar is injected into the LLM context to constrain token generation and ensure syntactic validity. Query ::= SelectClause FromClause WhereClause? HavingClause? OrderClause? LimitClause? SelectClause ::= "SELECT" StrategyName StrategyName ::= "BULL_CALL_SPREAD" | "IRON_CONDOR" | ... FromClause ::= "FROM" Underlying Underlying ::= [A-Z]+ -- e.g., SPY WhereClause ::= "WHERE" LegCondition "AND" LegCondition LegCondition ::= Role "." Field Op Value HavingClause ::= "HAVING" StratCondition "AND" StratCondition StratCondition ::= Field Op Value | Field "BETWEEN" Val "AND" Val OrderClause ::= "ORDER" "BY" OrderItem "," OrderItem OrderItem ::= Field [ "ASC" | "DESC" ] LimitClause ::= "LIMIT" INTEGER Role ::= "L" | "S" | "F" | "B" | ... Field ::= "Dte" | "Delta" | "Iv" | ... Op ::= "=" | "!=" | "<" | ">" | "~" 14 B.2STRATEGY DEFINITIONS AND ROLE SCHEMAS OQL enforces structural integrity through Role Schemas. Each strategy type implies a specific set of leg identifiers (Roles) that are valid within theWHEREclause. The execution engine rejects queries referencing undefined roles (e.g., referencing a "Short Put" role in a "Call Spread" strategy). Table 5: Supported Strategies and Role Definitions StrategyRolesDescription BULL_CALL_SPREAD L, SLower-strike Long Call + Higher-strike Short Call BEAR_PUT_SPREAD L, SHigher-strike Long Put + Lower-strike Short Put CALENDAR_CALL F, BNear-term Short Call + Far-term Long Call STRADDLE C, PATM Call + ATM Put IRON_CONDOR SC, LCShort/Long Call Wings SP, LPShort/Long Put Wings BUTTERFLY_CALL L1, S, L2Long wings + Short body B.3QUERY ANALYSIS AND EXAMPLES The following examples demonstrate how OQL handles complex financial logic that would otherwise require verbose Python scripts. Example 1: The "Approximate" Operator. Natural language often implies fuzzy constraints. The tilde operator (∼) allows the LLM to express "around 30 days" without hallucinating exact dates. Intent: "Find me an Iron Condor on Q expiring in about a month, where I collect at least $100 credit." SELECT IRON_CONDOR FROM Q WHERE SC.Dte ~ 30 AND LC.Dte ~ 30 AND SP.Dte ~ 30 AND LP.Dte ~ 30 HAVING net_credit >= 100 ORDER BY r_ratio DESC Example 2: Iron Condor (Range-Bound Income). OQL supports four-leg strategies and allows users to express range-bound views using leg-level Greek constraints and maturity conditions. Intent: “TSLA is likely to stay range-bound. Build an iron condor with about 30 days to expiration. I want positive theta and limited downside risk.” SELECT IRON_CONDOR FROM TSLA WHERE Dte ~ 30 AND SC.Delta < 0.20 AND LC.Delta < 0.05 AND SP.Delta > -0.20 AND LP.Delta > -0.05 HAVING net_theta > 0 AND max_loss < 500 LIMIT 10 B.4BACKEND DESIGN OQL is designed as an abstract domain-specific language that serves as a middle layer between large language models (LLMs) and the concrete strategy search process. The role of the backend engine is to translate OQL queries into executable search programs over option-chain data. In principle, OQL is backend-agnostic. After abstracting the core components of option strategy search, such as leg selection, structural constraints, and aggregate risk computation. The execution can be implemented using different backends. For example, the search process can be realized with Python-based data processing frameworks (e.g., NumPy or Pandas) for flexible prototyping, 15 or compiled into SQL query templates or stored procedures for efficient and scalable execution in relational databases. The choice of backend depends on system requirements such as performance, scalability, and deployment constraints. In this work, we adopt a Python-based backend to facilitate rapid prototyping and experimental evaluation. Nevertheless, the design of OQL naturally supports compilation into SQL-based execution pipelines. In future work, we plan to migrate the backend to a fully SQL-driven implementation, lever- aging relational query optimization and deterministic execution to enable large-scale, reproducible strategy search. CDATASET CONSTRUCTION To the best of our knowledge, translating natural-language trading intents into executable multi-leg option strategies is a relatively unexplored task, and no existing dataset explicitly aligns linguistic descriptions with structured option strategies under realistic market conditions. To address this gap, we construct a new dataset by grounding expert-written intents in carefully segmented market regimes observed in 2025. In this section, we introduce the construction pipeline of our dataset. As shown in Figure 3, rather than relying on uniform calendar-based splits, we first identify distinct market regimes based on price action within a held-out test period that is not fully observed by large language models during training. Human experts manually classify market styles (e.g., crashes, recoveries, consolidations, or momentum-driven phases) and determine the appropriate option strategy archetypes commonly adopted under each regime. For dataset annotation purposes, we assume a hypothetical trader who enters the market at the beginning of each regime and, as an oracle, has access to the realized price trajectory over the subsequent evaluation window. This oracle assumption is used solely to assign regime-consistent intent labels and strategy preferences, and is never exposed to the model during training or inference. The resulting regimes and strategy mappings are employed exclusively for intent grounding and evaluation, ensuring that no look-ahead information is exploited. 1. Market Regime Segmentation High-Level Consolidation (Jan-Mid Apr) Crash (Mar-Apr) V-Shape Recovery (Mid Apr-Jul) Mid-Term Consolidation & Ascent (Aug-Oct) High-Level Wide Oscillation (Nov-Dec) Historical Price Data (e.g., SPY 2025) Human Expert Annotation Identify Distinct Regimes Determine Strategy Archetypes (e.g., Iron Condor, Bear Put Spread) 2. Ground-Truth Intent Alignment Intent-Strategy Pairing (Regime-Consistent) Natural Language Trading Intents SPY chopping sideways 570-600... collect income... delta-neutral setup. Worried about short-term correction... setup a Put spread... buy back-month protection... Preferred Startegy Labels IRON_CONDOR BEAR_PUT_SPREAD Oracle Assumption (For Annotation Only) Access to realized future price trajectory for accurate labeling, never exposed during training/inference. 3. Dataset Finalization & Backtesting Windows Annotated Dataset Samples Backtesting Alignment "case_id": "spy_2025_001", "intent": "...chopping sideways...", "strategy": "IRON_CONDOR", "backtest_start": "2025-01-15", "backtest_end": "2025-03-01" "case_id": "spy_2025_021", "intent": "...short-term correction...", "strategy": "BEAR_PUT_SPREAD", "backtest_start": "2025-08-29", "backtest_end": "2025-10-01" Windows aligned with regime boundaries; Entry near beginning, Exit at transition or expiration. Final Grounded Dataset (Intents, Strategies, Market Regimes) Figure 3: Dataset construction workflow. We segment historical price data into distinct market regimes, align natural-language trading intents with regime-consistent option strategy labels, and finalize JSON samples with backtesting windows aligned to regime boundaries, producing a grounded dataset of intents, strategies, and market regimes. C.1MARKET REGIME SEGMENTATION For each underlying asset, we manually divide the yearly price trajectory into consecutive regimes based on dominant trend direction, volatility characteristics, drawdown magnitude, and structural 16 Table 6: Two example intent cases in our benchmark. We categorize queries by user expertise (e.g., Junior vs. Senior) and extract key parameters such as the underlying asset, preferred strategy, and backtesting range from the unstructured intent description. Case TypeUnderlyingStrategyUser Intent DescriptionBacktest Period Example 1NVDABull Call“Okay, we are bouncing off 95. Jensen is speaking next week. 2025-04-15 (Junior)SpreadI think the bottom is in. I want to catch the run back to 120, to but I don’t have much cash. Get me a cheap Call Spread.” 2025-05-15 Example 2GOOGBear Call“The stock is stuck below the 210 resistance and looks heavy. 2025-01-17 (Senior)SpreadI want to sell the 215/220 call spread to col- lect premium. to I don’t think it has the energy to break out...”2025-02-10 price patterns (e.g., V-shaped reversals, range-bound consolidation, or breakout acceleration). Each regime represents a distinct market condition that naturally corresponds to different option strategy preferences. Below, we illustrate this process using representative examples from SPY in Table 7, which serves as a market-wide benchmark and exhibits a pronounced deep V-shaped reversal in 2025, followed by a sustained bull market and high-level consolidation. Based on price action, we identify four major regimes. Table 7: Market regime segmentation of SPY in 2025 and corresponding option strategy preferences. Regime & Time PeriodPrice Action CharacteristicsTypical Option Strategy Preference I: High-level consolidation & drawdown (Jan – mid Apr) Range-bound (570–600) followed by rapid Feb sell-off. Breaks support to year-low (∼500) with high volume, indicating panic liquidation. Bearish hedging structures (long puts, bear spreads) to protect against tail risk and capture downside convexity. I: V-shaped rebound & up- trend (mid Apr – Jul) Double-bottom in Apr, then steep rebound. Rallies from∼500 to >640 in 3 months with strong momentum and minimal pullbacks. Risk-controlled bullish strategies (bull spreads, call diagonals) to leverage upside while managing capital and volatility. I: Consolidation & stair- step advance (Aug – Oct) Momentum moderates. Intermittent pullbacks (∼620) and renewed advances form a zigzag structure with higher highs and lows. Moderately bullish/volatility-selling (call spreads, calendars, directional strangles) for growth with reduced trend strength. IV: Volatility & stabiliza- tion (late Oct – Dec) Sharp correction (688 to 650) then rapid recovery. Stabilizes near highs (∼683) in wide consolidation with elevated volatility. Non-directional income strategies (iron condors, short straddles) to capture time decay amidst high volatility and uncertainty. C.2GROUND-TRUTH INTENT ALIGNMENT AND BACKTESTING WINDOWS For each market regime, we construct ground-truth annotations that link observed price-action patterns to natural-language trading intents and corresponding option strategy preferences, we provide examples in Table 6. Intents are written by human experts based solely on information available up to the regime endpoint and describe high-level objectives such as directional bias (bullish, bearish, or neutral) and risk preference (e.g., downside protection, upside participation, or volatility harvesting), without referencing any future price realization. Each regime is associated with typical strategy archetypes commonly used under similar conditions (e.g., downside-protection strategies during drawdowns or non-directional income strategies during high-level consolidation), as summarized in Table 7. 17 For quantitative evaluation, backtesting windows are manually aligned with regime boundaries. The entry date is set near the beginning of the corresponding regime, while the exit date is chosen at the regime transition or at option expiration, whichever occurs first. This design ensures a consistent and transparent mapping between market observations, natural-language intents, and backtested strategy outcomes. DDETAILS IN EXPERIMENTS D.1EVALUATION METRICS We evaluate the system from two complementary perspectives: Query Quality (validity, efficiency, and semantic correctness of OQL generation) and Strategy Quality (financial performance of the generated strategies). D.1.1QUERY QUALITY To address RQ1 and RQ2, we employ a hierarchical set of metrics to evaluate the LLMs’ proficiency in OQL query generation. These metrics range from syntactic validity to semantic faithfulness and execution efficiency. As we introduce three metrics to measure correctness and alignment used in Section 5.2, in this section, we provide more details in Semantic Accuracy (SA). We use an LLM- based evaluator (GPT-4o) to judge whether the query’s constraints correctly reflect the intent’s key conditions (e.g., strikes, DTE, Greeks) without missing hard constraints or hallucinating requirements. The specific prompt used for this evaluation is detailed in Figure 4. We additionally design two metrics to further measure the query efficiency and selectivity. Let D =1,...,Nbe the set of test cases. For each casej, the model is allowed up toKattempts. Let k j denote the index of the first successful attempt (parsable and non-empty). If no success occurs within K tries, we set k j =∞. Prompt for Semantic Accuracy (SA) Evaluation System Instruction: You are an evaluator for semantic match between a natural-language intent and an OQL query. Goal: • Judge whether the OQL query is a reasonable and faithful translation of the intent. • This is NOT a formal proof task. Allow reasonable interpretations for vague wording. Key Ideas: • HARD Constraints: Explicit numeric/categorical requirements (e.g., DTE=30, ATM/OTM, net_credit≥ X, max_loss≤ Y). • SOFT Constraints: Approximate phrases ("around", "near", "low risk"). Evaluation Rules: 1. Core Strategy Match: FAIL if the SELECT strategy family differs from the intent’s main trading idea. 2. HARD Constraints: FAIL if violated. PARTLY_CORRECT if details are missing but not contradictory. 3. SOFT Constraints: Treat flexibly. Missing some does not automatically fail. 4. Extra Constraints: Do NOT penalize structural validity constraints. 5. Approximation: Treat "∼" or "around" with tolerance (e.g., DTE± 5). Grading Scale: • completely_correct: Core match + HARD constraints satisfied. • partly_correct: Core match + minor details missing or extra constraints narrowing intent. • fail: Wrong strategy or contradiction of HARD constraints. Output Format: JSON with keys grade and comment. Figure 4: The LLM-as-a-Judge prompt used to evaluate Semantic Accuracy (SA). It distinguishes between hard and soft constraints to ensure fair evaluation of the generated OQL code. 18 Efficiency (Eff). This metric penalizes multiple retries. It is defined as the average remaining budget ratio for successful cases: Eff = 1 N N X j=1 I(k j ≤ K)· 1− k j K ,(13) where I(·) is the indicator function. Selectivity (AvgRows).To measure query specificity, we report the average number of rows (r j,k j ) returned by successful queries. Given the constraint of LIMIT 10, this is calculated as: AvgRows = 1 |S| X j∈S r j,k j ,(14) whereS = j | k j ≤ Kis the set of solved cases. Lower values indicate tighter, more specific constraints. D.1.2STRATEGY QUALITY We conduct backtests forMgenerated strategies. Letc i be the initial net cash flow for strategyi. We classify strategies as Buyer (Net Debit,c i > 0) or Seller (Net Credit,c i < 0). LetP i (t)denote the cumulative PnL at time t∈ [0,T ]. Win Rate (WR). The proportion of strategies with a positive final PnL: WR = 1 M M X i=1 I(P i (T ) > 0).(15) We report this for the overall set, as well as distinct Buyer and Seller subsets. Risk Exposure (RE).To capture tail risk, we measure if the interim drawdown exceeds a fraction τ ∈0.5, 0.9 of the initial premium magnitude|c i |. The metric RE τ is defined as: RE τ = 1 M M X i=1 I min t∈[0,T] P i (t)≤−τ|c i | .(16) RE50 and RE90 correspond toτ = 0.5and0.9, respectively. High RE values indicate significant downside risk, which is particularly critical for Seller strategies that may otherwise show high win rates. D.2DESIGN OF BASELINES To validate the necessity of a domain-specific intermediate representation (OQL), we compare our framework against three representative paradigms: direct generation, context-grounded generation, and general-purpose query generation. 1. Free-Form Leg Generation (FFLG). This baseline represents the capability of an LLM to generate option strategies relying solely on its parametric knowledge, without access to external market data. The model receives the natural language intent and is instructed to output a structured JSON containing the option legs (e.g., expiry, strike, type). This baseline evaluates whether an LLM can "hallucinate" a correct strategy structure, serving as a lower bound for performance. 2. Partial-Chain Grounded (PCG).This baseline incorporates a Retrieval-Augmented Generation (RAG) approach. Alongside the user’s intent, the model is provided with a snapshot of the option chain (e.g., the top-Nmost liquid contracts around the at-the-money price). The model must select specific contracts from this context to construct the strategy. This evaluates the model’s ability to ground its reasoning in observed data, though it is limited by the context window and cannot perform complex filtering across the entire database. 19 Table 8: Comparison of baseline prompting strategies and output formats. FFLG relies entirely on the model’s internal priors to infer strikes. PCG grounds generation using a partial option chain, enabling direct contract selection. Text-to-SQL translates intent into an executable database query that retrieves valid multi-leg strategies. MethodInput Prompt (Abbreviated)Model Output (Snippet) FFLGSystem: You are an options trading strategy ex- pert. Given a trading intent, output a JSON strategy blueprint with no additional text. Available strate- gies include Iron Condor, Spreads, Straddles, and Butterflies. User: The stock is consolidating nicely around 240. IV is dropping. Sell an Iron Condor to cap- ture theta decay. I don’t expect a breakout this week. Underlying: TSLA. "strategy_type":"IRON_CONDOR", "legs": "SC":"strike":255, "LC":"strike":260, "SP":"strike":225, "LP":"strike":220 PCGSystem: You are an options trading strategy ex- pert. Given a trading intent and a grounded option chain table for reference, output a JSON strategy blueprint. The generated legs must correspond to contracts in the provided chain. Option Chain (Sample): | ticker | strike | type | close | delta | ... | | O:TSLA251219P00300000 | 300 | P | 19.95 | -0.29 | ... | | O:TSLA251219C00600000 | 600 | C | 2.75 | 0.06 | ... | User: I want to hold TSLA long-term but volatil- ity is too high. Zero-cost collar expiring next year. Cap upside at 600 and protect downside at 300. "strategy_type":"COLLAR", "strategy_details": "contract_ticker_LP": "O:TSLA251219P00300000", "price_LP":19.95, "contract_ticker_SC": "O:TSLA251219C00600000", "price_SC":2.75 (Contracts selected directly from provided chain) Text-to-SQLSystem / Instruction You are an expert in options trading and SQL. Your task is to generate one single, syntactically valid SQL query that searches for option-strategy candi- dates from an options-chain database based on a natural-language trading intent. You MUST output exactly one JSON object that strictly follows the predefined schema (no mark- down, no explanation, no extra text). User: TSLA may pause around 450 before the next leg up. Construct a call butterfly centered at 450 for late November. Prefer low net debit. "strategy_type":"BUTTERFLY_CALL", "sql":"SELECT l1.ticker AS contract_ticker_L1, s.ticker AS contract_ticker_S, l2.ticker AS contract_ticker_L2 FROM tsla_2025_11_10_C l1 JOIN tsla_2025_11_10_C s ON s.strike=450 JOIN tsla_2025_11_10_C l2 ON l2.strike=460 ORDER BY net_debit ASC LIMIT 10" 3. Text-to-SQL (SQL). This baseline represents the standard industry approach for database interaction. The model is provided with the full database schema (table definitions and column descriptions) and is tasked with translating the natural language intent into a standard SQL query. While SQL is expressive, it lacks high-level abstractions for financial logic (e.g., calculating spread costs or Greeks often requires complex joins and nested queries), making it a strong but challenging baseline for complex logical reasoning. EADDITIONAL RESULTS Token Usage.We evaluate the computational cost by measuring the token usage using DeepSeek- Chat, averaged across all cases in the dataset. The results are summarized in Table 9. In this appendix, we provide a granular analysis of model performance, highlighting key behaviors across different asset classes and validating the effectiveness of our proposed generation frameworks compared to the baseline. 20 High-Volatility Adaptation vs. General Stability. We observe a distinct divergence in model behavior relative to asset volatility. DeepSeek-Chat demonstrates exceptional adaptation to high- momentum assets, achieving dominant profitability on volatile tickers such as NVDA (Profit: 481.3, WR: 0.697) and TSLA (Profit: 984.0, WR: 0.800). This suggests an "aggressive" internal bias suitable for capturing large price swings. In contrast, Gemini 2.5 Flash exhibits superior stability and risk management on broader market indices and mature assets. It outperforms all peers on SPY (Profit: 552.4, ROC: 0.860) and maintains the highest win rate on AAPL (0.657). This dichotomy indicates that while DeepSeek-Chat excels in maximizing alpha in trending markets, Gemini 2.5 Flash offers a more robust baseline for general-purpose strategy construction. Table 9: Comparison of token usage and cache hit rates across different methods. Our method achieves the highest cache hit rate. Tokens MethodPrompt Compl.Total Hit Rate FFLG405.3440.60445.9462.1% Text-to-SQL1395.02260.20 1655.2281.9% OQL (Ours)2396.6087.56 2484.1688.5% PCG3079.33127.62 3206.9522.4% PCG + Full Table 7677.21127.97 7805.188.0% The Gap Between Syntax and Alpha. A critical finding from Table 13 is that high syntactic validity does not guaran- tee financial viability. Specialized coding models like DeepSeek-Coder and Qwen- Coder frequently achieve competitive Ef- ficiency scores (e.g., DeepSeek-Coder Eff: 0.773 on AAPL) but fail to translate this into consistent returns. For instance, on GOOG, Llama-3.1-8B and Qwen3-4B in- curred significant losses (-144.8 and -48.8, respectively) despite acceptable validity rates. This highlights that financial reasoning, the ability to identify causal market factors is a distinct capability from merely adhering to the OQL grammar. Smaller models often "overfit" to the syntax without encoding meaningful trading logic. Table 10: Performance metrics across five underlyings: Win Rate (WR), Risk90, Profit, and ROC. (All) Model AAPLGOOGNVDASPYTSLA WR Risk90 Profit ROC WR Risk90 Profit ROC WR Risk90 Profit ROC WR Risk90 Profit ROC WR Risk90 Profit ROC FFLG DeepSeek-Chat0.389 0.33324.73 -0.157 0.667 0.212 130.50 0.443 0.571 0.171 122.85 0.146 0.606 0.333 112.68 0.218 0.500 0.156-6.280.176 Gemini-2.5-Flash 0.432 0.32416.70 -0.123 0.611 0.194 152.70 0.175 0.611 0.111 118.00 0.558 0.735 0.294 195.43 0.476 0.514 0.29764.900.176 PCG DeepSeek-Chat0.425 0.350 160.03 -0.245 0.395 0.237 -60.03 0.023 0.462 0.154 356.88 0.149 0.564 0.231 397.64 0.622 0.364 0.364 -458.26 -0.392 Gemini-2.5-Flash 0.500 0.375 158.83 0.012 0.600 0.200 138.23 0.273 0.675 0.175 330.28 0.327 0.675 0.350 488.13 0.533 0.625 0.250 -167.88 0.459 PCG Full Table DeepSeek-Chat0.400 0.32541.03 -0.033 0.450 0.25011.90 0.044 0.462 0.25650.05 0.358 0.641 0.179 408.33 0.502 0.500 0.18876.06 -0.001 Gemini-2.5-Flash 0.500 0.22543.35 0.021 0.538 0.2820.65 0.096 0.700 0.050 321.43 0.930 0.750 0.325 391.70 7.087 0.500 0.32552.550.315 Text2SQL DeepSeek-Chat0.435 0.348 118.67 0.030 0.487 0.12383.26 0.047 0.543 0.215 392.87 0.974 0.632 0.301 571.22 4.882 0.419 0.248 116.57 0.186 Gemini-2.5-Flash 0.487 0.227 199.59 -0.001 0.451 0.18024.41 0.130 0.593 0.332 214.24 -0.049 0.550 0.231 472.20 0.360 0.561 0.204 543.71 0.024 Table 11: Performance metrics across five underlyings: Win Rate (WR), Risk90, Profit, and ROC. (All) Model AAPLGOOGNVDASPYTSLA WR Risk90 Profit ROC WR Risk90 Profit ROC WR Risk90 Profit ROC WR Risk90 Profit ROC WR Risk90 Profit ROC DeepSeek-Chat0.584 0.111 214.1 0.223 0.419 0.1517.60.204 0.642 0.163 486.8 0.646 0.456 0.33883.1 0.242 0.765 0.161 1006.4 0.491 DeepSeek-Coder 0.529 0.278 165.9 0.082 0.413 0.21848.30.343 0.508 0.204 290.3 0.177 0.496 0.292 314.6 0.119 0.557 0.184713.1 0.419 Gemini-2.5-Flash 0.645 0.114 188.8 0.314 0.455 0.123-19.7 0.026 0.583 0.196 425.1 0.219 0.554 0.346 602.3 0.319 0.526 0.164778.3 0.334 GPT-4.10.528 0.202 105.1 -0.101 0.473 0.1823.1-0.166 0.402 0.390 325.5 4.661 0.417 0.446 227.5 0.001 0.613 0.294704.7 0.332 GPT-4.1-Mini0.489 0.23898.5 0.152 0.417 0.241-9.9 -0.022 0.426 0.399 139.1 0.203 0.477 0.367 140.2 0.394 0.556 0.296656.2 0.513 Llama-3.1-8B0.460 0.25468.6 0.026 0.362 0.096 -126.4 -0.134 0.374 0.114-39.7 0.047 0.393 0.26320.3 -0.079 0.506 0.215134.0 0.052 Qwen-Coder0.433 0.205 161.4 0.123 0.447 0.116-30.9 -0.030 0.453 0.177 -123.6 0.067 0.479 0.311 158.5 0.621 0.573 0.236505.9 0.445 Qwen3-4B0.566 0.090 290.9 0.153 0.235 0.173 -117.1 -0.240 0.390 0.248-25.6 0.015 0.417 0.22173.7 -0.120 0.378 0.203302.0 0.097 Qwen3-8B0.528 0.208 182.1 0.125 0.393 0.167 -156.0 -0.157 0.498 0.236 292.4 0.115 0.473 0.47389.0 0.375 0.516 0.361335.7 0.581 Impact of Structured Generation (Baseline Comparison).Table 8 provides compelling evidence for the necessity of our structured Text2SQL framework over the unstructured FFLG baseline. The FFLG approach consistently resulted in poor risk-adjusted returns, with DeepSeek-Chat posting a negative ROC (-0.157) on AAPL and negligible profits on TSLA. By constraining the output space with OQL (Text2SQL), we unlock the models’ latent reasoning capabilities. This is most visible on SPY, where DeepSeek-Chat’s performance surged from a baseline ROC of 0.218 (FFLG) to 21 an extraordinary 4.882 (Text2SQL). This massive deltas confirms that the primary bottleneck for LLM-based quant research is not the lack of financial knowledge, but the inability to articulate it executably without a formal grammar. Prompting Paradigms: PCG vs. Text2SQL. While Text2SQL generally yields the highest peak alpha (e.g., DeepSeek-Chat on TSLA), the PCG method offers specific advantages for ensuring consistency. For Gemini-2.5-Flash, PCG significantly improved outcomes on SPY, achieving the highest recorded ROC in the appendix (7.087). However, PCG proved less stable for DeepSeek-Chat, which regressed to negative profits on TSLA (-458.26) under this paradigm. This suggests a model- specific preference: reasoning-heavy models like Gemini benefit from the step-by-step decomposition of PCG, whereas models with strong raw instruction-following capabilities like DeepSeek-Chat thrive under the direct constraints of Text2SQL. Table 12: Query execution validity (VR), strategy-OK rate (SR), efficiency (Eff.), and average row count (Rows) across five underlyings. Model AAPLGOOGNVDASPYTSLA VRSREff. Rows VRSREff. Rows VRSREff. Rows VRSREff. Rows VRSREff. Rows DeepSeek-Chat0.975 0.923 0.718 9.59 0.900 0.833 0.733 7.64 0.825 0.727 0.697 9.67 0.750 0.667 0.660 8.67 0.850 0.794 0.706 8.85 DeepSeek-Coder 0.750 0.833 0.773 9.70 0.650 0.769 0.754 8.65 0.575 0.478 0.748 7.87 0.675 0.481 0.763 9.33 0.650 0.692 0.738 9.39 Gemini 2.5 Flash 0.900 1.000 0.717 9.53 0.875 0.771 0.663 8.03 0.950 0.632 0.658 9.18 0.875 0.600 0.669 10.0 0.900 0.694 0.672 9.94 GPT-4.11.000 0.950 0.670 9.50 1.000 0.850 0.670 8.38 0.875 0.657 0.680 9.20 0.900 0.611 0.639 10.0 0.875 0.771 0.703 9.63 GPT-4.1 Mini0.975 0.949 0.769 9.74 0.975 0.795 0.703 8.05 0.925 0.486 0.697 8.78 0.900 0.556 0.722 9.92 0.950 0.658 0.726 9.71 Llama 3.1 8B0.950 0.895 0.758 9.05 0.925 0.730 0.686 8.14 0.900 0.306 0.722 8.83 0.850 0.441 0.718 9.79 0.900 0.472 0.622 9.42 Qwen-Coder0.850 0.971 0.741 9.18 0.850 0.735 0.641 8.00 0.675 0.593 0.674 8.67 0.725 0.621 0.703 9.24 0.625 0.680 0.616 9.76 Qwen3-4B0.875 0.943 0.777 9.86 0.800 0.719 0.731 8.41 0.650 0.423 0.731 9.42 0.650 0.423 0.692 10.0 0.625 0.680 0.744 9.64 Qwen3-8B0.850 0.971 0.671 9.38 0.850 0.824 0.659 8.50 0.775 0.677 0.600 8.45 0.775 0.677 0.677 8.77 0.725 0.793 0.600 9.10 Table 13: Performance metrics across five underlyings: Win Rate (WR), Risk90, Profit, and ROC. (Top Model AAPLGOOGNVDASPYTSLA WR Risk90 Profit ROC WR Risk90 Profit ROC WR Risk90 Profit ROC WR Risk90 Profit ROC WR Risk90 Profit ROC DeepSeek-Chat0.615 0.103 209.1 0.207 0.400 0.22922.10.000 0.697 0.152 481.3 0.686 0.531 0.406 104.8 0.358 0.800 0.114 984.0 0.529 DeepSeek-Coder 0.467 0.300 165.6 0.016 0.423 0.26932.70.074 0.478 0.261 216.7 0.011 0.577 0.346 309.0 0.189 0.577 0.192 793.7 0.402 Gemini-2.5-Flash 0.657 0.114 191.4 0.185 0.438 0.188-23.5 0.519 0.579 0.237 456.6 0.183 0.559 0.382 552.4 0.860 0.514 0.200 444.2 0.317 GPT-4.10.487 0.308 109.4 -0.072 0.474 0.26347.0 -0.216 0.417 0.389 223.7 0.065 0.429 0.486 272.5 0.105 0.571 0.257 684.9 0.277 GPT-4.1-Mini0.436 0.30875.5 -0.229 0.421 0.23714.60.888 0.500 0.42193.10.280 0.545 0.333 304.2 0.461 0.553 0.237 381.4 0.587 Llama-3.1-8B0.472 0.25050.6 0.022 0.368 0.184 -144.8 -0.157 0.417 0.083-9.00.014 0.353 0.3244.80.237 0.471 0.206 117.7 0.305 Qwen-Coder0.485 0.212 161.9 0.205 0.394 0.15223.8 -0.074 0.429 0.179 -129.5 0.182 0.464 0.321 186.0 -0.709 0.552 0.241 522.4 0.321 Qwen3-4B0.541 0.108 302.2 0.112 0.300 0.267-48.8 -0.240 0.346 0.231-36.7 -0.005 0.417 0.250 164.2 -0.121 0.385 0.269 284.3 0.054 Qwen3-8B0.583 0.222 217.8 0.139 0.484 0.129 -120.1 -0.052 0.556 0.222 264.7 0.274 0.483 0.51734.8 0.456 0.621 0.276 479.9 1.296 FCASE STUDY We present several case studies in Table 14 to illustrate the strategic advantages of our method over the baselines. In particular, we focus on two representative objectives: income enhancement and portfolio delta hedging. The results show that our approach consistently achieves lower tracking error, better-controlled risk exposure, and higher profit potential. Compared with baseline methods, our approach demonstrates a clear advantage in accurately trans- lating hedging intent into effective option strategies. As shown in Cases 2, 4, and 6, our method exhibits more precise inverse tracking of the underlying assets for hedging purposes. This capability is especially valuable for portfolio protection during periods of market stress, such as the market panic observed in April 2025. The improved hedging performance mainly stems from a better understanding of delta exposure and the ability of OQL to identify the most suitable hedging structures. In addition, Cases 1 and 3 highlight the effectiveness of our method in income enhancement scenarios using spread strategies. We observe that strategies generated by OQL maintain stable tracking behavior relative to the underlying assets while delivering enhanced income. This stability is largely due to OQL’s ability to directly leverage real-time option chain information, enabling the selection of well-balanced and market-consistent option combinations. 22 Table 14: Qualitative case studies of intent-to-strategy translation IDDescription (Title & Intent)Result (Visual & Comment) 1 Moderately Bullish Call Ratio Spread User Intent: “I’m bullish but cautious at these levels (350). Buy one ATM call and sell two OTM calls at 380. I want to profit from a slow drift higher, not a spike.” 2025-08-012025-08-052025-08-072025-08-112025-08-132025-08-152025-08-192025-08-212025-08-252025-08-272025-08-29 200 0 200 400 600 800 1000 1200 1400 Portfolio Close OQLSQLFFLGPCGStock 310 320 330 340 350 Underlying Price Comment: The model correctly interpreted the intent as a bullish call ratio spread, capturing upside from a gradual price increase while limiting gains under sharp rallies. The OQL strategy maintained positive returns during the underlying asset’s volatile periods without experiencing significant drawdowns. 2 Delta-Neutral Iron Condor User Intent: “NVDA is range bound 160-180 (Sep). Construct a Delta Neutral Iron Condor. Harvest theta.” 2025-09-102025-09-122025-09-162025-09-182025-09-222025-09-242025-09-262025-09-302025-10-022025-10-062025-10-082025-10-10 200 0 200 400 600 800 Portfolio Close OQLSQLFFLGPCGStock 170 175 180 185 190 Underlying Price Comment: The model successfully mapped the range- bound and income-seeking intent to a delta-neutral iron condor, prioritizing theta decay while maintaining bal- anced directional exposure. The OQL strategy demon- strates staggering explosive power for inverse profits during sharp declines in the underlying asset. 3 Support-Driven Put Spreads User Intent: “The trendline support at 200 is holding beautifully.I’m willing to bet my house it doesn’t drop below 195. Sell aggressive put spreads to finance a long position.” 2025-08-012025-08-042025-08-052025-08-062025-08-072025-08-082025-08-112025-08-122025-08-132025-08-142025-08-152025-08-182025-08-192025-08-202025-08-212025-08-222025-08-25 0 200 400 600 800 1000 Portfolio Close OQLSQLFFLGPCGStock 190.0 192.5 195.0 197.5 200.0 202.5 205.0 207.5 Underlying Price Comment: The model correctly interpreted the intent as a support-driven bullish strategy and mapped it to a call ratio spread (or equivalent bullish structure) that benefits from a gradual upside move while controlling downside risk. The OQL strategy perfectly synchronizes with the underlying asset’s upward momentum. Continued on next page... 23 Table 14: Qualitative case studies (Continued) IDDescription (Title & Intent)Result (Visual & Comment) 4 Theta Harvest (Consolidation) User Intent: “Consolidation phase between 200 and 220. IV is still rich. Sell an Iron Condor to harvest theta as we chop sideways.” 2025-05-152025-05-202025-05-232025-05-292025-06-032025-06-062025-06-112025-06-162025-06-202025-06-252025-06-30 0 250 500 750 1000 1250 1500 Portfolio Close OQLSQLFFLGPCGStock 196 198 200 202 204 206 208 210 Underlying Price Comment: The model successfully translated the range- bound and volatility-rich intent into a delta-neutral iron condor, explicitly optimizing for theta decay. The OQL strategy achieves rapid portfolio value recovery and maintains a consistent upward trajectory. 5 Trendline Support (Variant) User Intent: “It’s accelerating downside!180 is gone. Target is 160. Get me a vertical put spread for the next two weeks to maximize ROI on this crash.” 2025-03-182025-03-192025-03-202025-03-212025-03-242025-03-252025-03-262025-03-272025-03-282025-03-31 400 300 200 100 0 100 200 300 Portfolio Close OQLSQLFFLGPCGStock 155.0 157.5 160.0 162.5 165.0 167.5 170.0 172.5 Underlying Price Comment: The model interpreted the intent as a bearish momentum strategy. The OQL and PCG strategies exhibit similar behavior, achieving rapid growth in returns during sharp declines in stock prices. In contrast, FFLG is subject to extremely massive drawdowns. 6 Volatility Rich Condor User Intent: “Panic selling at 100! Volume is insane. I don’t know where the bottom is. Buy a Straddle. 30 days.” 2025-03-252025-03-272025-03-312025-04-022025-04-042025-04-082025-04-102025-04-142025-04-162025-04-212025-04-232025-04-25 1500 1000 500 0 500 1000 1500 Portfolio Close OQLSQLFFLGPCGStock 95 100 105 110 115 120 Underlying Price Comment: The model translated the intent into a high- volatility Straddle strategy. The OQL strategy demon- strates strong inverse profit characteristics. In contrast, the FFLG and PCG strategies suffer from prolonged neg- ative returns, while SQL remains stuck at zero returns for the long term. 24