A Decision Trace Must Distinguish False From Missing
A dashboard says WAIT. Was the spread check false, or did the engine never receive a spread observation? Those are different failures to investigate. A trace that turns both into an empty cell loses the distinction before debugging starts. A current discussion about trading-engine decision traces asks which evidence belongs beside a score and decision. My answer starts with a small requirement:…
Traders must carefully distinguish between false observations and missing data when analyzing trading-engine decision traces. A trace that merges both into a blank cell disregards this critical distinction. When presenting evidence alongside a decision score and decision, it is essential to preserve the actual inputs existing at that moment, including explicit false values.
Missing data should be treated with its own distinct meaning. The example contract features two boolean observations: sessionOpen and spreadAllowed. The former indicates the check ran and the condition was not met, while the latter signifies that the observation was not recorded. The system should not validate a boolean by checking if (!value), as this would invalidate a legitimate false result. Instead, presence and type should be verified separately.
To illustrate, the provided trace.test.mjs file defines four tests that can be run using Node's built-in test runner. The first test ensures that true false values are recorded rather than being treated as missing data. The second test rejects omitted features, while the third checks that null is not considered a valid boolean observation.
The fourth test verifies that a missing configuration version is rejected. These tests, when executed locally, successfully pass, validating the small validation function but not the overall correctness of a trading strategy or production trace pipeline. The version fields in the example must contain non-empty strings, but this validator does not confirm if the referenced build exists, that its contents match the identifier, or whether the configuration was the one actually running at decision time. Production evidence should include these links and retain them for accurate decision tracing.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.