Inspiration
A trading rule is only useful if a system interprets it correctly and follows it when a session goes badly. We focused on traders who can describe an intraday strategy but cannot easily turn it into something they can inspect and test without writing code.
What it does
TradeAgent AI turns plain-English rules into a structured, reviewable paper-trading strategy. The user reviews the interpreted fields, resolves clarification questions, and approves one exact strategy version before simulation.
The demo uses the fictional NG_SIM instrument and synthetic candles. Users can inspect hypothetical scenarios, replay a session, and audit each decision. Our central demo is a two-loss lock: after two completed losing positions, the engine refuses the next entry and records why.
Track: Money Intelligence. All prices, trades, accounts, and results are simulated. Rule conformance is not evidence of profitability.
How we built it
The interface uses React, TypeScript, Vite, Tailwind CSS, and Radix/shadcn components. A Python FastAPI backend validates the shared StrategySpec with Pydantic, stores strategy versions, and runs the deterministic simulator.
We use the Nicrron API through the OpenAI Python SDK to translate free text into proposed strategy changes. The model can propose a draft; it cannot approve a strategy or place an order. Protected fields are filtered, invalid values become clarification questions, and unresolved questions prevent approval. If the model is unavailable, the interface labels the preset fallback and does not let it masquerade as an interpretation of the user's text.
PRISM by Block Convey provides Knowledge Base retrieval and traces for the strategy-translation step. The v2 prompt includes retrieved source snippets, explicit unit rules, and instructions to ask instead of inventing values. Trace metadata identifies the prompt version, and retrieval context is attached as a tool span. Deterministic engine decisions remain in a separate local audit.
Challenges we ran into
Ambiguous units and unsupported requests are dangerous translation errors. “4 points” must not silently become “4 ticks,” and an unsupported trailing stop must not be approximated with a different setting. We added schema validation, protected fields, clarification gates, and an explicit distinction between interpreted values and demo defaults.
We also had to keep external tracing failures from breaking the user flow. PRISM errors are reported honestly while the local audit remains available.
Accomplishments
We built a complete review-and-approve workflow around the model rather than allowing generated text to control execution. The same deterministic risk gate handles the simulation and the two-loss test fixture. The interface exposes rule decisions, blocked entries, synthetic-data labels, and the source of each strategy proposal.
The repository also includes 63 evaluation inputs and a v1/v2 comparison harness covering clear instructions, ambiguous units, unsupported features, and invented values. These are evaluation tools, not a claim that all model runs passed.
Validation
On the reviewed main commit (2421450), all 155 automated Python tests passed. The frontend production build and lint checks also passed. These checks use mocked external services and do not establish live model accuracy.
What we learned
Translation quality and execution discipline need separate checks. A strategy can follow its approved rules perfectly while still being based on a mistaken interpretation. We therefore evaluate the model's translation separately from the engine's rule conformance.
What's next
Broaden supported strategies and improve persistence, while keeping human approval and deterministic enforcement in place.
Limitations
This is a hackathon prototype with in-memory strategy state. It has no broker connection, real orders, historical market data, or verified investment performance. Fees, slippage, tick values, and session rules are disclosed demo assumptions.
Team
- Dennys Antunish — frontend, user experience, and project presentation.
- Shawn Bi — backend, strategy translation, and deterministic simulation.
Built With
- fastapi
- nicrron
- prism
- python
- react
- typescript
Log in or sign up for Devpost to join the conversation.