-
-
Live demo: Nemotron on Token Factory proposes a BTC zigzag; it passes the gate with flags and is drawn
-
Live CLI run on Token Factory: BNB impulse rejected, H2 wave 4 overlaps wave 1, nothing drawn
-
Elliott Wave has hard rules
-
The problem: AI draws counts that break the rules
-
Why we chose Nemotron: open, small, fast, served by Nebius Token Factory
-
The fix: a deterministic gate between model and chart
-
tradecharts.app, the live desk where this gate runs: ETH weekly confirmed map
Inspiration
AI charting tools draw whatever the model says. Elliott Wave analysis has hard rules — wave 2 never falls below the start of wave 1, wave 3 is never the shortest, wave 4 never enters wave 1's territory — and a language model will happily break them while sounding certain. We run a live charting desk, TradeCharts, and learned the hard way that a confident wrong count on a chart is worse than no count. So we built the engine that refuses.
What it does
wavecount takes a weekly price tape and returns a verdict on an Elliott Wave count:
- Measure (code). Deterministic zigzag swings, working range, Fibonacci levels, and a per-window impulse-arithmetic table. No model.
- Propose (Nemotron). NVIDIA Nemotron 3 Nano, served on Nebius Token Factory, reads those measured facts — never the chart — and proposes a count as strict JSON. Two samples at temperature 0.2.
- Gate (code). A 35-rule deterministic validator checks every sample. A hard-rule break is rejected with the rule named, and nothing is drawn. Advisories (off-catalog Fibonacci ratios, a count that doesn't span the range) make it flagged.
- Confirm (person). A passing count carries its flags; a human decides.
Try it at demo.tradecharts.app: pick BTC, ETH, BNB, SOL or DOGE and press Run. Every Token Factory call streams onto the page with its URL, latency, token counts and completion id. On BNB, Nemotron typically proposes a five-wave impulse whose wave 4 overlaps wave 1 — the gate rejects it (H2) and the chart stays clean. On BTC it reads a zigzag that passes with flags, and the count is drawn.
How we built it
- Engine: TypeScript. One OpenAI-compatible provider interface; Token Factory (
api.tokenfactory.nebius.com/v1,nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B) is the default.--traceprints every call's endpoint, latency, tokens and completion id. - Prompt contract: the model gets numbered swings with exact epoch timestamps and a precomputed impulse table, so classification is reading, not guessing. It must copy pivot prices and times exactly from the list.
- Validator: the production gate from the TradeCharts desk, copied unmodified with its 72 unit tests.
- Live demo: the same engine, unchanged, in a Cloudflare Worker. The Token Factory key is a server-side secret; runs are rate-limited per visitor and capped per day with a Durable Object, and progress streams to the browser over server-sent events.
- Evidence: live Token Factory transcripts with completion ids are committed in
evidence/; CI runs typecheck and tests on every push.
Challenges we ran into
- Reasoning budget. Nemotron 3 Nano reasons in a separate channel before it writes content; with a small
max_tokensthe JSON never arrived. A 16k budget fixed it. - Chronology and copy fidelity. Early proposals slipped pivot times. Rendering each swing's exact epoch ms in the prompt eliminated those failures.
- Five vs three. The model over-reached for impulses on corrective tapes. A deterministic impulse table ("no valid impulse window in range") made it read a three when that's what the tape shows — and when it still forces a five, that's exactly what the gate is for.
- Nondeterminism. The same tape can come back as a rejected impulse one run and a flagged zigzag the next. We sample twice, rank deterministically, and our end-to-end tests assert verdict classes, not exact text.
Accomplishments that we're proud of
- The full spectrum lands live on Token Factory: rejected-with-named-rules (BNB, SOL) and flagged passes (BTC, ETH).
- A rejected count is never output as a pass — the property comes from the pipeline, not from hoping the model behaves.
- A public, rate-limited live demo that runs the real engine, not a recording.
What we learned
Small, fast models are excellent at narrow reading tasks when you hand them measured facts and a strict contract — and the right place for trust is a deterministic gate after the model, not a longer prompt before it.
What's next
- Bring Nemotron on Token Factory into the TradeCharts desk's Propose action (today the desk shares this gate but runs a different hosted model).
- Recorded-response fixtures so the parser and gate are tested without network.
- Try Nemotron 3 Super / Ultra for the larger-degree (macro) count, keeping Nano for the fast first pass.
Built during the hackathon: this repository, the Token Factory provider layer, the measure stage and impulse table, the prompt contract, the two-sample pipeline, the CLI with --trace, the e2e matrix, CI and the live demo were built during the submission period. The validator predates it: it was copied unmodified from our TradeCharts desk, with its tests.
An interpretive map — not a signal, not advice.
Built With
- cloudflare-workers
- durable-objects
- github-actions
- nebius-token-factory
- node.js
- nvidia-nemotron
- typescript
- vitest
Log in or sign up for Devpost to join the conversation.