Search papers, labs, and topics across Lattice.
This paper introduces Option Query Language (OQL), a domain-specific language for representing option trading strategies, to improve the reliability of LLMs in translating natural language intents into executable option strategies. By using OQL as an intermediate representation, the approach constrains the LLM to semantic parsing rather than free-form code generation, which is then validated and executed by a deterministic engine. Experiments on a new dataset demonstrate that this neuro-symbolic pipeline significantly enhances execution accuracy and logical consistency compared to direct generation methods.
LLMs can now reliably translate natural language into executable option trading strategies, thanks to a new domain-specific language that constrains their output to verifiable semantic parses.
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.