BACKTEST PARITY: 312 TRADES, ZERO MISMATCHES FOUND
Backtest parity matched 3,353,703 ticks and all 312 trades with zero ticket mismatches in ~30 seconds. See how a full deal-stream check exposes config drift.
Backtest parity is exact agreement between two engines, down to every trade. We fed our engine and the reference terminal the same tape, configuration, and broker contract. The run processed 3,353,703 ticks, produced 312 trades on both sides, and finished with 0 mismatches / 312 tickets in about 30 seconds.
The headline is not the profit. Net profit was +3,732.25 on a 100,000 base, with a 1.40 profit factor. The real receipt is that every side, lot, price, time, profit, swap, and comment matched the reference.
A port that "looks right" is still unproven. Matching totals can hide different trades, and a plausible curve can hide the wrong session. This certification closes that gap by comparing the full deal stream rather than trusting a summary screen.
#Backtest parity proves the deal stream, not just the total
Two runs can finish with the same profit and still be different strategies. One may enter later, exit earlier, or make compensating mistakes. The summary totals agree while the path underneath does not, which is why the summary is too weak to gate a port.
| Check | What it proves | What it misses |
|---|---|---|
| Net profit matches | The totals agree | Any pair of compensating errors |
| Profit factor and win rate match | The shape agrees | Sequencing, timing, and exit differences |
| Every deal matches across eight fields | Both engines ran the same computation | Nothing relevant to this gate |
This changes the review question. Instead of asking whether the final balance looks believable, we ask whether the engine made the same decision at each point. That is a stricter and more useful question.
The comparison was deliberately boring and complete. Every metric float matched to the last digit. Then all 312 deals were compared one by one across eight fields: side, lots, open and close prices, open and close times, profit, swap, and comment.
There was no sampling. A sample can miss the exact trade that exposes a broken branch. We compare the whole stream because a parity certificate with holes is just a shorter claim wearing a longer name.
#The certified run turned one window into a full receipt
The run happened inside the app process. No external harness, side process, or manual export sat between the engine and the comparison. The app loaded the algorithm through its runtime engine host, passed the configuration bytes and broker contract, streamed the tape, and received the deal stream back.
| Receipt | Value |
|---|---|
| Ticks fed | 3,353,703 |
| Trades produced | 312 |
| Net profit (base 100,000) | +3,732.25 · final 103,732.25 |
| Profit factor | 1.402 |
| Win rate | 0.785 |
| Swap, total | −531.01 |
| Elapsed | ~30 s, in-process |
| Parity vs reference | 0 mismatches / 312 tickets |
The receipt is self-contained enough to challenge. It names the tape size, trade count, profit, elapsed time, and comparison result. A reviewer can tell what happened without trusting the prose around it.
We ran it twice in the app and got identical results. That supports a narrow claim: each run was a deterministic function of its inputs. It does not prove the same behavior across every machine or thread count, and the certificate does not pretend that it does.
#Four contract items decide whether the comparison is valid
Zero mismatches came from controlling the comparison boundary. Four items had to be right: the data window, the tester session window, the broker contract, and the configuration hash. Each one has a measured failure mode when it drifts.
| Contract item | Rule | Failure when it is wrong |
|---|---|---|
| Data window | Use the exact slice, including both boundary rows | A different tape becomes a different run, not a comparison |
| Tester session window | Ship the session keys inside the configuration | The engine trades from the first tick and produces 336 trades instead of 312 |
| Broker contract | Match balance, margin, point, and long/short swap | The contract shifts the deal stream |
| Configuration hash | Match the reported hash to the exact config bytes | The run is visibly unverified rather than presented as a result |
The hash is different from the other three because it detects an unverified run. A data, session, or contract error can produce a clean-looking but wrong result. The hash answers a separate question: did the engine run the exact bytes it says it ran? If it cannot prove that, the receipt stays unverified.
The first three items define the execution; the hash proves identity. Together they prevent the common trick of comparing two runs that look related but did not share the same boundary, session, or contract.
This contract also explains why the certification is reusable. The tape, session boundary, broker terms, and bytes stay fixed, so another reviewer can repeat the same comparison. That discipline sits beside our three-phase trading strategy test: one controls execution conditions, while this one controls proof of implementation.
#The missing session keys created a plausible wrong answer
The most instructive failure produced 336 trades instead of 312. When the tester session keys were missing, the engine started trading from the first tick of the window rather than the session start. Nothing errored, and the result did not look obviously broken.
The measured cost was 24 extra trades, a 7.7% distortion. That is the kind of failure a headline check misses. The run remained flawless; the claim attached to it was wrong. A summary can agree while the engine is trading a different session.
A clean run can still carry a false claim. That is why we read the contract before the performance numbers. The number tells us what happened; the contract tells us whether the number belongs to the comparison we claimed.
Three more failures have the same quiet shape. An off-by-one at either tape boundary compares the run against a slightly different tape. A broker contract with one wrong swap figure moves only a subset of deals. An edited configuration can certify the wrong file while still producing a polished receipt.
That is why we compare all 312 tickets. The full stream catches changes that a total, ratio, or sampled result can conceal. It is also why the rule is blunt when the engines disagree: the reference is right until the port proves otherwise, and a divergence reverts.
#A portable engine gives the parity gate something worth checking
The trading logic sits outside the application. The algorithm ships as a runtime plug-in loaded through a generic engine host. The host supplies configuration bytes and a broker contract, streams ticks, and returns the result, so the application contains no hidden strategy that could mask a porting error.
The port master is frozen and version-anchored. It contains about 97.5 KB plus 35 include files. Its hot path evaluates 11 logics on both sides, which means 22 logic calls per tick. The Rust port carrying that work is roughly 900 KB, and every change faces the same parity gate.
A reference-side version bump does not move the master for convenience. When a platform update changes only sandbox metadata, we treat it as a replay of the frozen master rather than inventing a new baseline. The certification remains attached to the tape, window, contract, and bytes that made it true.
Portability and parity work together. A plug-in boundary lets us test the strategy independently, while the reference engine keeps us honest. Neither part is enough alone: portability without a referee is only convenience, and a referee without a portable port is only a demo.
That architecture gives the gate practical force. We can change the engine without changing the strategy, then ask the reference terminal to judge the result. The comparison is not another self-report from the same code path; it is an external receipt.
#The certificate is strong because its limits are printed
A bounded certificate is more useful than a broad promise. The proof has four legs: exact metrics, complete deal coverage, repeatability across two runs, and verification against the exact configuration bytes.
| Leg of the proof | Evidence |
|---|---|
| Exactness | Every metric float matches the reference to the last digit |
| Completeness | All 312 deals compared across eight fields, not sampled |
| Determinism | Two consecutive in-app runs produced identical results |
| Verifiability | The configuration hash matches the exact bytes that ran |
Three limits belong beside the result. Equity and drawdown reporting are host-side: the engine carries per-trade equity points while external receipts sample the curve, so drawdown figures can differ in sampling method even when the trades do not. An internal daily-close hook is a no-op because swap rollovers follow tick timestamps inside the engine's broker. The certification also remains bound to this window, configuration, and contract.
| Claim | Boundary |
|---|---|
| Deal streams match ticket-for-ticket | On this window, configuration, and contract |
| Metrics match to the last digit | Drawdown figures differ only in sampling method |
| The engine is deterministic | Two consecutive identical runs, not one lucky result |
| The run is verified | Only when the configuration hash matches the exact bytes |
Printing the boundary stops folklore. A certificate with limits can be re-run, inherited, and challenged. A claim without them tends to survive long after its tape, window, or bytes have changed. Our agentic verification loop uses that same discipline: claims need evidence, and evidence needs its boundary.
None of these limits cancels the receipt. They define the next test instead. The deal stream is certified for this window and configuration; equity reporting still needs its own host-side sampling rule; broader determinism still needs broader evidence.
#Zero mismatches is a method, not a trophy
The milestone is 312 tickets, 0 mismatches, 3.7% net, and about 30 seconds on a certified window. The durable asset is the method that produced it: fix the window, ship the session keys, match the contract, hash the bytes, compare every ticket across eight fields, and revert a divergence.
- Full deal-stream parity catches what matching profit alone hides.
- Configuration errors stay plausible until the four contract items (window, session, contract, hash) are checked.
- A certificate must state what it covered and what it did not.
The same receipt discipline continues in our nine-phase agentic trading loop, where machine drafts cannot promote themselves. The accepted runs remain available in the published DAAVILEFX results, and the complete parity receipts can be inspected in the live DAAVILEFX research dashboard.
#Questions we get asked
#What does zero mismatches prove?
It means all 312 trades matched the reference ticket-for-ticket across eight fields: side, lots, open and close prices, open and close times, profit, swap, and comment.
#Why compare the full trade stream instead of profit alone?
Two different runs can end with the same profit because errors cancel. A matching deal stream shows that the entries, ordering, prices, and exits are the same computation.
#What happens when the tester session keys are missing?
The engine trades from the first tick instead of the session start and produces 336 trades rather than 312. That is 24 extra trades, a 7.7% distortion that still looks plausible in a summary.
#Does the certificate prove the engine behaves the same on every machine?
No. The receipt covers two consecutive identical in-process runs on one certified window, configuration, and contract; stronger cross-machine claims need their own evidence.
#Why does the parity method require a configuration hash?
The reported hash must match the exact bytes that ran. If the engine cannot prove which configuration it used, the run is marked unverified instead of being presented as a result.