Read project details
Can model-generated strategy proposals add value once risk, costs, and evaluation are controlled? This Python paper-trading research system keeps the LLM agents that propose and critique strategies separate from the deterministic code that enforces risk limits and evaluates performance.
A separate GKE serving demonstrator was verified on October 9, 2026: Qwen2.5-1.5B-Instruct served by vLLM 0.31.0 on one NVIDIA L4. Kubernetes requests the GPU, checks model readiness, and mounts a 20 GiB persistent model cache. Recorded CUDA execution and model generation verify the runtime; replacing the model pod preserved the cache marker and restored serving.
An authenticated FastAPI gateway validates fixed task contracts, limits prompt and output sizes, checks the backend token count, and enforces a 30-second deadline with disconnect cancellation. It admits eight requests at a time and returns HTTP 429 for excess requests. The public repository includes the gateway, manifests, runbook, benchmark driver, and runtime records.
The concurrent benchmark retains 128 measured attempts and excludes four warmups. At concurrency eight, 32 of 32 requests succeeded at 10.864 successful responses per second, with a successful-response p95 of 791 ms. At concurrency sixteen, eight succeeded and 24 returned HTTP 429. This was one repeated short sentiment prompt, not a varied financial-news corpus; client timings include the Kubernetes port-forward, network path, and validation.
Five paper strategy books share a universe: a rules-based control, news sentiment, LLM proposals, post-filing event research, and a combined book. Anthropic/Ollama and deterministic clients remain available; vLLM is an opt-in provider. A separate proposer/critic/portfolio demonstration used explicitly synthetic inputs and the deterministic risk gate, without submitting orders or measuring investment returns. Its output passed the JSON contracts but missed semantic instructions: four rules instead of three, a critic that largely repeated them, and two positive portfolio weights when opposite signs were requested. Those failures identify the next evaluation work.
The evaluation policy requires at least 60 trading days and p below 0.05 on a paired Diebold-Mariano test before a superiority claim. That threshold alone does not establish fair risk-adjusted comparisons or a demonstrated edge; the research history includes corrections to earlier results.
In the public Python research code, the risk wrapper rejects non-finite weights and symbols outside the briefing universe, clips position and liquidity exposures, scales gross exposure, and throttles turnover against the current book. The opt-in vLLM adapters record successful model calls separately from deterministic heuristic or lexicon fallbacks. These controls constrain proposals; their existence alone does not establish a strategy edge.
Limit of claim: The serving benchmark uses one repeated short prompt in a brief isolated run. It establishes neither production capacity nor trading performance. The demo was cleaned up after verification; the paper-book history is not a record of continuous vLLM service.
View repository
Serving code
Benchmark & scope
GPU runtime record
Deployment runbook