1 of 6

HACKATHON PROJECT · AI × FINTECH · PAPER TRADING

VERITAS

The AI trading agent that knows when not to trade.

Market data

›

ML + Conformal

›

LLM agents

›

C++ risk gate

›

Hash-chained audit

ML proposes. LLMs advise. The C++ engine decides.

▶ Watch the 3D animation

himanshu-heist.github.io/animation

2 of 6

Why AI trading bots fail, and the one rule that fixes it

VERITAS · Paper trading only, not investment advice

2

FAKE NUMBERS

LLMs hallucinate

A model can invent numbers, or be hijacked by a fake headline.

₹5,527 LOST

Overtrading burns cash

Round-trip cost is 0.146%. Trading every day lost ₹5,527 in 243 days.

NO AUDIT TRAIL

No proof

Nobody can show what the bot saw, or why it decided.

The VERITAS rule: only code can approve a trade

LAYER 1 · LightGBM + conformal

ML model

Proposes direction and an edge estimate. Knows when it is unsure.

Can trade? NO

LAYER 2 · Groq gpt-oss 20b / 120b

LLM agents

Explain, challenge, and may only agree or WAIT. They can never flip a trade.

Can trade? NO

LAYER 3 · Final authority

C++ risk engine

Cost, uncertainty, risk and kill-switch gates. Isolated in its own process.

Can trade? YES, only this

Four principles: abstaining is a feature · LLMs reason, code decides · fail closed · everything auditable (SHA-256 hash chain).

3 of 6

How it works: from market data to a paper trade

Only step 6 can approve a trade. Everything before it is advice.

VERITAS · Paper trading only, not investment advice

3

1

Market data

12 frozen series: NIFTY, 4 stocks, S&P, Nasdaq, Nikkei, crude, gold, USDINR, VIX

2

DataClock

Point-in-time firewall. No future data can leak (no lookahead).

3

ML + Conformal

LightGBM with 90% prediction sets and a cost-aware edge.

4

Cue + News

gpt-oss-20b explains the signal and reads headlines behind an injection filter.

5

Strategy + Red-team

gpt-oss-120b may agree with ML or WAIT. Never flip. Regime and risk agents only shrink size.

6

C++ Risk Engine

Final authority. Six gates, kill switch, position clip.

7

Audit chain

SHA-256 hash-chained log. Any edit shows BROKEN.

8

Outputs

Firebase dashboard, Gmail alerts, GitHub Actions every 30 min.

Every verified subscriber gets a virtual paper account. Today's decision card is sorted into:

AUTO

All gates pass with a strong edge

Paper trade filled automatically, reported in the digest.

ASK

Borderline edge, or held back only by the red-team veto

Approval email. Filled only if the subscriber approves.

NONE

Negative or sub-cost edge, or ambiguous prediction

Nothing is traded and no email is sent.

4 of 6

The LLM can never place a trade

Every proposal passes six gates in order. Any gate fails: ABSTAIN.

VERITAS · Paper trading only, not investment advice

4

1

Edge < cost

Edge must beat the 0.146% round trip

2

Conformal

Prediction set must be a single class

3

VIX stress

High volatility blocks entries

4

Red-team veto

HIGH objection means ABSTAIN

5

Disagreement

Clashing agents cannot trade

6

Kill switch

2% daily loss, 8% drawdown, >5 orders/s

Any gate fails, any error or stale data → ABSTAIN (fail closed). Paper order only if all six pass.

Injection test

A fully hijacked LLM demands a max-size BUY. The C++ gate still says ABSTAIN.

Tamper test

Change one byte in the audit log and verification returns BROKEN.

No lookahead, by design

DataClock: a row is visible only if available_at ≤ 08:30 IST decision time. Backward as-of join, leakage tripwires and tests prove it.

5 of 6

Fewer trades, smaller losses

Net loss over 243 test days (paper money, costs included). Shorter bar is better.

VERITAS · Paper trading only, not investment advice

5

186/243

days VERITAS chose to abstain

−82%

cost drag cut vs trading every day

5 of 6

red-team vetoes were right, saving ₹395

OK

audit chain verified over 581 log lines

Honest note: every strategy is still negative. The win is avoiding losses, and proving each decision.

LIVE LOG 26–30 Oct: five days, five ABSTAINs

Conformal set ambiguous, or edge (−0.048%) below the 0.146% cost. NIFTY actually returned +0.386% on 30 Oct. Reflection verdict: 2 days GOOD, 3 days BAD (missed upside).

6 of 6

THANK YOU · INTERACTIVE · 3D · NARRATED

VERITAS knows when not to trade.

A system that proves every decision it makes, including the days it does nothing.

Live dashboard

Daily decision card, agents, vetoes, lessons, and the Ask VERITAS chat.

Source code

Python, C++17, tests and CI workflows.

3D animation

Ten scenes, narrated 4-minute tour or step by step.

Scan for the 3D tour

Stack: Python · LightGBM · Pydantic · Groq gpt-oss-20b/120b · C++17 + OpenSSL · Firebase · Cloudflare Worker · GitHub Actions · yfinance

Next: richer features and intraday data, more assets, a bigger edge. Paper trading only. No real orders, no broker connected. Not investment advice.