Skip to main content

Engineering Learnings

Engineering Learnings collects post-incident write-ups from running an autonomous trading system in production — each one covering a specific failure, why it happened, and the change that fixed it.

16 articles in this category.

Measuring Missed Exit Profits
8 min read

Measuring Missed Exit Profits

Quantify exit strategy performance by tracking Maximum Favorable Excursion (MFE) and Maximum Adverse Excursion (MAE) against realized profit and stop.

Read article
Detecting Market Regime Changes
9 min read

Detecting Market Regime Changes

We detect market regime changes using a dual-clock system: a daily Hidden Markov Model for broad market classification and an intraday efficiency ratio…

Read article
Securely Storing User Broker API Keys
8 min read

Securely Storing User Broker API Keys

A data-driven approach to securing user broker API keys, detailing a production incident and the implemented safeguards.

Read article
Market Data Pipeline Resilience
7 min read

Market Data Pipeline Resilience

Building a reliable market data pipeline requires an async-first design with layered fallbacks and rigorous testing for cache coherency and data integrity.

Read article
Bot Found Trades, Never Executed Them
7 min read

Bot Found Trades, Never Executed Them

A trading bot failed to execute trades due to differing margin calculations between its scanning and execution stages.

Read article
Shared Database Schema Migrations: The Cross-Service Gap
8 min read

Shared Database Schema Migrations: The Cross-Service Gap

Adding a database column in a shared schema requires careful deployment ordering across all consuming services to prevent UndefinedColumnErrors.

Read article
CREATE INDEX CONCURRENTLY Fails in Transactions
8 min read

CREATE INDEX CONCURRENTLY Fails in Transactions

Postgres's implicit transaction handling breaks CREATE INDEX CONCURRENTLY in multi-statement migration files. Learn how to split your migrations for.

Read article
ib_insync Crashes: uvloop and nest_asyncio Conflict
8 min read

ib_insync Crashes: uvloop and nest_asyncio Conflict

A sync convenience method in ib_insync's SDK reached for nest_asyncio, which cannot patch uvloop, leading to file descriptor leaks and crashes.

Read article
Position Sizing: The Smallest Candidate Wins
9 min read

Position Sizing: The Smallest Candidate Wins

Automated trading systems should use the minimum position size derived from risk-based, ATR-based, and half-Kelly methods to mitigate individual model…

Read article
Automating Small Accounts: The Fractional Share Imperative
7 min read

Automating Small Accounts: The Fractional Share Imperative

Automating day trading for accounts under $1,000 requires enabling fractional shares and adjusting risk parameters. Standard sizing formulas fail…

Read article
PDT Rule Compliance for Automated Trading
7 min read

PDT Rule Compliance for Automated Trading

Automated trading bots comply with the PDT rule by enforcing a pre-trade check on day trade counts within a rolling five-day window, preventing violations.

Read article
Bot Stopped Trading: The Silent Failure
8 min read

Bot Stopped Trading: The Silent Failure

A trading bot can stop trading without errors due to a clean exit code, bypassing failure detection and restarts.

Read article
Confidence Alone Doesn't Guarantee Accuracy
9 min read

Confidence Alone Doesn't Guarantee Accuracy

Selective prediction based on confidence thresholds failed to improve out-of-sample directional accuracy in our automated trading system.

Read article
LLM Backtests: The Two Faces of Lookahead Bias
9 min read

LLM Backtests: The Two Faces of Lookahead Bias

LLM backtests are unreliable due to two forms of lookahead bias: one fixable with timestamps, the other baked into model weights.

Read article
Multi-Agent LLMs: The Illusion of Independent Opinions
7 min read

Multi-Agent LLMs: The Illusion of Independent Opinions

Running multiple personas through a single LLM architecture leads to correlated errors, not independent insights. We learned this the hard way.

Read article
Broker Stops: Your Bot's Real Safety Net
9 min read

Broker Stops: Your Bot's Real Safety Net

A trading bot's in-memory stop loss is a false sense of security. Learn why broker-side stops are essential and how to implement them correctly.

Read article

Move from research to a watchlist

Use an article to frame the question, then inspect signal entry, stop, target, and reasoning for tickers you choose.

Build a Watchlist

Frequently asked questions

What is in the Engineering Learnings category?

Post-incident write-ups from running an autonomous trading system in production. Each article covers one specific failure — a stop that never reached the broker, a process that exited cleanly and was never restarted, a migration that could not run inside a transaction — along with why it happened and the change that fixed it. They are systems articles, not strategy articles, and they contain no performance or profitability claims.

Who are these articles written for?

Engineers who build or operate automated trading systems, and technically-minded traders who want to understand what actually breaks in one. They assume familiarity with APIs, databases and asynchronous code, and they describe mechanisms in enough detail that you could implement the equivalent fix in a different stack.

Are these real incidents?

Yes. Each article is generated from an internal root-cause analysis, audit or production incident, and the factual claims in it are drawn from that record rather than written from scratch. Numbers, failure modes and fixes describe what happened in our own system.

What is the most common cause of trading bot failures?

In our experience it is rarely the strategy. It is the operational layer around it: state held in application memory that does not survive a restart, two stages of one pipeline computing the same value differently, a dependency that behaves differently under the production event loop, and monitoring that reports green because it is watching the wrong process. Each of those has its own article here.

Do these articles tell me whether the trading strategies make money?

No, and deliberately so. These are engineering write-ups about correctness and reliability, not performance reports. They contain no win rates, returns or profitability claims. Tradewink publishes tracked signal outcomes separately, with the rolling window and methodology stated, because performance data and engineering data answer different questions and should not be blended.

Other categories

Save a signal preview for later

Get a concise AI signal example in your inbox, then build a watchlist when you are ready. No spam, unsubscribe anytime.