-
-
1. The problem and promise: Compare selling now with the next holding milestone—without turning the result into a recommendation.
-
2. The ESPP decision threshold: The engine finds the lowest future price at which waiting matches or exceeds the proposed-sale outcome.
-
3. (1) Transparent scenario comparison: Every scenario is independently calculated using source-backed 2025 federal and California rules.
-
3. (2) Transparent scenario comparison: Every scenario is independently calculated using source-backed 2025 federal and California rules.
-
4. Governed GPT-5.6 explanation: GPT-5.6 selects only applicable, approved explanation blocks; the deterministic engine financial value.
-
5. (1) Breadth and usability (desktop): The same governed workflow supports vested RSUs and works across desktop and mobile.
-
5. (2) Breadth and usability (mobile): The same governed workflow supports vested RSUs and works across desktop and mobile
Inspiration
Employees often know that waiting may improve the tax treatment of an equity sale, but that is only half the decision. Waiting also exposes the shares to market risk. Traditional tax tools explain classifications and calculate taxes. Generic AI may provide fluent but unverifiable advice. Neither clearly answers the practical question: How far could the stock fall before the modeled tax benefit of waiting disappears?
The insight The useful output is not “sell” or “wait.” It is a neutral break-even threshold that helps the individual understand the trade-off between modeled tax treatment and stock-price risk.
What it does
That is why I built Equity Timing Lab with Codex. The application:
- Models a proposed ESPP or vested-RSU sale.
- Compares it with the first relevant holding milestone.
- Calculates incremental federal ordinary-income tax, preferential capital-gain tax, NIIT, and California tax.
- Finds the lowest cent-level future stock price at which the wait scenario’s estimated net proceeds meet or exceed the proposed-sale outcome.
- Shows the proposed and wait scenarios, tax drivers, official sources, assumptions, and limitations.
- Optionally asks GPT-5.6 to explain the verified result without authoring financial values or making a sell, hold, buy, or wait recommendation.
- Includes one-click synthetic ESPP and RSU examples so judges and users can explore the complete workflow without entering personal financial data.
How we built it
Equity Timing Lab separates authoritative computation from probabilistic explanation. The implementation includes:
- A deterministic TypeScript calculation engine.
- Source-backed ESPP and vested-RSU state machines.
- A versioned Verified Result contract.
- A source-backed 2025 federal and California tax profile.
- High-precision decimal arithmetic with independently rounded two-decimal display values.
- A cent-level break-even solver with explicit verification at the returned price and one cent below it.
- A server-only OpenAI Responses API integration using GPT-5.6 and Structured Outputs.
- A minimized verified-value catalog that prevents GPT-5.6 from authoring financial values.
- A centralized applicability policy, independent semantic verification, deterministic rendering, and deterministic fallback.
- A responsive and accessible Vinext/Next.js interface deployed through OpenAI Sites.
I used Codex throughout the project to help translate tax-rule decisions into versioned contracts, design the calculation architecture, implement the engine and UI, build the test suite, investigate defects, audit privacy and dependency risks, and complete deployment.
I retained the key product decisions: limiting the supported scope, choosing the approved tax-rule interpretations, separating exact and displayed values, keeping the output neutral, and defining the bounded role of GPT-5.6.
Challenges we ran into
Translating tax authority into deterministic software Tax rules are written for human interpretation, not as executable specifications. I needed to define explicit date boundaries, compensation and basis rules, capital character, selling-fee treatment, and unsupported states. Each implemented rule had to map to an official source and behave consistently at edge cases such as anniversary dates, leap years, fractional shares, and capital losses.
Defining the break-even threshold correctly The break-even result could not be produced by a simple fixed-rate formula because the complete tax scenario changes across brackets, capital-gain stacking, NIIT thresholds, and California rules. The solver therefore evaluates the complete wait scenario on an integer-cent price grid.
Preserving precision without overwhelming the user Financial calculations must reconcile exactly, but users expect monetary values to display as dollars and cents. The engine retains high-precision decimal values for calculations, comparisons, and reconciliation while every user-facing monetary value is rendered with explicit half-up two-decimal formatting.
Building trust without turning the product into advice The application needed to explain a complicated financial trade-off while refusing to make the decision for the user. This required neutral language, official-source links, visible limitations, synthetic sample data, and an explicit educational-use disclaimer.
Delivering within a short timeline I learned about OpenAI Build Week only three to four days before the deadline. Codex made it possible to move from problem definition and architecture through implementation, testing, audit, responsive design, and deployment without abandoning the correctness and governance requirements.
Accomplishments that we're proud of
- Delivered a complete public application within a very short Build Week timeline.
- Built deterministic ESPP and vested-RSU comparison workflows rather than a static demonstration.
- Produced an explainable cent-level break-even threshold with an independently verified one-cent boundary.
- Integrated GPT-5.6 without allowing the model to calculate, invent, or modify authoritative financial values.
- Added human-readable links to the official authorities supporting each tax component.
- Created an accessible responsive experience that works across desktop, tablet, and mobile.
- Completed 181 automated tests across 22 test files, along with type checking, linting, production builds, security review, and deployment verification.
- Successfully completed my first Codex project and used it throughout architecture, implementation, testing, audits, and deployment.
What we learned
The best financial decision tool may refuse to decide Equity Timing Lab deliberately provides a comparison rather than a sell, hold, buy, or wait recommendation.
The primary complexity is source-of-truth governance The hardest part was not just the arithmetic. It was deciding exactly which tax rules the product would support, grounding those decisions in the right sources, and making sure every layer used the same interpretation.
Exact computation and display precision are different concerns Calculations use high-precision decimal arithmetic. User-facing values are independently rounded to two decimals, while exact values remain the source of truth for reconciliation and break-even comparisons.
AI is strongest when bounded by verified state GPT-5.6 adds value by selecting which verified facts and material drivers need explanation. It does not perform the authoritative arithmetic or author financial values.
Trust is a product feature Official-source links, privacy-safe execution, explicit limitations, accessible validation, synthetic samples, and neutral language are part of the core product. Deterministic computation decides the numbers; probabilistic intelligence explains them.
What's next for Equity Timing Lab
The next steps are professional tax review, additional tax years and jurisdictions, and carefully selected additional equity instruments. I would also expand the coverage for more break-even and rounding combinations, and continue evaluating the governed explanation policy across additional supported states.
Built With
- claudflare
- codex
- gpt5.6
- javascript
- nextjs
- openai
Log in or sign up for Devpost to join the conversation.