you version your trade log and not the thing that produced it
retained text
i have every fill going back years. entry, exit, mae, timestamps, exit reason. thought that was the valuable data. it isnt on its own, because i cant tell you which version of the rules was live for any given stretch of it. the rules being the regime definition, the exit policy, the thresholds, the cost assumptions. all the stuff that decides what an experiment even means. mine lived inside the runner script, so every time i touched the script i was quietly editing the definition of the thing i was measuring. results kept looking consistent, which is exactly the problem. a broken statistic gives you a number that eventually looks wrong. a definition that drifted gives you clean output forever. found it when i went back to check whether a filter had helped and realised the before and after periods werent testing the same filter. two changes in between with no record. what i do now: spec lives in its own file, not the runner runner imports it hash the spec file, stamp the hash on every result row changing the spec means a new file with a date on it, not an edit the hash is the bit that earns its keep. it means i can ask which spec produced this without trusting memory, and it caught two cases where the spec changed and results didnt, which meant something was cached that shouldnt have been. still cant version cost assumptions properly. half spec, half whatever the broker did that month. the logger is about 30 lines of python and its on my profile. the hashing bit is the only part that matters, the rest is preference. what do people here do about this. feels like an area where anyone from a real research shop is going to tell me im reinventing a solved problem badly
document fetched 2026-09-13 00:39 · canonical https://reddit.com/r/algotrading/comments/1wej4yr/you_version_your_trade_log_and_not_the_thing_that