2026liveprivate repo
Trading systems
TWS-Tools: two algorithmic systems over IBKR, in production
A live EMA scalping engine plus a port of the NostalgiaForInfinity strategy to equities, with a supervisor, portfolio backtesting, and a test suite holding the whole thing up.
This is where I have learned the most about architecture, because a bug here costs real money. Every fact has one owner: IB request pacing lives in exactly one module, disk paths come from `common/paths.py` and no module derives them from its own `__file__`, and the Telegram URL is built in a single place for the five processes that post. When the same fact is computed in two screens, sooner or later they tell different stories.
The supervisor does hot handover: a `/restart` exits with code 42 and the core swaps the process without losing the thread, with crash backoff and rotated logs. There are two separate data layers — the candle store and the trading state — plus a read-only gateway with freshness flags, so a strategy never decides on a stale candle believing it is fresh.