Our Work → Systematic Trading
BTC Microstructure BotNo AI, no discretion — pure quantitative market microstructure, engineered for real capital.
An automated system that predicts short-horizon Bitcoin price direction using five weighted statistical signals, a 14-point risk gate, and an append-only audit trail on every decision. No LLM in the decision path — deterministic, explainable, and verifiable after the fact.
15
Risk Checks
5min
→ 1d
Time Range
No AI
/ LLM
Decision Model
5
Weighted Signals
1,100+
Automated Tests
0
Replay Mismatches
The Opportunity
Polymarket runs five-minute, fifteen-minute, hourly, four-hour, and daily "Will BTC be up or down" markets, each resolved against a real price oracle. Most participants trade on gut feel or lag — giving a systematic, data-driven approach a structural edge.
The differentiator is not having a strategy. It is engineering a system rigorous enough to be trusted with real capital unattended: one where every decision is explainable, every rejection is logged, and no edge case can cause an unintended order.
This system is the answer to that constraint: a fully deterministic, auditable trading engine that makes defensible decisions and can prove every one of them after the fact.
What Was Built
The Model
The fair-value engine reads sub-second price data and combines five independent signals into a single probability estimate for the direction of the next move. Confidence deliberately decays as the window's remaining time shrinks — early signal matters more than late noise.
Distance from the market's opening price, scaled to how much time is left. A 0.5% move with 4 minutes remaining means something different from the same move with 20 seconds left — the model accounts for this statistically.
Recent price velocity from Binance and Coinbase tick data, normalised across the current window to avoid curve-fitting to a single timeframe.
Standard MACD histogram on BTC spot, used as a directional bias filter. It agrees or disagrees with the other signals — it never trades alone.
Overbought/oversold reading against the current bar's range. Catches mean-reversion setups that momentum signals miss at short horizons.
Live resting liquidity on the Polymarket CLOB itself — which side has more capital waiting. Structural liquidity imbalance is the closest thing to a smart-money signal available in these markets.
All five signals are combined via Bayesian update into a single probability estimate. The system also reads real-time data from ETH, SOL, and XRP as cross-asset confirmation — if the broader crypto market is moving against the BTC signal, confidence shrinks proportionally.
No AI in the Decision Path
"No AI in the decision path" was a design principle from day one. It is now a build-time check: an automated scan walks every module in the codebase and fails the build if any machine-learning or LLM library is imported anywhere, with no exemptions.
The same scan enforces that wallet and signing code cannot appear outside the small set of modules permitted to handle it, and that the monitoring dashboard — the only publicly reachable component — cannot reach the wallet at all.
The check currently finds nothing, which is the point. It was written while the codebase was clean, so that the guarantee is mechanical rather than a matter of everyone remembering.
Explainability
Every trade the system considers — taken or not — is logged with the complete state that produced it: every signal's raw reading, the order-book snapshot, the prevailing trend context, and the exact risk-gate outcome. Nothing is inferred or reconstructed after the fact; it is the actual input to the actual decision, stored at the moment it happened.
Any single trade can be pulled up and fully explained — not "the model said so," but the specific numbers, in order, that led to it. For a system trading real capital, that is the difference between a black box and something a human can actually audit.
Risk Engineering
Every trade candidate passes a 15-check gate before a single order touches the exchange. Any single failure vetoes the trade immediately. The gate is evaluated in full, in order, every time — it is not configurable at runtime.
Beyond the gate: the system checks real wallet balance before every order (an unknown balance blocks trading rather than assuming it is fine), records intent before submission to prevent double-trades, and enforces kill switches at three independent layers.
Check 13 catches insufficient edge. Check 14 is deliberately absent — reviewed, measured, and removed. See the note below.
Engineering Judgment
One of the documented risk checks turned out to be incapable of firing. The value it compared against was never actually calculated, so the comparison was always false. In production it had blocked exactly nothing.
It was removed rather than repaired. The scenario it guarded against was measured across the full trade history and found never to have occurred — and repairing it as configured would have blocked a significant share of legitimate, harmless trades. The reasoning, the measurements, and the specific conditions under which it should be rebuilt were all written down.
A gate that cannot fire is worse than no gate: it reads as protection to whoever audits the system next, and it stops them looking.
Check 14 — Deliberately Absent
Pre-Scaling Audit
Before this system was permitted to handle more capital, it was put through a formal pre-live audit: six independent reviewers, each given a separate domain — execution safety, risk gate, storage integrity, deployment, application security, and strategy validity — and each asked to read the code cold and try to break it.
The output was a thirteen-document report. Every finding was triaged, ranked, and worked through across five phases, and each fix shipped with a regression test written specifically to fail against the old behaviour — so the defect cannot silently return.
The audit was run before scaling capital, not after a loss. That ordering is the whole point. Most systems get audited by the market.
A safety check that cannot fire is worse than no safety check — it reads as protection to whoever looks next.
Test Integrity
A test that passes tells you nothing on its own — it might be passing because the bug is fixed, or because the test never exercised the bug at all.
So every regression test written during remediation was first run against the unfixed code and required to fail. Only then was it accepted as proof. In several cases this caught tests that would have passed for the wrong reason and quietly certified a defect as fixed.
Historical Validation
Before a configuration change is allowed near real capital, it can be re-run against the system's own recorded history — every stored scan, order book, and signal reading, replayed chronologically with the proposed setting in place.
Candidate settings are judged on a split sample — validated on data they were not selected using — with a statistical correction applied for the number of variations tried. Both exist to catch the same failure: a pattern that looks profitable because it was chosen after seeing the answer.
34,080
Historical Scans
717
Trades Replayed
0
Mismatches
The engine was validated by replaying real history unchanged and requiring it to reproduce the original outcome exactly: 34,080 historical scans and 717 trades, with zero mismatches. A replay that cannot reproduce the past is not evidence about the future.
Operator Control Panel
Every trading parameter — position sizing, edge thresholds, which signals are active, per-product risk limits — is adjustable from a secured web control panel, not by editing code. Two things make this safe rather than reckless.
Every change is automatically committed to git with the exact diff, timestamp, and context — the same audit trail as a code review, applied to a live trading configuration.
Every configuration change draws an automatic boundary line in the data. Performance before and after a tuning change is never accidentally blended — a discipline most trading operations skip, and one that is easy to get wrong silently.
Any tuning idea can run as a fully isolated experiment stream alongside the live baseline — same signals, one changed variable, contamination-proof isolation between experiment and production decision-making. Scientific rigor in how the system iterates on itself, not ad hoc parameter twiddling.
The panel sits behind email and password plus a one-time emailed code (two-factor authentication), and every write is protected against cross-site request forgery.
Technology
Language
Market Data
Execution
Risk & Audit
Infrastructure
Quality
Why It Matters
Most trading bots stop at having a strategy. This one has the guardrails, audit trails, and fail-safes that transform a clever quantitative idea into something you would actually trust running unattended in production.
The same principles apply beyond trading: idempotent operations, append-only audit logs, kill switches at every layer, and shadow-mode proving grounds are engineering patterns for any high-stakes automated decision system.
If you are building automation that touches real money, real inventory, or real customer data — and you need it to be defensible, auditable, and provably safe — this is the kind of engineering we do.
Performance Measurement
The system separately measures the price a few seconds after a decision is made — the price an execution would realistically face — and compares it against the price at decision time. The gap between the two (adverse selection) is tracked as its own metric, not hidden inside a single P&L number. A strategy that looks good on paper but bleeds value to execution slippage shows up as exactly that.
Before any product is allowed to scale up its position sizing, it must clear a pre-registered statistical bar on real, resolved outcomes — not a backtest, not a subset chosen after the fact. The bar is set and written down before evidence is collected, and rule discovery is split-sample validated specifically to catch curve-fitting before it reaches real capital.
Historical Replay Engine
Every candidate tuning change is checked against a replay of real recorded market data — not simulated or synthetic data — before it is promoted. The discovery/confirmation split applies here too: a change only counts as validated if it holds up on data it was not picked using. This makes the system's own evolution evidence-driven rather than intuition-driven.
Intellectual Honesty
A tuning change had been shipped after it looked strong in testing. Replaying it against full recorded history showed the opposite: it was rejecting trades that would have been profitable, and its apparent strength did not survive the second half of the data.
It was reverted, and the reasoning was written into the project's permanent record rather than quietly dropped.
Separately, an entire class of proposed improvements — retuning the statistical weights behind the model — was tested and returned nothing on any product. That result was recorded too. Knowing which changes do not help is what stops a system being endlessly, expensively adjusted.