I patched a leftover hole in the execution layer, and reined in a task-tracking document that had been growing out of control.
This is the English version of a post originally written in Korean for my algorithmic trading system devlog(new tab).
Closing out yesterday's loose end
One thing from yesterday was still unresolved: the new degrade-guard smoke test had come back failed last night.
This morning I tracked down why. The safeguard itself was fine — the test script just wasn't releasing the server it had borrowed when it finished, so the next run couldn't grab it and came back as a failure.
Fixing that cleanup step closed this out.
Making sure "is this really my order" holds up
This bot runs multiple strategies under a single brokerage account, all placing orders concurrently. So every time it pulls back an order result, it needs separate logic to work out whether that order actually came from itself.
That logic was part of a redesign of the order-execution and safety layer(new tab) I did a while back. One piece of it had been deferred at the time, flagged as "a bigger task that depends on the broker's query format changing first."
Looking at it again today, that premise turned out to be wrong. The broker's query format didn't need to change at all — I just needed to attach a date I already had on hand to the response.
Here's why it mattered: brokerage order numbers can be reused by a different account the next day. If I identify "my orders" by number alone, an order number I used yesterday could collide with a different order carrying the same number today, and get misclassified.
So I changed the matching key from the order number alone to a (trading date, order number) pair. Older records without a date still fall back to matching by number alone, so nothing that already worked broke.
Putting a runaway task document on a diet
This project keeps every in-progress task in a single tracking document, and over the past several days that document had ballooned past several thousand lines.
It was getting slow just to skim, and finished work was tangled up with open items, making it harder every day to tell what actually still needed doing.
So today, after getting outside advisory input, I restructured it. Decision rationale worth keeping for later reference — the "we decided not to do this" kind — moved into its own document. Completed work moved into a separate archive. The main document now holds only what's still open.
The result cut the document's length down by more than tenfold.
I'd done this kind of cleanup once before, but without any standing rule against it, the document ballooned right back within a month. This time I didn't stop at cleanup — I added a check script that warns me if the document crosses a length threshold again, and flags sections that have sat closed-out for too long without being archived.
Also today
An experiment to curb a strategy's turnover, which I'd been watching for a few days, finished its observation window today and got a final verdict. It fell short of the target, so I'm holding off on expanding it to the live account for now.
A small addition also went into an internal statistical validation tool: a new field that accounts for how often two signals would agree purely by chance, so it can separate a coincidental match from a meaningful one.
What's next
Today followed the same pattern as yesterday: rather than patching what looked broken on the spot, I went back to check why a given assumption existed in the first place before touching anything.
That's exactly what let the order-identification fix turn out much simpler than expected, once the wrong assumption about needing a broker-side change was out of the way.
Top comments (0)