AI-Native Pre-Trade Risk Engine
Created by Ningsong Shen on Mar 1, 2026
Demo Video
Written Explanation
What the human can now do
A self-directed retail investor can now make higher-quality trading decisions by saying in plain English, “I want to buy $15,000 of NVIDIA”, and receiving institutional-caliber risk analysis before a single share changes hands. Today, retail investors fly blind: they see price and maybe a P/E ratio, then click buy. This app runs a progressive pre-trade analysis — decomposing ETF holdings to expose hidden sector concentration, computing Value at Risk before and after the trade, and stress-testing against historical crashes and hypothetical shocks. Results appear as inline charts with plain-language explanations, not dashboards designed for professionals. The investor sees the full picture, then decides.
What AI is responsible for
The AI handles two things: interpreting intent and orchestrating analysis. It reads natural language to detect trade intent, decides which risk tools to invoke and in what order, and translates raw calculation outputs into contextual explanations calibrated to the user’s literacy. It also manages conversation flow — pacing analysis across stages, offering quick-action buttons, and handling tangential questions about financial concepts.
A critical architectural constraint: the language model never computes numbers. All financial math — VaR, stress-test impacts, position exposure, ETF decomposition — runs in deterministic Python functions. The AI calls these tools and explains their results. The conversation is probabilistic; the math never is.
Where AI must stop
The AI cannot decide how much risk is right for your life. It can quantify that adding $15K of NVIDIA pushes your tech concentration to 45% and your 95% VaR to $18K. It cannot know whether that’s acceptable given your mortgage, your children’s timeline, or your sleep at night. Setting risk boundaries is the irreducibly human act. The system enforces this architecturally: every trade requires explicit human confirmation through a review modal. The AI informs but never executes autonomously — this is the gap between “do it for me” and “do it blind.”
What would break first at scale
Intent interpretation. With one user in a demo, the AI reliably parses “I want to buy $15K of NVIDIA” into a structured trade. At scale, edge cases multiply: “put everything into tech,” “double my NVIDIA,” “I’m feeling bearish on Canada.” When the model guesses wrong, the risk analysis runs on the wrong trade. The confirmation modal catches this before execution, but not every user will scrutinize pre-filled details. A structured intent-confirmation step — “Just to confirm: buy $15,000 of NVDA?” — before running analysis would close that gap.
More subtly, the AI explains risk results in natural language, and at scale you’d hit cases where it over-reassures or misframes a stress-test result. The math is deterministic, but the narrative is not — and the narrative is what retail investors act on. Mitigations here include templated language for risk summaries, LLM-as-judge evaluation layers that flag overly optimistic framing, and mandatory display of raw numbers alongside any AI commentary.
My AI Background
It all started 7 years ago with my choice of major in university: data science, where I studied computer science and statistics. In later years, when ChatGPT became available, I began using it heavily to support my coursework and learning process. After graduating, I moved into industry as a trader and now work as a trading risk manager. Even though I am not an engineer by title, I use AI whenever possible and find it extremely useful for coding support, summarization, and research. I have improved our internal risk tools with AI-generated code, speeding up processes, fixing bugs that we never had the time to fix before, and documenting code for new joiners. Outside of work, I also use AI to answer most of my questions instead of plain web search, and I am "vibe coding" (or what I'd call real coding nowadays) personal language learning tools for my own use.