Dev.to AI πŸ€– Ai πŸ‘ 2 πŸ“– 4 min read

I Built a Financial AI That Can't Edit Its Own Track Record

_The problem with "our AI beats the market" Every trading tool claims results. Most show you a screenshot or a backtest, and both are easy to fake. A backtest can be tuned until it looks perfect, and a screenshot can hi

_The problem with "our AI beats the market"

Every trading tool claims results. Most show you a screenshot or a backtest, and both are easy to fake. A backtest can be tuned until it looks perfect, and a screenshot can hide the losing trades.

When I decided Vicquant needed to prove it works, I had to ask a harder question: how do I make it impossible for me to cheat, even if I wanted to?

This article is about the answer: a public, tamper-evident signal ledger and a paper-trading agent whose rules were frozen before it made a single call._

Rule 1: Freeze the rules before the game starts

Cherry-picking happens when you can change the rules after seeing the results. So before any signal was recorded, I wrote a pre-registration and froze it:

  • Universe: 45 large-cap US stocks across 10 sectors, plus SPY as the benchmark (with an automatic expansion rule to the Top 100 if fewer than 60 signals occur in 30 days)

  • Friction: 40 bps round-trip trading cost (broker fee, slippage, and a paper-vs-live haircut) deducted from every trade

  • Capital: A fixed $100k paper account

  • Position limits: Max 5% per position, max 10 concurrent positions

  • Kill switch: Trading halts for the day if portfolio equity drops 3% from the previous close

  • Definition of a win: Net return strictly above zero, after costs

  • Minimum sample: No win rate is shown until at least 30 signals have resolved

That last rule matters most. A "100% win rate" from 3 trades is noise, so the system suppresses headline win rates and returns "insufficient data" until there is enough data to mean somethingβ€”and even then, pairs it with a 95% Wilson confidence interval and coin-flip luck probability.

Rule 2: A ledger that exposes tampering

Every signal Vicquant produces goes into a hash-chained ledger. This works like a blockchain without needing a blockchain:

  • Each entry is canonically serialized and turned into a SHA-256 fingerprint (a hash).
  • Each entry also stores the fingerprint of the entry before it.
  • Database triggers block UPDATE and DELETE on ledger tables.
  • If anyone edits or deletes an old entry, its fingerprint changes, which breaks every entry after it.

You can't quietly fix a bad call from last month. The chain would visibly break.

I also built a daily stamping layer formatted for OpenTimestamps so chain head digests can be anchored to Bitcoin calendars to prove when a signal existedβ€”without pretending a timestamp proves a prediction was right.

Finally, there is a standalone verifier using only the Python standard library. You don't have to trust my serverβ€”you can download the ledger export and verify the entire hash chain yourself.

Rule 3: Honest scoring

A resolver closes each signal idempotently against post-close bars and scores it against the frozen rules. Beside it run two more pieces:

  • Baselines: Every result is compared against simple alternatives over the exact same holding windowβ€”holding the underlying asset, holding SPY, and a deterministic SHA-256-seeded random-entry baseline under the same 40 bps friction. Beating zero isn't impressive if the market itself went up.

  • Decay monitor: Strategies stop working over time. When a rolling 30-trade window falls below the lower bound of its walk-forward 95% confidence interval, the monitor permanently flags that signal type as RETIRED in an append-only table instead of deleting it.

The paper-trading agent

The agent is built to trade on Alpaca's paper environment only startup and every order dispatch refuse to run unless the endpoint is paper-api.alpaca.markets. It enforces deterministic client order IDs, position sizing, the 5% / 10-position limits, and the 3% daily loss kill switch. It can't touch real money, and it can't change its own constraints.

Measuring whether it actually helps people

A good signal isn't the same as a good outcome for a user. So I added consent-based outcome instrumentation using a stepped-wedge rolloutβ€”every cohort gets standard protection while personalized features roll out in staggered waves so outcomes can be compared without denying anyone basic safeguards. It also enforces a minimum cohort size of 30 and an automated harm stopping rule: if opt-outs or overdrafts exceed baseline by more than 15% ($p < 0.05$), that arm is suspended.

What people can see

The proof layer exposes:

  • A public proof page (built in React and backed by rate-limited, cached FastAPI endpoints)
  • A streamed CSV export of every signal
  • Private monthly statement formatting
  • A zero-PII testimonial API with affiliation and zero-incentive attestation

I covered the ledger, resolution, paper agent, outcome instrumentation, compliance copy guards, and proof surfaces with 86 automated tests, all passing.

What's still unfinished

I'd rather say this up front:

  • React proof page view: Done.

  • Production daily scheduler (planned for 16:30 ET after the 30-minute post-close bar finality buffer): In progress (the idempotent scheduler, NYSE calendar, and heartbeat checks are built and tested, but the scheduler route still needs to be mounted in main.py, wired to a Render cron job, and switched from the mock broker adapter + sample prices to live market bars).

  • Alpaca paper credentials & live OpenTimestamps submission in production: In progress (the paper-only AlpacaPaperAdapter is implemented and render locks the base URL to paper-api.alpaca.markets, but production API keys, live OTS calendar network submission/upgrading, and real-ledger wiring for monthly statements still need to be connected).

No results yet: the ledger needs live scheduled runs and time to reach its 30-signal minimum before I show a win rate. I won't publish numbers until then.

Why this matters beyond Vicquant

Any AI product making performance claims should be able to answer three questions:

  • Were the rules fixed before the results?

  • Can anyone verify the record without trusting you?

  • Does it say "not enough data" when that's the truth?

I wanted Vicquant to be able to.

_**Looking for beta testers

I'm recruiting new beta testers. If you invest, trade or just want to stress-test a system that shows its work, I'd like your feedback, especially on the proof page. Comment or DM me**_

πŸ“° Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.